Volumetric scattering

Discussion related to the implementation of new features & algorithms to the Core Engine.

Moderators: jromang, tomb, zcott, coordinators

Re: Volumetric scattering

Postby Meelis » Tue Feb 14, 2012 3:42 am

About that orange juice, my scattering was way too low ~120

Here is scattering much higher page 8 https://www.msu.edu/~qinjianw/Documents/2007_AS_Qin.pdf
Image

Now it looks more like on photo samples.

Code: Select all
nm   1/m
380   1731.34328358
400   1634.32835821
450   1358.20895522
500   1134.32835821
550   917.91044776
600   761.19402985
650   641.79104478
700   552.23880597
720   537.31343284


I lowered for speed
Code: Select all
nm   1/m
380   917.91044776
400   866.47581060
450   720.08492022
500   601.38960371
550   486.65079773
600   403.56407617
650   340.25990736
700   292.78178075
720   284.86875965
User avatar
Meelis
 
Posts: 872
Joined: Sat Oct 17, 2009 2:16 am

Re: Volumetric scattering

Postby neo2068 » Tue Feb 14, 2012 5:50 am

Hi!
As this thread is resurrected I want to ask the questions:
1. What parts are missing to support heterogeneous scattering? Has there any work been done recently or is it postponed? Which method is planned to use to support heterogenous media?

2. Another topic is the step size of the volume integrators. I thought that is isn't used anymore with the new volume system but as I looked into the source code I found a few places where it is used. Are this methods used for support of the old system, e.g. volume grid, or is it still used with the new volume system?
i7 860, 16 GB RAM, NVIDIA Geforce GTX 560 + GTX 460, Windows 7 64bit, Blender 2.66
neo2068
Developer
 
Posts: 485
Joined: Sun May 03, 2009 2:11 am
Location: Germany

Re: Volumetric scattering

Postby jeanphi » Tue Feb 14, 2012 7:49 am

neo2068 wrote:1. What parts are missing to support heterogeneous scattering? Has there any work been done recently or is it postponed? Which method is planned to use to support heterogenous media?

The code to handle heterogeneous medium by selecting a correct step size is missing. I plan to partition volumes according to the density and let the ray go through each subvolume with appropriate scattering probabilities in each one.

neo2068 wrote:2. Another topic is the step size of the volume integrators. I thought that is isn't used anymore with the new volume system but as I looked into the source code I found a few places where it is used. Are this methods used for support of the old system, e.g. volume grid, or is it still used with the new volume system?

Currently it is only used by the old system, however it might be used by the new heterogeneous scattering system when it is coded to limit the size of the subvolumes.

Jeanphi
jeanphi
Developer
 
Posts: 6569
Joined: Mon Jan 14, 2008 7:21 am

Re: Volumetric scattering

Postby b-tag » Tue Feb 14, 2012 10:13 am

Meelis wrote:[...]Now it looks more like on photo samples.[...]


Okay so how one could use these values in Lux? I'm curious how the results for milk compare, for example.

b.
Last edited by b-tag on Tue Feb 14, 2012 10:37 am, edited 2 times in total.
Twitter: @bogomirov
User avatar
b-tag
 
Posts: 61
Joined: Tue Nov 02, 2010 10:53 am

Re: Volumetric scattering

Postby Meelis » Tue Feb 14, 2012 10:25 am

b-tag wrote:Okay so how one could use these values in Lux? I'm curious how the results for milk compare, for example.

b.


In luxblend you add tabulatedata texture and braus link for the txt file,
Image
and then set the texture as scattering

Or input just in LXM file.

You are just fine with RGB values, i didn't want to spend time converting to RGB.
User avatar
Meelis
 
Posts: 872
Joined: Sat Oct 17, 2009 2:16 am

Re: Volumetric scattering

Postby neo2068 » Tue Feb 14, 2012 3:13 pm

jeanphi wrote:
neo2068 wrote:1. What parts are missing to support heterogeneous scattering? Has there any work been done recently or is it postponed? Which method is planned to use to support heterogenous media?

