confused by turbidity

Hi Everyone,

I've been hacking around with some code trying to see how turbidity changes my rendering, so far I can't see to find any change in my images. Which leads me to suppose that I must be doing something wrong. I'm using the commands in *Bold* which result in the world.rad files below.

Another question.

I'm actually interested in simulating turbidity underwater, don't know if anyone can comment upon whether the turbidity numbers for air relate to those for water? Is there a better renderer for such things.

Best wishes,

George

============================ BORING DETAILS

···

=================================================

*# C:\Program Files (x86)\MinGW-Radiance\bin\gensky -ang 10 -80 +s -B 55.87 -t 0.00**
*
# Ground ambient level: 17.8

void light solar
0
3 2.17e+006 2.17e+006 2.17e+006

solar source sun
0
4 0.969846 -0.171010 0.173648 0.5

void brightfunc skyfunc
2 skybr skybright.cal
0
7 1 7.71e+000 4.99e+000 2.95e-001 0.969846 -0.171010 0.173648
skyfunc glow skyglow 0 0 4 1.00 1.00 1.00 0
skyglow source sky 0 0 4 0 0 1 180
void plastic white
0
5 0.8 0.8 0.8 0.0 0.2

*# C:\Program Files (x86)\MinGW-Radiance\bin\gensky -ang 10 -80 +s -B 55.87 -t 5.00**
*# Ground ambient level: 17.8

void light solar
0
3 2.17e+006 2.17e+006 2.17e+006

solar source sun
0
4 0.969846 -0.171010 0.173648 0.5

void brightfunc skyfunc
2 skybr skybright.cal
0
7 1 7.71e+000 4.99e+000 2.95e-001 0.969846 -0.171010 0.173648
skyfunc glow skyglow 0 0 4 1.00 1.00 1.00 0
skyglow source sky 0 0 4 0 0 1 180
void plastic white
0
5 0.8 0.8 0.8 0.0 0.2

=============================================================================

--
Dr P. George Lovell,

Lecturer in Psychology
University of Abertay Dundee
Dundee
DD1 1HG

Tel 01382-308581
Fax 01382-308749

Researcher/Co-investigator,
School of Psychology, University of St Andrews

RM 2.27 (The Yellow Room).
Phone (01334) 463056

Hi George,

gensky makes use of the standard sky distributions overcast (cloudy), clear (sunny) plus intermediate. The distributions are thus given, not affected by a turbidity. The turbidity value would be used to "scale" the distributions if you rely on the model-based assumptions instead of using measured / otherwise expected illuminance or luminance, but not when you pass that value using the -B parameter. Thus, in your case, you get a sunny sky and the turbidity is simply ignored. If you skip the -B parameter, then the sky luminance will be scaled based on the models included in gensky, and these would make use of the turbidity parameter. You can check this by varying -t and removing -B 55.87.

Cheers, Lars.

Hi George,

I just want to add to what Lars said, which is correct. Turbidity does not affect the light distribution in gensky.

Sadly, we don't have a genocean to create lighting environments for underwater -- that would be a nice addition! If you are trying to simulate absorption and scattering in a participating medium, you can try playing around with the -m* options to affect the global environment. There is also the "mist" primitive for controlling local media and scattering from specific light sources. The single-scatter approximation used in Radiance is very approximate, however, and specifying a non-zero global extinction coefficient then having light sources infinitely distant (a la the "source" type) results in a lamentable zero contribution to the scene.

However, there's no reason in the case of the ocean that you couldn't use one mist sphere for water surface, indicating the sun as the source, and you should get roughly the correct behavior down below.

Cheers,
-Greg

···

From: "Lars O. Grobe" <[email protected]>
Date: January 30, 2014 6:30:56 AM PST

Hi George,

gensky makes use of the standard sky distributions overcast (cloudy), clear (sunny) plus intermediate. The distributions are thus given, not affected by a turbidity. The turbidity value would be used to "scale" the distributions if you rely on the model-based assumptions instead of using measured / otherwise expected illuminance or luminance, but not when you pass that value using the -B parameter. Thus, in your case, you get a sunny sky and the turbidity is simply ignored. If you skip the -B parameter, then the sky luminance will be scaled based on the models included in gensky, and these would make use of the turbidity parameter. You can check this by varying -t and removing -B 55.87.

