Volumetric scattering

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

Moderators: jromang, tomb, zcott, coordinators

Re: Volumetric scattering

Postby J the Ninja » Mon Feb 21, 2011 3:34 pm

No. Don't tell RC1 you want the "multi" integrator either, it'll segfault if you do.
-Jason

Material DB Admin
User avatar
J the Ninja
Developer
 
Posts: 2210
Joined: Wed May 19, 2010 9:54 pm
Location: Portland, USA

Re: Volumetric scattering

Postby Akhbour » Mon Feb 21, 2011 4:05 pm

Thanks Jason!
Peter
User avatar
Akhbour
 
Posts: 15
Joined: Sat Dec 18, 2010 7:11 pm

Re: Volumetric scattering

Postby sphere » Sun Mar 20, 2011 6:10 pm

I've read all this very interesting thread, but I've still some gap in understanding the workings of volumes assigned to materials.
I'm considering here atmospheric volumes.

Say I have a simple scene with just two cubes (cube1, cube2), a spot light illuminating both cubes and (of course) a camera. I create two volumes: "air" (clear) and "fog" (homogeneous, with some scattering). I don't assign the default Exterior and Interior volumes in the world settings.

If I assign the "fog" volume to cube1 (exterior) and leave all others materials with no volume assigned I can see the volumetric light cone coming from the spot. I then assign the volume "air" to cube2 (leaving "fog" assigned to cube1) and I still can see the volumetric light cone. But if I then swap the volumes ("air" assigned to cube1 and "fog" to cube2) there's no more a volumetric light cone coming from the spot.

How does the exterior volume assigned to a certain material prevails if in conflict with the one assigned to others?

I assume that the correct procedures would be to set one of the defined volumes to all the materials in the scene (or use the default exterior-interior settings). That is, if "fog" is then assigned also to the lamp this would solve every ambiguity (and in fact the light cone reappears). Is it so?

And what about the camera? What is the effect of assigning an homogeneous volume to the camera?
I've noticed that assigning "fog" to the camera too the render speed decrease. Also the rendered image is a little different (a little more foggy).
Is it because the render engine must calculate also the in-scattering to the camera?

I'd like to understand better...

Thanks for your help
User avatar
sphere
 
Posts: 29
Joined: Thu Sep 23, 2010 8:07 am

Re: Volumetric scattering

Postby jeanphi » Mon Mar 21, 2011 3:15 am

Hi,

When not all media are defined, the rule is to take the first one to fill in the subsequent gaps when there is a reflection. If a conflict arises between the eye path and the light path, the eye path is favored over the light path.
Without knowing your setup, it's hard to answer your question regarding the spot, but if the spot is aimed at the first cube and not the second one, when the light path hits the cube with the foggy exterior, it computes scattering along the path.

Regarding the camera, suppose it is aimed at nothing (the ray immediately goes to infinity), if the camera has no volume assigned, it won't compute scattering and will render black, now if you have a volume it will compute scattering and the result might catch some light, thus the more foggy look. If your light has a volume assigned, this will be mitigated by the fact that light rays might be scattered in front of the camera and bring in some light.

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

Re: Volumetric scattering

Postby sphere » Mon Mar 21, 2011 12:15 pm

jeanphi wrote:Hi,

When not all media are defined, the rule is to take the first one to fill in the subsequent gaps when there is a reflection. If a conflict arises between the eye path and the light path, the eye path is favored over the light path.
Without knowing your setup, it's hard to answer your question regarding the spot, but if the spot is aimed at the first cube and not the second one, when the light path hits the cube with the foggy exterior, it computes scattering along the path.

Regarding the camera, suppose it is aimed at nothing (the ray immediately goes to infinity), if the camera has no volume assigned, it won't compute scattering and will render black, now if you have a volume it will compute scattering and the result might catch some light, thus the more foggy look. If your light has a volume assigned, this will be mitigated by the fact that light rays might be scattered in front of the camera and bring in some light.

Jeanphi


Perfect. Thanks Jeanphi. It's much more clear now.
To visually clarify what happens (to myself and maybe to others) I've made a test, with just a cube1 (on the left) a cube2, a plane, and a spot light, The spot light is exactly equally distant from the two cubes. I've created a homogeneous volume, "fog", with some absorption and scattering. Then I've assigned the "fog" volume to the elements of the scene in the following sequence
1) cube1
2) cube2
3) cube1+cube2
4) cube1+cube2+plane
5) cube1+cube2+plane+Camera
6) cube1+cube2+plane+Spot Light
7) cube1+cube2+plane+Camera+Spot Light
leaving the other material not assigned (n.d.) to any volume type in each case.

