[Radiance-general] sky visibility

Ji Zhang hope.zh at gmail.com
Sat Oct 20 02:56:17 PDT 2012


Hi, Lars,

I agree with your suggestion: calculating the number of rays shooting out
from a sensor that can reach the sky directly, and divide the value
obtained by the total number of rays shot. This will give us the percentage
of visible sky or sky exposure for a given sensor.

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.

Is the output of rtrace which is supposed to be piped to rcalc as shown in
your script has only one column of data and each row is the irradiance
value of one of the sensors?

So, the script might be something like:

cat sensors.txt | rtrace -I  -aa XXX  -ab XXX -ad XXX -h -w scene.oct |
rcalc -e '$1=if($1-.00001,1,0); $2=1' | total | rcalc -e '$1=$1/$2' >
results.txt

If that's the case, you're calculating the percentage of sensors that can
see the sky (regardless of the size of sky visible to each sensor), am I
correct?

... or I miss something critical here ...

- Ji



On Sat, Oct 20, 2012 at 4:05 PM, Lars O. Grobe <grobe at gmx.net> wrote:

> Hi Patrick,
>
> Did you consider genklemsamp?
>
> If you just want to not apply the cosine but get either 1 or 0 for rays
> hitting the sky or not, pipe the output from rtrace to rcalc. E.g. sum the
> rays that are above the treshold (0.00001 here) and total number of rays
> traced, and then get the fraction of rays over the treshold using rtrace
> again:
>
> <your rtrace command> | rcalc -e ´$1=if($1-.00001,1,0); $2=1´ | total |
> rcalc -e ´$1=$1/$2´
>
> That could be done using binary floats instead of ascii to make it a bit
> more efficient using proper -if3, -of options for all commands. The same
> can be done on e.g. fisheye images using pcomb.
>
> A general hint, you can also get the surface identifier (-os) at the first
> ray intersection instead of e.g. the radiance value from rtrace and pass
> that through grep.
>
> Cheers, Lars.
>
> ______________________________**_________________
> Radiance-general mailing list
> Radiance-general at radiance-**online.org<Radiance-general at radiance-online.org>
> http://www.radiance-online.**org/mailman/listinfo/radiance-**general<http://www.radiance-online.org/mailman/listinfo/radiance-general>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.radiance-online.org/pipermail/radiance-general/attachments/20121020/784fbe81/attachment.html>


More information about the Radiance-general mailing list