Irradiation on standing subject with Radiance

Hi,

I am trying to calculate the total radiation on a standing subject using
Radiance rtrace, but I am a bit stuck.

The first approach that comes to mind is to integrate over an idealised
vertical discretized cylinder, but this would be too computationally
expensive. I have to do the same calculation for several locations.

The second approach that comes to mind is to apply a bulk reduction factor,
but this would not be very accurate in the presence of direct radiation or
anisotropic diffuse radiation.

A third way could be to use rtrace to calculate the contribution to the
irradiation from the various sky patches and use the projection factor for
each one of them. As far as I understand though, rtrace provides the total
directional irradiation on an ideal surface placed in the point of interest
and perpendicular to the ray under examination. This corresponds to the
radiation generated from the portion of the sky visible from the surface.

Has anyone tried something similar? Do you have any recommendation?

Thanks
Ruggiero

Hi Ruggiero,

Is the standing subject inside a complex space? Do you need this for an annual simulation?

If the answer to either of these questions is "no," then you can simplify the problem a bit. If the answers are both "yes," then your third option of a daylight coefficient calculation will be the most efficient. You basically want to compute random positions on the cylinder with the surface normal facing outwards, and give these to rcontrib to compute an integrated daylight coefficient for sky patches (and ground).

If you confirm that this is what you need, I can help you with the appropriate command chain if you like.

Cheers,
-Greg

···

From: Ruggiero Guida <[email protected]>
Subject: [Radiance-general] Irradiation on standing subject with Radiance
Date: September 20, 2015 4:06:46 AM PDT

Hi,

I am trying to calculate the total radiation on a standing subject using Radiance rtrace, but I am a bit stuck.

The first approach that comes to mind is to integrate over an idealised vertical discretized cylinder, but this would be too computationally expensive. I have to do the same calculation for several locations.

The second approach that comes to mind is to apply a bulk reduction factor, but this would not be very accurate in the presence of direct radiation or anisotropic diffuse radiation.

A third way could be to use rtrace to calculate the contribution to the irradiation from the various sky patches and use the projection factor for each one of them. As far as I understand though, rtrace provides the total directional irradiation on an ideal surface placed in the point of interest and perpendicular to the ray under examination. This corresponds to the radiation generated from the portion of the sky visible from the surface.

Has anyone tried something similar? Do you have any recommendation?

Thanks
Ruggiero

Thanks Greg,

The subject is inside a complex urban environment and the calculation is
performed for a whole year or fraction of a year. However I need to keep
the hourly granularity because the irradiation information is used to
calculate other comfort parameters.

I would like to avoid the use of a cylinder all together if possible. For
example, for the direct solar radiation, I could simply have:

S_irrad = Id * fp(solar_altitude)

where:

- S_irrad is the irradiation on the subject,
- Id the direct radiation from the the sun
- fp(solar_altitude) the projected area of the subject in the direction of
the sun

My idea is to consider a dome around the subject: if I can calculate the
irradiation contribution for each direction I can then apply the projection
factor to each of these contributions and sum them up. This should give me
the total irradiation falling on the subject.

Thanks
Ruggiero

···

On 20 September 2015 at 23:23, Greg Ward <[email protected]> wrote:

Hi Ruggiero,

Is the standing subject inside a complex space? Do you need this for an
annual simulation?

If the answer to either of these questions is "no," then you can simplify
the problem a bit. If the answers are both "yes," then your third option
of a daylight coefficient calculation will be the most efficient. You
basically want to compute random positions on the cylinder with the surface
normal facing outwards, and give these to rcontrib to compute an integrated
daylight coefficient for sky patches (and ground).

If you confirm that this is what you need, I can help you with the
appropriate command chain if you like.

Cheers,
-Greg

*From: *Ruggiero Guida <[email protected]>

*Subject: *[Radiance-general] Irradiation on standing subject with
Radiance

*Date: *September 20, 2015 4:06:46 AM PDT

Hi,

I am trying to calculate the total radiation on a standing subject using
Radiance rtrace, but I am a bit stuck.

The first approach that comes to mind is to integrate over an idealised
vertical discretized cylinder, but this would be too computationally
expensive. I have to do the same calculation for several locations.

The second approach that comes to mind is to apply a bulk reduction
factor, but this would not be very accurate in the presence of direct
radiation or anisotropic diffuse radiation.

A third way could be to use rtrace to calculate the contribution to the
irradiation from the various sky patches and use the projection factor for
each one of them. As far as I understand though, rtrace provides the total
directional irradiation on an ideal surface placed in the point of interest
and perpendicular to the ray under examination. This corresponds to the
radiation generated from the portion of the sky visible from the surface.