The pictures make clear that if a ray from the spot is going to hit a material with volume "fog" assigned as exterior volume then this light is scattered and absorbed, and the scattered light becomes visible by the camera. Otherwise all the light emitted hits the object, the object receive more light and the ray is not visible.

What makes this scheme a little strange to understand is that, in real world, light wouldn't know in advance the properties of the material it is bound to hit.... :shock:
Attachments
sheet.jpg
User avatar
sphere
 
Posts: 29
Joined: Thu Sep 23, 2010 8:07 am

Re: Volumetric scattering

Postby jeanphi » Mon Mar 21, 2011 3:02 pm

sphere wrote:What makes this scheme a little strange to understand is that, in real world, light wouldn't know in advance the properties of the material it is bound to hit.... :shock:

Well, in real life, light "knows" the medium as soon as it leaves the surface so to speak, ie you must define volumes for all surfaces if you want a predictable behaviour.

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

Re: Volumetric scattering

Postby Lord Crc » Mon Mar 21, 2011 5:13 pm

sphere wrote:To visually clarify what happens (to myself and maybe to others) I've made a test, with just a cube1 (on the left) a cube2, a plane, and a spot light, The spot light is exactly equally distant from the two cubes. I've created a homogeneous volume, "fog", with some absorption and scattering. Then I've assigned the "fog" volume to the elements of the scene in the following sequence
1) cube1
2) cube2
3) cube1+cube2
4) cube1+cube2+plane
5) cube1+cube2+plane+Camera
6) cube1+cube2+plane+Spot Light
7) cube1+cube2+plane+Camera+Spot Light
leaving the other material not assigned (n.d.) to any volume type in each case.


Note that you'd get the same result as 7) if you only assigned the fog medium to camera + light(s), assuming you don't have any glass2 mediums in there, then you need extra care.
May contain traces of nuts.
User avatar
Lord Crc
Developer
 
Posts: 4454
Joined: Sat Nov 17, 2007 2:10 pm

Re: Volumetric scattering

Postby moure » Mon Jun 13, 2011 9:27 am

Hi , im not sure if this must go here or in a thread that wont get easily lost :)
I made a small excel file that calculates the values from this paper http://graphics.ucsd.edu/~henrik/papers/acquiring_scattering_properties/acquiring_scattering_properties.pdf as jeanphi pointed some posts ago (ok, maybe a lot).
Here is a pdf that shows the results, and also the excel file for anyone that wants to improve it, fix something, etc.

If we test these and they have good results i believe we should add them as Homogeneous Volume Presets in LuxBlend , (ill add them in LuxMax too ;) ).
Attachments
Volume Presets.zip
Volume Presets xlsx file in the zip
(16.8 KiB) Downloaded 26 times
Volume Presets.pdf
Volume Presets PDF
(245.49 KiB) Downloaded 62 times
User avatar
moure
Developer
 
Posts: 410
Joined: Sun Sep 26, 2010 4:32 am
Location: Greece

Re: Volumetric scattering

Postby b-tag » Thu Jan 19, 2012 6:59 pm

moure wrote:If we test these and they have good results i believe we should add them as Homogeneous Volume Presets in LuxBlend , (ill add them in LuxMax too ;) ).


In order to use these data in Blender/LuxBlend, one should be able to enter the RGB values of the Absorption coefficient (sigma_a) through the interface. What the present version of LuxBlend supports however, is entering Absorption Colour, Absorption at Depth and Scale. These parameters are okay for allowing visual adjustment of the appearance of the material, but have no direct correspondence to the measured data.

Let me recap: entering the sigma_a coefficient in LuxBlend would allow the easier:
  • creation of materials with scattering properties based on measured data
  • changing of the concentration of an ingredient
  • mixing of two or more ingredients, e.g. milk, coffee and sugar, etc.

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

Re: Volumetric scattering

Postby moure » Fri Jan 20, 2012 5:09 am

You can enter the values from the excel document directly to the lxm file ;)
I have tested several of them and they worked as expected.
User avatar
moure
Developer
 
Posts: 410
Joined: Sun Sep 26, 2010 4:32 am
Location: Greece

PreviousNext

Return to Architecture & Design

Who is online

Users browsing this forum: No registered users and 0 guests