[Radiance-general] sky visibility

Lars O. Grobe grobe at gmx.net
Sun Oct 21 07:34:36 PDT 2012


Hi!
> However, if I understand correctly, the output of rtrace is a file, 
> within which each row indicating the xyz coordinates and rgb 
> irradiance of a given sensor.
I'd suggest to any Radiance user to thoroughly read the rtrace manpage. 
Especially the part about output (-o...). rtrace is NOT only returning 
radiance, irradiance or contribution coefficients. It can output 
information about the first ray intersection, as well as intersection of 
daughter rays, with geometry in your scene. This may be coordinates, 
directions, lengths, surface identifiers, materials and modifiers, ... 
And the output is not a file but a stream of data, which, piped into 
other tools such as rcalc, grep, sed, ... can be processed further. 
Maybe even into input for the next rtrace process.

Giulio was proposing something similar, but relying on an image format. 
You could, again, use my rcalc line with his approach to get both the 
number of rays intersecting with geometry and the total number of rays:

$1=if($1,1,0) sets all pixels (rays) to one if they are above 0 (meaning 
they hit some geometry, as you have no light source but only 
self-glowing geometry).

$2=1 sets the second value to 1 for any pixels (rays) regardless they 
hit geometry or not.

So rcalc -e ´$1=if($1,1,0); $2=1´ | total would result in two values, 
first the number of pixels (rays) hitting geometry, second the total 
number of pixels sent. The fraction is what you need. The input for this 
rcalc command can be from vwrays | racalc, rpict or anything else 
shooting rays into a hemisphere...

The more interesting question may be whether it is enough to trace from 
only one point on your window. Maybe you want several random sampling 
positions on the window pane.

Cheers, Lars.



More information about the Radiance-general mailing list