Has anyone tried something similar? Do you have any recommendation?

Thanks
Ruggiero

_______________________________________________
Radiance-general mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general

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

···

From: Ruggiero Guida <[email protected]>
Subject: Re: [Radiance-general] Irradiation on standing subject with Radiance
Date: September 20, 2015 3:24:39 PM PDT

Thanks Greg,

The subject is inside a complex urban environment and the calculation is performed for a whole year or fraction of a year. However I need to keep the hourly granularity because the irradiation information is used to calculate other comfort parameters.

I would like to avoid the use of a cylinder all together if possible. For example, for the direct solar radiation, I could simply have:

S_irrad = Id * fp(solar_altitude)

where:

- S_irrad is the irradiation on the subject,
- Id the direct radiation from the the sun
- fp(solar_altitude) the projected area of the subject in the direction of the sun

My idea is to consider a dome around the subject: if I can calculate the irradiation contribution for each direction I can then apply the projection factor to each of these contributions and sum them up. This should give me the total irradiation falling on the subject.

Thanks
Ruggiero

On 20 September 2015 at 23:23, Greg Ward <[email protected]> wrote:
Hi Ruggiero,

Is the standing subject inside a complex space? Do you need this for an annual simulation?

If the answer to either of these questions is "no," then you can simplify the problem a bit. If the answers are both "yes," then your third option of a daylight coefficient calculation will be the most efficient. You basically want to compute random positions on the cylinder with the surface normal facing outwards, and give these to rcontrib to compute an integrated daylight coefficient for sky patches (and ground).

If you confirm that this is what you need, I can help you with the appropriate command chain if you like.

Cheers,
-Greg

From: Ruggiero Guida <[email protected]>
Subject: [Radiance-general] Irradiation on standing subject with Radiance
Date: September 20, 2015 4:06:46 AM PDT

Hi,

I am trying to calculate the total radiation on a standing subject using Radiance rtrace, but I am a bit stuck.

The first approach that comes to mind is to integrate over an idealised vertical discretized cylinder, but this would be too computationally expensive. I have to do the same calculation for several locations.

The second approach that comes to mind is to apply a bulk reduction factor, but this would not be very accurate in the presence of direct radiation or anisotropic diffuse radiation.

A third way could be to use rtrace to calculate the contribution to the irradiation from the various sky patches and use the projection factor for each one of them. As far as I understand though, rtrace provides the total directional irradiation on an ideal surface placed in the point of interest and perpendicular to the ray under examination. This corresponds to the radiation generated from the portion of the sky visible from the surface.

Has anyone tried something similar? Do you have any recommendation?

Thanks
Ruggiero

_______________________________________________
Radiance-general mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general

_______________________________________________
Radiance-general mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general

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?

···

Sent from Outlook

    _____________________________
From: Greg Ward <[email protected]>
Sent: Monday, September 21, 2015 10:52 a.m.
Subject: Re: [Radiance-general] Irradiation on standing subject with Radiance
To: Radiance general discussion <[email protected]>

       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
     
From: Ruggiero Guida <[email protected]>

Subject: Re: [Radiance-general] Irradiation on standing subject with Radiance

Date: September 20, 2015 3:24:39 PM PDT

            Thanks Greg,
             The subject is inside a complex urban environment and the calculation is performed for a whole year or fraction of a year. However I need to keep the hourly granularity because the irradiation information is used to calculate other comfort parameters.
             I would like to avoid the use of a cylinder all together if possible. For example, for the direct solar radiation, I could simply have:
             S_irrad = Id * fp(solar_altitude)
             where:
             - S_irrad is the irradiation on the subject, - Id the direct radiation from the the sun - fp(solar_altitude) the projected area of the subject in the direction of the sun
             My idea is to consider a dome around the subject: if I can calculate the irradiation contribution for each direction I can then apply the projection factor to each of these contributions and sum them up. This should give me the total irradiation falling on the subject.
             Thanks Ruggiero
             
         On 20 September 2015 at 23:23, Greg Ward <[email protected]> wrote:
                          Hi Ruggiero,
                      Is the standing subject inside a complex space? Do you need this for an annual simulation?
                      If the answer to either of these questions is "no," then you can simplify the problem a bit. If the answers are both "yes," then your third option of a daylight coefficient calculation will be the most efficient. You basically want to compute random positions on the cylinder with the surface normal facing outwards, and give these to rcontrib to compute an integrated daylight coefficient for sky patches (and ground).
                      If you confirm that this is what you need, I can help you with the appropriate command chain if you like.
                      Cheers, -Greg
               
