[Radiance-general] another water question
Gregory J. Ward
gregoryjward at gmail.com
Thu May 25 17:18:25 CEST 2006
Hi Nick,
Technically, the correct thing to do is to model the water's surface
as a dielectric with an index of refraction corresponding to water --
around 1.3. The problem, as you noticed, is that you cannot see
beneath such a surface, and this is due to the inability of the
source calculation in Radiance to find the light source after
refraction.
One cheap "solution," so to speak, is to use a BRTDfunc type to get
the surface reflection and transmission right, without actually
computing refractions. The objects under the water will not be
properly distorted, but at least they won't be black(!) The
following should work:
void BRTDfunc water_mat
10 refl refl refl
tran tran tran
0 0 0
fresnel.cal
0
10
0 0 0
0 0 0
0 0 0
1.3
And the file "fresnel.cal" contains:
{ Fresnel equation for reflection and transmission }
inside = -Rdot; { > 0 means ray coming from inside }
nratio = if(inside, arg(10), 1/arg(10));
cos1 = if(inside, -Rdot, Rdot);
cos2 = Sqrt(1 - sq(nratio)*(1 - sq(cos1)));
refl = if(FTINY-cos2, 1, (sq((cos1 - nratio*cos2)/(cos1 +
nratio*cos2)) +
sq((1/cos1 - nratio/cos2)/(1/cos1 + nratio/cos2)))/2);
trans = 1 - refl;
----------
The problem with John's suggestion is that you will end up with twice
as much reflection as you ought, because glass simulates reflection
off both the front and back surfaces, whereas you have just one
surface. You could lower the index of refraction given to match the
reflection of the water's surface at normal incidence, but the
computed reflection would still be somewhat off as a function of
angle. The above formula gives you the correct reflection amount
(even from underwater). It just doesn't do refraction.
You probably want to add a time-dependent wave texture to your
water's surface as well, since most of what makes a person difficult
to see while underwater is the reflections off the surface, which are
constantly in motion. I recommend doing an animation for that reason.
-Greg
> From: Nicholas Lander <njlander at yahoo.com.au>
> Date: May 25, 2006 12:13:50 AM PDT
>
> Hi All,
>
> I’ve looked through the archives regarding modelling
> water, but the posts seem to be concerned with making
> something that looks like water, without being
> physically accurate.
>
> What I want to do is test for reflections off a
> training pool – the coach needs to see a swimmer’s
> action in the pool and early morning sunlight may
> cause problems. If I use glass with a bumpy function,
> it looks really cool but I’m not sure if the amount of
> reflection is right. I tried a dielectric, but the
> “water” becomes a mirror.
>
> Is there a material to use that gives properties
> closer to water than glass? If so, I’d love to hear
> about it.
>
> Cheers
>
> Nick L
More information about the Radiance-general
mailing list