[Radiance-general] Question about transdata usage

Mark Stock [email protected]
Wed, 2 Apr 2003 09:53:49 -0500 (EST)


Hello Radiance users,

I have a question about the transdata material type. It doesn't
seem like I am using it properly, the results always look like
an unmodified "trans" material, no matter what I do with the
data file.

Untimately, I would like to render a smoky cloud by using multiple
planes, each totally transparent except where the smoke exists,
where it is semi-transparent. It seems like "transdata" is the
best way. I have a 3D data field of density values, scaled either
0 to 255 or 0.0 to 1.0. I can also write individual planar data
files, if need be. The density is controlled only by position
in space, not by view vectors, angle, etc. This makes my
funcfile very simple.

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
0
0
12  0 0.1 1  0 0.1  1 1 0.01  0 1 0.1

[other scene stuff: ground plane, light "source"]

The simplified data file that I am using now is (layer1.dat):

2
0.0 1.0 3
0.0 1.0 3
1 0 1
0 1 0
0 0 1

And the .cal file contains:

pos_u = Px;
pos_v = Py;

What this does is create a brown-ish semi-transparent plane
with no variations across it. I can only change the trans component
of the material, and that works properly. When I make the rspec
or tspec non-zero, I get a "rview: pos_u: undefined function"
error.

So, I have a few questions:

1) do the values in the data file need to be in any particular form?
   (one of my files has integers 0 to 255, others are 0.0 to 1.0;
    I know I can scale them within the .cal file)

2) how do you control rspec, trans, and tspec from the .cal file?
   It seems like I can only return one value from there; I use
   a noop for that one.

3) shouldn't I be seeing *some* variation across the plane here?

I've been trying variations on these files for a few hours. I
don't have the Radiance book here with me to help, but I have
scoured the digests, online archives, and everything in the
distro.

Can someone please tell me what I'm doing wrong? I am very geeked
to make some high-quality renderings of my fluid dynamics research.

Mark Stock
mstock at umich dot edu