[Radiance-general] Irradiation on standing subject with Radiance

Ruggiero Guida ruggiero.guida at gmail.com
Thu Mar 3 00:35:35 PST 2016


Hi Greg,

I finally managed to have a look at this problem again.

To begin with I was starting with a basic case: just sky and ground.

<sky.rad>
void light solar
0 0 3 5.326e+06 5.326e+06 5.326e+06

solar source sun
0 0 4 0.463565 0.022184 0.885785 0.533000

void brightfunc skyfunc
2 skybright perezlum.cal
0 10 5.802e+01 4.447e+01 -0.843574 -1.078181 11.876231 -3.091220 0.271617
0.463565 0.022184 0.885785

skyfunc glow sky_glow
0 0 4    1 1 1 0
sky_glow source sky
0 0 4    0 0 1 180

<ground.rad>
skyfunc glow groundglow
0 0 4 .8 1.1 .8  0
groundglow source ground
0 0 4 0 0 -1  180

I then generate the scene with

oconv materials.rad sky.rad ground.rad > test.oct

Let's suppose I want to calculate the contributions on the subject from a
tregenza subdivision I would use

rcontrib -c 105 -I+ -f tregenza.cal -m skyglow -m groundglow test.oct <
samps.txt > daycoef.mtx
This is my understanding of this command.

1 - For each of the 105 random points
2 - create a tregenza dome subdivision
3 - calculate all the contributions from groundglow and skyglow and add
them up (this considers the cosine between the normal of the point and the
patch vector)
4 - finally average all the results for the 105 points.

Does this make any sense? How would I obtain the actual matrix?

Thanks
Ruggiero







On Tue, 22 Sep 2015 at 05:46 Ruggiero Guida <ruggiero.guida at gmail.com>
wrote:

> Thanks Greg. Really appreciate it. Let me digest it, test it and I will
> report back.
>
> Cheers
>
> On 22 September 2015 at 03:02, Gregory J. Ward <gregoryjward at gmail.com>
> wrote:
>
>> Oh, and be sure to use the rcontrib -I+ option.  Corrected version
>> immediately below.
>>
>> # Generate 5 random sample positions on cap at height 2 with radius 0.2:
>>
>> cnt 5 | rcalc -e 'HT:2;RAD:0.2' \
>> -e
>> 'rrad=RAD*sqrt(rand(.836*recno+.238));phi=2*PI*rand(-.3582*recno+.861);' \
>> -e '$1=rrad*cos(phi);$2=rrad*sin(phi);$3=HT;$4=0;$5=0;$6=1' > samps.txt
>>
>> # Generate 100 random body sample positions and directions:
>>
>> cnt 100 | rcalc -e 'HT:2;RAD:0.2' \
>> -e 'rht=HT*rand(.571*recno-.7633);phi=2*PI*rand(-.6716*recno-.1023)' \
>> -e '$1=RAD*cos(phi);$2=RAD*sin(phi);$3=rht;$4=cos(phi);$5=sin(phi);$6=0'
>> >> samps.txt
>>
>> # average together 55 sample positions using rcontrib:
>>
>> rcontrib -c 105 -I+ [other options] scene.oct < samps.txt > daycoef.mtx
>>
>> ============
>>
>> *From: *"Gregory J. Ward" <gregoryjward at gmail.com>
>>
>> *Date: *September 21, 2015 11:54:14 AM PDT
>>
>>
>> P.S.  I just realized that to be a fair average, the number of samples on
>> the cap should be proportional to the area, and same for the body.  A cap
>> of radius 0.2 is 1/20th as large as the cylinder body of height 2, so in my
>> example, there should be 20 times more samples on the body.  That means 5
>> samples on the cap would be paired with 100 samples on the body, or 105
>> samples in total.
>>
>> -Greg
>>
>> *From: *Greg Ward <gward at lmi.net>
>>
>> *Subject: *Re: [Radiance-general] Irradiation on standing subject with
>> Radiance
>>
>> *Date: *September 21, 2015 11:50:28 AM PDT
>>
>>
>> Hi Ruggiero,
>>
>> I don't think the number of points is going to affect your rcontrib
>> calculation that much.  You can always trade off the number of ambient
>> divisions (-ad) to get more samples on the prism (or cylinder) for the same
>> cost.  Here's an example set of commands.
>>
>> # Generate 5 random sample positions on cap at height 2 with radius 0.2:
>>
>> cnt 5 | rcalc -e 'HT:2;RAD:0.2' \
>> -e
>> 'rrad=RAD*sqrt(rand(.836*recno+.238));phi=2*PI*rand(-.3582*recno+.861);' \
>> -e '$1=rrad*cos(phi);$2=rrad*sin(phi);$3=HT;$4=0;$5=0;$6=1' > samps.txt
>>
>> # Generate 50 random body sample positions and directions:
>>
>> cnt 50 | rcalc -e 'HT:2;RAD:0.2' \
>> -e 'rht=HT*rand(.571*recno-.7633);phi=2*PI*rand(-.6716*recno-.1023)' \
>> -e '$1=RAD*cos(phi);$2=RAD*sin(phi);$3=rht;$4=cos(phi);$5=sin(phi);$6=0'
>> >> samps.txt
>>
>> # average together 55 sample positions using rcontrib:
>>
>> rcontrib -c 55 [other options] scene.oct < samps.txt > daycoef.mtx
>>
>> Does this make sense?
>>
>> -Greg
>>
>> *From: *Ruggiero Guida <ruggiero.guida at gmail.com>
>>
>> *Date: *September 21, 2015 1:45:20 AM PDT
>>
>>
>> That makes sense. So I guess that the third approach is the only way
>> forward.
>>
>> I was thinking to define the subject as a prism with a rectangular base
>> and maybe define a point or two for each face, so 5 points in total.
>>
>> Do you think this would be enough?
>>
>> _____________________________
>> From: Greg Ward <gregoryjward at gmail.com>
>> Sent: Monday, September 21, 2015 10:52 a.m.
>>
>> Well, the projected area of a cylinder is roughly the diameter times the
>> height times the sine of the angle between the cylinder's axis and the sky
>> patch (or solar disk) direction.  This would work if you didn't have the
>> complex urban surroundings.  With the surroundings, there's no way I know
>> to avoid a more complete view factor calculation, which is what rcontrib
>> gives you.
>>
>> -Greg
>>
>>
>> _______________________________________________
>> 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/20160303/111f1efc/attachment.html>


More information about the Radiance-general mailing list