[Radiance-general] Question about transdata usage

Mark Stock [email protected]
Thu, 3 Apr 2003 11:52:54 -0500 (EST)


On Wed, 2 Apr 2003, Greg Ward wrote:

> Oh, bother these questions that require one to think!
>
> > From: Mark Stock <[email protected]>
> ...
> > Right now, my scene.rad looks like this:
> >
> > void transdata layer1trans
> > 5 noop layer1.dat translayer.cal pos_u pos_v
> > 0
> > 6 0.5 0.5 0.2  0.0 0.97 0.0
> > # r g b  rspec trans tspec
> >
> > layer1trans polygon layer1
[snip]
> >
> > And the .cal file contains:
> >
> > pos_u = Px;
> > pos_v = Py;
[snip]
>
> Your description is suffering from multiple problems.  First off, the
> transdata is not the type you want to be using, as it only varies the
> specular lobe for highlights from sources, where what you want is
> probably something which varies the transmitted component.  For this,
> you should use the basic trans type in conjunction with a brightdata
> modifier.

Yes, trans and brightdata appear to work much better than transdata.

> The brightdata value will act as a multiplier on the
> specular transmission of the trans material.  See the reference manual
> <http://radsite.lbl.gov/radiance/refer/ray.html> for details.

I assume you meant the opposite, that the data modifies the
transmissivity, not the transmitted specular fraction.

The problem now is that I only get good renderings if the
tspec is 1.0, which creates very dark cloud volumes. I am
looking for more of a high-albedo look. When I reduce the tspec
to anything below 1.0, the entire volume thickens.

I am going to try to use mixdata to mix between a purely
transparent and a semi-transparent and diffusely scattering
material. I think that'll fix the problem.
[time warp]
Okay, I tried that, and it seems to render about 100 times slower,
maybe 1000 times slower. Hmmm.

> The
> second error, which the first makes irrelevant, is that you need to
> specify functions for the pos_u and pos_v parameters, even if they
> don't use their arguments:
>
> pos_u(dummy) = Px;
> pos_v(dummy) = Py;
>
> Otherwise, the interpreter decides these are variables, and you get the
> error you got when you try to use them.

I am using 3.4.1, and if I add the "(dummy)" arguments to "pos_u"
and the others (in a new 3D-capable file), it doesn't even render.
rview does the "1 sampling" then exits with:

rview: pos_w`translayer: undefined variable

Keeping them off allows it to work well, though.

Hmmm, I *did* use a good number of performance-related optimizations
when building the binaries...

> You didn't see any variation
> because you set the rspec and tspec values to zero, turning off the
> whole directional diffuse calculation.  Since transdata uses its
> function only for the directional diffuse component, there ended up
> being no variation in your results.

Thanks for the help, Greg! It's good to see that you're still
very involved in Radiance. BTW: another Radiance-rendered image
of mine will be in the SIGGRAPH Art Gallery this year. I hope
you enjoy it.

Mark