From: Ruggiero Guida <[email protected]>

Subject: [Radiance-general] Irradiation on standing subject with Radiance

Date: September 20, 2015 4:06:46 AM PDT

                                                     Hi,
                                  I am trying to calculate the total radiation on a standing subject using Radiance rtrace, but I am a bit stuck.
                                  The first approach that comes to mind is to integrate over an idealised vertical discretized cylinder, but this would be too computationally expensive. I have to do the same calculation for several locations.
                                  The second approach that comes to mind is to apply a bulk reduction factor, but this would not be very accurate in the presence of direct radiation or anisotropic diffuse radiation.
                                  A third way could be to use rtrace to calculate the contribution to the irradiation from the various sky patches and use the projection factor for each one of them. As far as I understand though, rtrace provides the total directional irradiation on an ideal surface placed in the point of interest and perpendicular to the ray under examination. This corresponds to the radiation generated from the portion of the sky visible from the surface.
                                  Has anyone tried something similar? Do you have any recommendation?
                                  Thanks Ruggiero
_______________________________________________
Radiance-general mailing list
       [email protected]
       http://www.radiance-online.org/mailman/listinfo/radiance-general
       
    _______________________________________________
Radiance-general mailing list
   [email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general

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 <[email protected]>
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 <[email protected]>
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

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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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

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" <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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

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 <[email protected]> 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" <[email protected]>

*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 <[email protected]>

*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 <[email protected]>

*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 <[email protected]>
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
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general

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 <[email protected]> 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 <[email protected]> > 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" <[email protected]>

*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 <[email protected]>

*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 <[email protected]>

*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 <[email protected]>
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
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general

Hi Ruggiero,

As given, your command:

  rcontrib -c 105 -I+ -f tregenza.cal -m skyglow -m groundglow test.oct < samps.txt > daycoef.mtx

does average 105 irradiance positions, taken them in sequence from samps.txt. I assume this contains exactly 105 random sample positions & directions.

The output will not be Tregenza sky patches, because you are missing some needed options. If you want your ground average to precede your 145 Tregenza patches in your matrix, then use the following order:

  rcontrib -c 105 -y 1 -I+ -f tregenza.cal -m groundglow -b tbin -bn 145 -m skyglow test.oct < samps.txt > daycoef.mtx

The above process can in fact be simplified by merging your ground.rad and sky.rad files with some comments like so:

<combined_sky.rad>
# Combined ground and sky vault for calculating cylindrical irradiance

# Start by telling rfluxmtx to generate a single coefficient for the ground:
#@rfluxmtx h=u

void glow groundglow
0 0 4 .8 1.1 .8 0
groundglow source ground
0 0 4 0 0 -1 180

# Now, tell rfluxmtx to generate a set of Tregenza sky patches using Y for "north/up":
#@rfluxmtx h=t u=+Y

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

···

------------------
Notice how I took out the actual sky distribution, which you don't need for a coefficient calculation. (It would make no difference to the results in fact.)

Then, you can then use rfluxmtx to call oconv and rcontrib for you:

  rfluxmtx -c 105 -y 1 - combined_sky.rad < samps.txt > daycoef.mtx

Note that the lone hyphen ("-") tells rfluxmtx to read from its standard input, and must be given as shown above. Assuming you have just 105 positions in samps.txt, I've specified -y 1, so that the output matrix has both its dimensions set properly.

Once you have the above matrix, you can multiply it against any sky vector to get the desired cylindrical irradiance:

  gendaylit [options] | genskyvec | dctimestep daycoef.mtx

The above command should produce a single RGB triplet corresponding to the cylindrical irradiance with the given sky.

Cheers,
-Greg

From: Ruggiero Guida <[email protected]>
Subject: Re: [Radiance-general] Irradiation on standing subject with Radiance
Date: March 3, 2016 12:35:35 AM PST

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

Thanks a lot for your help Greg,

Yes, my samps.txt has exactly 105 lines with point and direction.

When I run your command

rcontrib -c 105 -y 1 -I+ -f tregenza.cal -m groundglow -b tbin -bn 145 -m
skyglow test.oct < samps.txt > daycoef.mtx

I get a daycoef.mtx with the correct number of elements of which only the
first is not zero. Am I missing something? I have double check the sky and
ground file and they are correct.

Thanks again
Ruggiero

···

On Thu, 3 Mar 2016 at 20:26 Greg Ward <[email protected]> wrote:

Hi Ruggiero,

As given, your command:

rcontrib -c 105 -I+ -f tregenza.cal -m skyglow -m groundglow test.oct <
samps.txt > daycoef.mtx

does average 105 irradiance positions, taken them in sequence from
samps.txt. I assume this contains exactly 105 random sample positions &
directions.

The output will not be Tregenza sky patches, because you are missing some
needed options. If you want your ground average to precede your 145
Tregenza patches in your matrix, then use the following order:

rcontrib -c 105 -y 1 -I+ -f tregenza.cal -m groundglow -b tbin -bn 145 -m
skyglow test.oct < samps.txt > daycoef.mtx

The above process can in fact be simplified by merging your ground.rad and
sky.rad files with some comments like so:

<combined_sky.rad>
# Combined ground and sky vault for calculating cylindrical irradiance

# Start by telling rfluxmtx to generate a single coefficient for the
ground:
#@rfluxmtx h=u

void glow groundglow
0 0 4 .8 1.1 .8 0
groundglow source ground
0 0 4 0 0 -1 180

# Now, tell rfluxmtx to generate a set of Tregenza sky patches using Y for
"north/up":
#@rfluxmtx h=t u=+Y

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

------------------
Notice how I took out the actual sky distribution, which you don't need
for a coefficient calculation. (It would make no difference to the results
in fact.)

Then, you can then use rfluxmtx to call oconv and rcontrib for you:

rfluxmtx -c 105 -y 1 - combined_sky.rad < samps.txt > daycoef.mtx

Note that the lone hyphen ("-") tells rfluxmtx to read from its standard
input, and must be given as shown above. Assuming you have just 105
positions in samps.txt, I've specified -y 1, so that the output matrix has
both its dimensions set properly.

Once you have the above matrix, you can multiply it against any sky vector
to get the desired cylindrical irradiance:

gendaylit [options] | genskyvec | dctimestep daycoef.mtx

The above command should produce a single RGB triplet corresponding to the
cylindrical irradiance with the given sky.

Cheers,
-Greg

*From: *Ruggiero Guida <[email protected]>

*Subject: *Re: [Radiance-general] Irradiation on standing subject with
Radiance

*Date: *March 3, 2016 12:35:35 AM PST

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

_______________________________________________
Radiance-general mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general

This was my mistake. I forgot to include the -I+ option on the rfluxmtx command line, which should have been:

  rfluxmtx -I+ -v -c 105 -y 1 - combined_sky.rad < samps.txt > daycoef.mtx

(I also added a "-v" above so you can see how it's calling rcontrib.)

Cheers,
-Greg

···

From: Ruggiero Guida <[email protected]>
Subject: Re: [Radiance-general] Irradiation on standing subject with Radiance
Date: March 4, 2016 5:24:58 AM PST

Thanks a lot for your help Greg,

Yes, my samps.txt has exactly 105 lines with point and direction.

When I run your command

rcontrib -c 105 -y 1 -I+ -f tregenza.cal -m groundglow -b tbin -bn 145 -m skyglow test.oct < samps.txt > daycoef.mtx

I get a daycoef.mtx with the correct number of elements of which only the first is not zero. Am I missing something? I have double check the sky and ground file and they are correct.

Thanks again
Ruggiero

On Thu, 3 Mar 2016 at 20:26 Greg Ward <[email protected]> wrote:
Hi Ruggiero,

As given, your command:

  rcontrib -c 105 -I+ -f tregenza.cal -m skyglow -m groundglow test.oct < samps.txt > daycoef.mtx

does average 105 irradiance positions, taken them in sequence from samps.txt. I assume this contains exactly 105 random sample positions & directions.

The output will not be Tregenza sky patches, because you are missing some needed options. If you want your ground average to precede your 145 Tregenza patches in your matrix, then use the following order:

  rcontrib -c 105 -y 1 -I+ -f tregenza.cal -m groundglow -b tbin -bn 145 -m skyglow test.oct < samps.txt > daycoef.mtx

The above process can in fact be simplified by merging your ground.rad and sky.rad files with some comments like so:

<combined_sky.rad>
# Combined ground and sky vault for calculating cylindrical irradiance

# Start by telling rfluxmtx to generate a single coefficient for the ground:
#@rfluxmtx h=u

void glow groundglow
0 0 4 .8 1.1 .8 0
groundglow source ground
0 0 4 0 0 -1 180

# Now, tell rfluxmtx to generate a set of Tregenza sky patches using Y for "north/up":
#@rfluxmtx h=t u=+Y

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

------------------
Notice how I took out the actual sky distribution, which you don't need for a coefficient calculation. (It would make no difference to the results in fact.)

Then, you can then use rfluxmtx to call oconv and rcontrib for you:

  rfluxmtx -c 105 -y 1 - combined_sky.rad < samps.txt > daycoef.mtx

Note that the lone hyphen ("-") tells rfluxmtx to read from its standard input, and must be given as shown above. Assuming you have just 105 positions in samps.txt, I've specified -y 1, so that the output matrix has both its dimensions set properly.

Once you have the above matrix, you can multiply it against any sky vector to get the desired cylindrical irradiance:

  gendaylit [options] | genskyvec | dctimestep daycoef.mtx

The above command should produce a single RGB triplet corresponding to the cylindrical irradiance with the given sky.

Cheers,
-Greg

From: Ruggiero Guida <[email protected]>
Subject: Re: [Radiance-general] Irradiation on standing subject with Radiance
Date: March 3, 2016 12:35:35 AM PST

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

_______________________________________________
Radiance-general mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general
_______________________________________________
Radiance-general mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general

Thanks a lot Greg. It works now!

···

On Fri, 4 Mar 2016 at 16:26 Greg Ward <[email protected]> wrote:

This was my mistake. I forgot to include the -I+ option on the rfluxmtx
command line, which should have been:

rfluxmtx -I+ -v -c 105 -y 1 - combined_sky.rad < samps.txt > daycoef.mtx

(I also added a "-v" above so you can see how it's calling rcontrib.)

Cheers,
-Greg

*From: *Ruggiero Guida <[email protected]>

*Subject: *Re: [Radiance-general] Irradiation on standing subject with
Radiance

*Date: *March 4, 2016 5:24:58 AM PST

Thanks a lot for your help Greg,

Yes, my samps.txt has exactly 105 lines with point and direction.

When I run your command

rcontrib -c 105 -y 1 -I+ -f tregenza.cal -m groundglow -b tbin -bn 145 -m
skyglow test.oct < samps.txt > daycoef.mtx

I get a daycoef.mtx with the correct number of elements of which only the
first is not zero. Am I missing something? I have double check the sky and
ground file and they are correct.

Thanks again
Ruggiero

On Thu, 3 Mar 2016 at 20:26 Greg Ward <[email protected]> wrote:

Hi Ruggiero,

As given, your command:

rcontrib -c 105 -I+ -f tregenza.cal -m skyglow -m groundglow test.oct <
samps.txt > daycoef.mtx

does average 105 irradiance positions, taken them in sequence from
samps.txt. I assume this contains exactly 105 random sample positions &
directions.

The output will not be Tregenza sky patches, because you are missing some
needed options. If you want your ground average to precede your 145
Tregenza patches in your matrix, then use the following order:

rcontrib -c 105 -y 1 -I+ -f tregenza.cal -m groundglow -b tbin -bn 145 -m
skyglow test.oct < samps.txt > daycoef.mtx

The above process can in fact be simplified by merging your ground.rad
and sky.rad files with some comments like so:

<combined_sky.rad>
# Combined ground and sky vault for calculating cylindrical irradiance

# Start by telling rfluxmtx to generate a single coefficient for the
ground:
#@rfluxmtx h=u

void glow groundglow
0 0 4 .8 1.1 .8 0
groundglow source ground
0 0 4 0 0 -1 180

# Now, tell rfluxmtx to generate a set of Tregenza sky patches using Y
for "north/up":
#@rfluxmtx h=t u=+Y

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

------------------
Notice how I took out the actual sky distribution, which you don't need
for a coefficient calculation. (It would make no difference to the results
in fact.)

Then, you can then use rfluxmtx to call oconv and rcontrib for you:

rfluxmtx -c 105 -y 1 - combined_sky.rad < samps.txt > daycoef.mtx

Note that the lone hyphen ("-") tells rfluxmtx to read from its standard
input, and must be given as shown above. Assuming you have just 105
positions in samps.txt, I've specified -y 1, so that the output matrix has
both its dimensions set properly.

Once you have the above matrix, you can multiply it against any sky
vector to get the desired cylindrical irradiance:

gendaylit [options] | genskyvec | dctimestep daycoef.mtx

The above command should produce a single RGB triplet corresponding to
the cylindrical irradiance with the given sky.

Cheers,
-Greg

*From: *Ruggiero Guida <[email protected]>

*Subject: *Re: [Radiance-general] Irradiation on standing subject with
Radiance

*Date: *March 3, 2016 12:35:35 AM PST

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

_______________________________________________
Radiance-general mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general

_______________________________________________
Radiance-general mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general

_______________________________________________
Radiance-general mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general