[Radiance-general] sky visibility

giulio antonutto antonutto at yahoo.it
Sat Oct 20 15:09:18 PDT 2012


ok,
setup a view out of the window, with -a.
save the view file.
use vwrays to generate the vectors and starting point to sample the sky
shoot with rtrace
use -av 1 1 1 so that you do not need to have a sky but all glows.
then pipe the rtrace to rcalc and use if($1,1,0)  then total.
the overall number of hits that are recorded is the number of intersection to the model
you need then to check the overall resolution of your image and account for the fact that you should be considering the inner 180 deg. circle.
Sorry have no time to write up this for you, 
but to be fair there is already (and below too) a lot that you could try.
If you have no time to experiment or are simply looking for the easy copy/paste solution amen.
I meant differently.
in any case, all the best
G



On 20 Oct 2012, at 13:46, Ji Zhang <hope.zh at gmail.com> wrote:

> Dear Giulio, appreciate if you can kindly elaborate more on your suggestions ! 
> 
> - Ji
> 
> 
> On Sat, Oct 20, 2012 at 6:09 PM, giulio antonutto <antonutto at yahoo.it> wrote:
> what about vwrays and an angular view?
> then -av 1 1 1, no sky and total - positive = sky
> g
> 
> On 20 Oct 2012, at 10:56, Ji Zhang <hope.zh at gmail.com> wrote:
> 
>> 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
>> http://www.radiance-online.org/mailman/listinfo/radiance-general
>> 
>> _______________________________________________
>> Radiance-general mailing list
>> Radiance-general at radiance-online.org
>> http://www.radiance-online.org/mailman/listinfo/radiance-general
> 
> 
> _______________________________________________
> Radiance-general mailing list
> Radiance-general at radiance-online.org
> http://www.radiance-online.org/mailman/listinfo/radiance-general
> 
> 
> _______________________________________________
> Radiance-general mailing list
> Radiance-general at radiance-online.org
> 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/b8f40fd0/attachment.html>


More information about the Radiance-general mailing list