The code to handle heterogeneous medium by selecting a correct step size is missing. I plan to partition volumes according to the density and let the ray go through each subvolume with appropriate scattering probabilities in each one.

neo2068 wrote:2. Another topic is the step size of the volume integrators. I thought that is isn't used anymore with the new volume system but as I looked into the source code I found a few places where it is used. Are this methods used for support of the old system, e.g. volume grid, or is it still used with the new volume system?

Currently it is only used by the old system, however it might be used by the new heterogeneous scattering system when it is coded to limit the size of the subvolumes.

Jeanphi

Thanks for the answers.
i7 860, 16 GB RAM, NVIDIA Geforce GTX 560 + GTX 460, Windows 7 64bit, Blender 2.66
neo2068
Developer
 
Posts: 485
Joined: Sun May 03, 2009 2:11 am
Location: Germany

Re: Volumetric scattering

Postby b-tag » Wed Feb 15, 2012 12:08 am

Okay, Applied Optics isn't my forte, but in order to use the empirical data from the paper above, one should compensate for the reduced scattering coefficient. So, for the scattering coefficient as a function of the wavelength (and keeping the Lux notation used so far):

sigma_s(lambda) = m_s'(lambda)/(1-g)

where m_s'(lambda) is the reduced scattering coefficient provided empirically, and g is the asymmetry.

So if we use g(RGB) from the volumetric scattering presets estimated previously, should be g converted to a function of the wavelength, or there could be an easier solution?

b.
Twitter: @bogomirov
User avatar
b-tag
 
Posts: 61
Joined: Tue Nov 02, 2010 10:53 am

Re: Volumetric scattering

Postby Meelis » Wed Feb 15, 2012 12:53 am

b-tag wrote:Okay, Applied Optics isn't my forte, but in order to use the empirical data from the paper above, one should compensate for the reduced scattering coefficient. So, for the scattering coefficient as a function of the wavelength (and keeping the Lux notation used so far):

sigma_s(lambda) = m_s'(lambda)/(1-g)

where m_s'(lambda) is the reduced scattering coefficient provided empirically, and g is the asymmetry.

So if we use g(RGB) from the volumetric scattering presets estimated previously, should be g converted to a function of the wavelength, or there could be an easier solution?

b.


Hi

This math is over my head.
What i did i'm not sure if that's correct but i just multiplied reduced scattering coefficient for 1cm to 100cm (by 100) :oops: :D :lol:

But this would be so creat if we had in Wiki some formulas with examples in OpenOffice Calc format how to convert data to insert in LuxBlend interface.
User avatar
Meelis
 
Posts: 872
Joined: Sat Oct 17, 2009 2:16 am

Re: Volumetric scattering

Postby Nicolas » Wed Sep 19, 2012 6:48 am

Hello,

This "homogeneous" volumetric material is great.
I've been looking around in the code, and I noticed that it seems to use "SchlickScatter" as the phase function.

Am I correct?

If I'd like to replace it with another phase function, such as Henyey-Greenstein or Mie, is there anything I should know, or is it just a drop-in replacement of schlickscatter.[cpp,h]?

(I'm asking because I'll need to compare with pictures generated with other renderers, and I'll have to make sure I have the same phase function).
Nicolas
 
Posts: 1
Joined: Wed Sep 19, 2012 6:17 am

Re: Volumetric scattering

Postby jeanphi » Wed Sep 19, 2012 6:59 am

Hi,

Yes, LuxRender is using the Schlick phase function. Mie, Rayleigh and Henyey-Greenstein functions are defined in core/volume.h but are currently unused. You can either create your own scattering BxDF with the other models and use them in the volumes or update the existing Schlick BxDF to use another model.

Jeanphi
jeanphi
Developer
 
Posts: 6569
Joined: Mon Jan 14, 2008 7:21 am

Previous

Return to Architecture & Design

Who is online

Users browsing this forum: No registered users and 1 guest