Cheers, Lars.
_______________________________________________

From: P George Lovell <[email protected]>
Date: January 30, 2014 3:37:52 AM PST

Hi Everyone,

I've been hacking around with some code trying to see how turbidity changes my rendering, so far I can't see to find any change in my images. Which leads me to suppose that I must be doing something wrong. I'm using the commands in Bold which result in the world.rad files below.

Another question.

I'm actually interested in simulating turbidity underwater, don't know if anyone can comment upon whether the turbidity numbers for air relate to those for water? Is there a better renderer for such things.

Best wishes,

George

============================ BORING DETAILS =================================================
...

--
Dr P. George Lovell,

Lecturer in Psychology
University of Abertay Dundee

Thanks Lars/Greg,

Ah, I had expected increased turbidity to result in scattering that correlated with object-distance.

I was hoping to estimate (roughly) how scatter changes the colour of stuff beneath water as a function of turbidity and distance (and viewing direction). I may need to rein in my ambitions.

With regard to mist: By "specfic light sources" I take it you don't mean gensky then? Do you have a simple example of mist being used in a small model? I can then work this into my already bloated matlab wrapper.

"genocean" I get it :wink: , but not before foolishly googling-it!

George

···

On 30/01/2014 16:07, Greg Ward wrote:

Hi George,

I just want to add to what Lars said, which is correct. Turbidity does not affect the light distribution in gensky.

Sadly, we don't have a genocean to create lighting environments for underwater -- that would be a nice addition! If you are trying to simulate absorption and scattering in a participating medium, you can try playing around with the -m* options to affect the global environment. There is also the "mist" primitive for controlling local media and scattering from specific light sources. The single-scatter approximation used in Radiance is very approximate, however, and specifying a non-zero global extinction coefficient then having light sources infinitely distant (a la the "source" type) results in a lamentable zero contribution to the scene.

However, there's no reason in the case of the ocean that you couldn't use one mist sphere for water surface, indicating the sun as the source, and you should get roughly the correct behavior down below.

Cheers,
-Greg

From: "Lars O. Grobe" <[email protected]>
Date: January 30, 2014 6:30:56 AM PST

Hi George,

gensky makes use of the standard sky distributions overcast (cloudy), clear (sunny) plus intermediate. The distributions are thus given, not affected by a turbidity. The turbidity value would be used to "scale" the distributions if you rely on the model-based assumptions instead of using measured / otherwise expected illuminance or luminance, but not when you pass that value using the -B parameter. Thus, in your case, you get a sunny sky and the turbidity is simply ignored. If you skip the -B parameter, then the sky luminance will be scaled based on the models included in gensky, and these would make use of the turbidity parameter. You can check this by varying -t and removing -B 55.87.

Cheers, Lars.
_______________________________________________

From: P George Lovell <[email protected]>
Date: January 30, 2014 3:37:52 AM PST

Hi Everyone,

I've been hacking around with some code trying to see how turbidity changes my rendering, so far I can't see to find any change in my images. Which leads me to suppose that I must be doing something wrong. I'm using the commands in Bold which result in the world.rad files below.

Another question.

I'm actually interested in simulating turbidity underwater, don't know if anyone can comment upon whether the turbidity numbers for air relate to those for water? Is there a better renderer for such things.

Best wishes,

George

============================ BORING DETAILS =================================================
...

--
Dr P. George Lovell,

Lecturer in Psychology
University of Abertay Dundee

_______________________________________________
Radiance-general mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general

--
Dr P. George Lovell,

Lecturer in Psychology
University of Abertay Dundee
Dundee
DD1 1HG

Tel 01382-308581
Fax 01382-308749

Researcher/Co-investigator,
School of Psychology, University of St Andrews

RM 2.27 (The Yellow Room).
Phone (01334) 463056

Hi George,

This is just off the cuff, so you may run into problems with the model, but you can start with a block of ocean water and a solar source:

!gensky 2 1 10:30

void mist seawater
1 sun
0
7 .1 .1 .1 .9 .3 .1 .9

!genbox seawater sea 200 200 100 | xform -t -100 -100 -100

