[Radiance-general] Generating alpha channels using vwrays and rtrace

Iebele Abel iabel at iebele.nl
Fri Feb 24 11:24:43 PST 2012


Hi group,

Whilst finding a method to create alpha channels for my rendered image, I'm
playing with vwrays and rtrace. What I intend is to create an image in
which
geometry modified by a particular modifier  is rendered white, whilst the
geometry modified otherwise is rendered black. The command below comes
close to this, it has as output the modifiers for each surface hit:

vwrays -ff -vf test.vp -x 100 -y 100 | rtrace `vwrays -d -vf test.vp -x 100
-y 100`  -ffa -om test.oct  | more

Output of this command is like:
...
floor
floor
floor
window
window
etc...

Now I want that, for example, each occurrence of "window" sends 3 "bright"
RGBE primaries to stdout, and every other string sends 3 "dark" RGBE
primaries to stdout. I can do this by writing a small program (instead of
piping to 'more' as in the example above), but I wondered if there is a
method using native Radiance tools to do it.

In pseudo code (bold) I think about something like this (where 1 represents
a value considered as white in the output, and 0 represents black) :

vwrays -ff -vf test.vp -x 100 -y 100 | rtrace `vwrays -d -vf test.vp -x 100
-y 100`  -ffa -om test.oct  | *if (stdin == "window") fprintf(stdout, "1 1
1" ); else fprintf ( stdout, "0,0,0"); *| ra_tiff - alpha.tif

So my questions are:
1. how do I format the output of stdout as Radiance RGBE?
2. can I do this using native Radiance tools?

Thanks for any hints.

-Iebele
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.radiance-online.org/pipermail/radiance-general/attachments/20120224/72edf292/attachment.html>


More information about the Radiance-general mailing list