···

-------
This should generate a 200x200 meter block of ocean 100 meters deep, with sea level referenced to 0. There won't be any refraction effects or waves, as these would interfere with the calculation of scattering from sunlight, which I presume is the point of this exercise. Adding objects to the ocean will add interest as you should start to see volumetric shadows if you set your rendering parameters appropriately.

Speaking of parameters, the above values for seawater are really a guess based on the following article by Maffione that Google found for me:

  http://www.tos.org/oceanography/archive/14-3_maffione.pdf

I didn't do a proper job fitting either the plot of eccentricity shown in Fig. 3 or the absorption and scattering in Fig. 5, which I eyeballed. Fitting the Henyay-Greenstein function for scattering eccentricity I will leave to you. The formula is:

  P(theta) = (1 - g*g) / (1 + g*g - 2*g*cos(theta))^1.5

Note that it is important to work in meters or convert the values to whatever world coordinates you are using if you prefer feet or fathoms(!)

Best of luck!
-Greg

From: P George Lovell <[email protected]>
Date: January 31, 2014 6:29:08 AM PST

Thanks Lars/Greg,

Ah, I had expected increased turbidity to result in scattering that correlated with object-distance.

I was hoping to estimate (roughly) how scatter changes the colour of stuff beneath water as a function of turbidity and distance (and viewing direction). I may need to rein in my ambitions.

With regard to mist: By "specfic light sources" I take it you don't mean gensky then? Do you have a simple example of mist being used in a small model? I can then work this into my already bloated matlab wrapper.

"genocean" I get it :wink: , but not before foolishly googling-it!

George

On 30/01/2014 16:07, Greg Ward wrote:

Hi George,

I just want to add to what Lars said, which is correct. Turbidity does not affect the light distribution in gensky.

Sadly, we don't have a genocean to create lighting environments for underwater -- that would be a nice addition! If you are trying to simulate absorption and scattering in a participating medium, you can try playing around with the -m* options to affect the global environment. There is also the "mist" primitive for controlling local media and scattering from specific light sources. The single-scatter approximation used in Radiance is very approximate, however, and specifying a non-zero global extinction coefficient then having light sources infinitely distant (a la the "source" type) results in a lamentable zero contribution to the scene.

However, there's no reason in the case of the ocean that you couldn't use one mist sphere for water surface, indicating the sun as the source, and you should get roughly the correct behavior down below.

Cheers,
-Greg

From: "Lars O. Grobe" <[email protected]>
Date: January 30, 2014 6:30:56 AM PST

Hi George,

gensky makes use of the standard sky distributions overcast (cloudy), clear (sunny) plus intermediate. The distributions are thus given, not affected by a turbidity. The turbidity value would be used to "scale" the distributions if you rely on the model-based assumptions instead of using measured / otherwise expected illuminance or luminance, but not when you pass that value using the -B parameter. Thus, in your case, you get a sunny sky and the turbidity is simply ignored. If you skip the -B parameter, then the sky luminance will be scaled based on the models included in gensky, and these would make use of the turbidity parameter. You can check this by varying -t and removing -B 55.87.

Cheers, Lars.
_______________________________________________

From: P George Lovell <[email protected]>
Date: January 30, 2014 3:37:52 AM PST

Hi Everyone,

I've been hacking around with some code trying to see how turbidity changes my rendering, so far I can't see to find any change in my images. Which leads me to suppose that I must be doing something wrong. I'm using the commands in Bold which result in the world.rad files below.

Another question.

I'm actually interested in simulating turbidity underwater, don't know if anyone can comment upon whether the turbidity numbers for air relate to those for water? Is there a better renderer for such things.

Best wishes,

George

============================ BORING DETAILS =================================================
...

--
Dr P. George Lovell,

Lecturer in Psychology
University of Abertay Dundee

_______________________________________________
Radiance-general mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general

--
Dr P. George Lovell,

Lecturer in Psychology
University of Abertay Dundee
Dundee
DD1 1HG

Tel 01382-308581
Fax 01382-308749

Researcher/Co-investigator,
School of Psychology, University of St Andrews

RM 2.27 (The Yellow Room).
Phone (01334) 463056

_______________________________________________
Radiance-general mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general