Reduce rtrace runtime

Hello experts:

I hope to calculate illuminance at 4 points in a office under four 100 sky
conditions (each condition will generate four illuminance values). I run
rtrace in a computer with 4 processors and use: rtrace -w -h -I -ab 7 -n 4
-af cachingFile.ca -ad 2048 -as 512 -aa 0.10 office.oct < points.inp | rcalc
-e '$1=47.4*$1+ 120*$2+11.6*$3'>> output.out.

I tried to run it but it took long time. My question is that whether there
are ways of improving the rtrace command to reduce the runtime?

Cheers,
Jia

Computing seven bounces (-ab 7) is very expensive, even for a small number of points. You end up filling the indirect irradiance cache, which takes some time even on 4 processors. I would recommend either reducing the number of bounces, or taking advantage of a path tracing approach like so:

  rtrace -w -h -I -ab 7 -n 4 -ad 2048 -as 0 -aa 0 -lw 1e-5 -lr -10 -u+ office.oct < points.inp

Setting -aa 0 and -lw 1e-4 limits the number of paths to roughly 100,000 per point, which should run pretty quickly while maintaining accuracy.

Best,
-Greg

···

From: Jia Hu <[email protected]>
Date: August 30, 2010 6:11:21 PM PDT

Hello experts:

I hope to calculate illuminance at 4 points in a office under four 100 sky conditions (each condition will generate four illuminance values). I run rtrace in a computer with 4 processors and use: rtrace -w -h -I -ab 7 -n 4 -af cachingFile.ca -ad 2048 -as 512 -aa 0.10 office.oct < points.inp | rcalc -e '$1=47.4*$1+ 120*$2+11.6*$3'>> output.out.

I tried to run it but it took long time. My question is that whether there are ways of improving the rtrace command to reduce the runtime?

Cheers,
Jia

Hello Greg:

Because there are blinds in the office and the rays are only from the
outside sky (no light source in the office), is your approach still accurate
enough in this case? I am not familiar with this approach. Does your book,
Rendering with Radiance, have some introductions to such options as "lr"
"lw". I checked the last several chapters and did not find "lr" and "lw".
Thanks,
Jia

···

On Mon, Aug 30, 2010 at 9:55 PM, Greg Ward <[email protected]> wrote:

Computing seven bounces (-ab 7) is very expensive, even for a small number
of points. You end up filling the indirect irradiance cache, which takes
some time even on 4 processors. I would recommend either reducing the
number of bounces, or taking advantage of a path tracing approach like so:

       rtrace -w -h -I -ab 7 -n 4 -ad 2048 -as 0 -aa 0 -lw 1e-5 -lr -10
-u+ office.oct < points.inp

Setting -aa 0 and -lw 1e-4 limits the number of paths to roughly 100,000
per point, which should run pretty quickly while maintaining accuracy.

Best,
-Greg

> From: Jia Hu <[email protected]>
> Date: August 30, 2010 6:11:21 PM PDT
>
> Hello experts:
>
> I hope to calculate illuminance at 4 points in a office under four 100
sky conditions (each condition will generate four illuminance values). I run
rtrace in a computer with 4 processors and use: rtrace -w -h -I -ab 7 -n 4
-af cachingFile.ca -ad 2048 -as 512 -aa 0.10 office.oct < points.inp |
rcalc -e '$1=47.4*$1+ 120*$2+11.6*$3'>> output.out.
>
> I tried to run it but it took long time. My question is that whether
there are ways of improving the rtrace command to reduce the runtime?
>
> Cheers,
> Jia

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

The options I am recommending are more recent than RwR, which was current as of 1998. Path tracing is faster for computing just a few points like this, especially in the presence of venetian blinds. The negative value for the -lr option is discussed in my presentation from the 2005 Radiance workshop, I discussed these options as they were added to release 3.7:

  http://www.radiance-online.org/radiance-workshop4/cd/website/PDF/Ward_talk1.pdf

Best,
-Greg

···

From: Jia Hu <[email protected]>
Date: August 30, 2010 7:36:34 PM PDT

Hello Greg:

Because there are blinds in the office and the rays are only from the outside sky (no light source in the office), is your approach still accurate enough in this case? I am not familiar with this approach. Does your book, Rendering with Radiance, have some introductions to such options as "lr" "lw". I checked the last several chapters and did not find "lr" and "lw".
Thanks,
Jia
On Mon, Aug 30, 2010 at 9:55 PM, Greg Ward <[email protected]> wrote:
Computing seven bounces (-ab 7) is very expensive, even for a small number of points. You end up filling the indirect irradiance cache, which takes some time even on 4 processors. I would recommend either reducing the number of bounces, or taking advantage of a path tracing approach like so:

       rtrace -w -h -I -ab 7 -n 4 -ad 2048 -as 0 -aa 0 -lw 1e-5 -lr -10 -u+ office.oct < points.inp

Setting -aa 0 and -lw 1e-4 limits the number of paths to roughly 100,000 per point, which should run pretty quickly while maintaining accuracy.

Best,
-Greg

Thank you. I really appreciate your help.

Jia

···

On Mon, Aug 30, 2010 at 11:34 PM, Greg Ward <[email protected]> wrote:

The options I am recommending are more recent than RwR, which was current
as of 1998. Path tracing is faster for computing just a few points like
this, especially in the presence of venetian blinds. The negative value for
the -lr option is discussed in my presentation from the 2005 Radiance
workshop, I discussed these options as they were added to release 3.7:

http://www.radiance-online.org/radiance-workshop4/cd/website/PDF/Ward_talk1.pdf

Best,
-Greg

> From: Jia Hu <[email protected]>
> Date: August 30, 2010 7:36:34 PM PDT
>
> Hello Greg:
>
> Because there are blinds in the office and the rays are only from the
outside sky (no light source in the office), is your approach still accurate
enough in this case? I am not familiar with this approach. Does your book,
Rendering with Radiance, have some introductions to such options as "lr"
"lw". I checked the last several chapters and did not find "lr" and "lw".
> Thanks,
> Jia
> On Mon, Aug 30, 2010 at 9:55 PM, Greg Ward <[email protected]> > wrote:
> Computing seven bounces (-ab 7) is very expensive, even for a small
number of points. You end up filling the indirect irradiance cache, which
takes some time even on 4 processors. I would recommend either reducing the
number of bounces, or taking advantage of a path tracing approach like so:
>
> rtrace -w -h -I -ab 7 -n 4 -ad 2048 -as 0 -aa 0 -lw 1e-5 -lr -10
-u+ office.oct < points.inp
>
> Setting -aa 0 and -lw 1e-4 limits the number of paths to roughly 100,000
per point, which should run pretty quickly while maintaining accuracy.
>
> Best,
> -Greg
>
>

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

Hello Greg:

The speed is pretty fast. But I found there was a 10% difference sometimes
even if I use the following command (ab=8 and ad = 4096). Should I further
decrease lw to reduce the variance between each run?

rtrace -w -h -I -ab 8 -n 4 -ad 4096 -as 0 -aa 0 -lw 1e-5 -lr -10 -u+
office.oct < points.inp

Thanks,
Jia

···

On Mon, Aug 30, 2010 at 9:55 PM, Greg Ward <[email protected]> wrote:

Computing seven bounces (-ab 7) is very expensive, even for a small number
of points. You end up filling the indirect irradiance cache, which takes
some time even on 4 processors. I would recommend either reducing the
number of bounces, or taking advantage of a path tracing approach like so:

       rtrace -w -h -I -ab 7 -n 4 -ad 2048 -as 0 -aa 0 -lw 1e-5 -lr -10
-u+ office.oct < points.inp

Setting -aa 0 and -lw 1e-4 limits the number of paths to roughly 100,000
per point, which should run pretty quickly while maintaining accuracy.

Best,
-Greg

> From: Jia Hu <[email protected]>
> Date: August 30, 2010 6:11:21 PM PDT
>
> Hello experts:
>
> I hope to calculate illuminance at 4 points in a office under four 100
sky conditions (each condition will generate four illuminance values). I run
rtrace in a computer with 4 processors and use: rtrace -w -h -I -ab 7 -n 4
-af cachingFile.ca -ad 2048 -as 512 -aa 0.10 office.oct < points.inp |
rcalc -e '$1=47.4*$1+ 120*$2+11.6*$3'>> output.out.
>
> I tried to run it but it took long time. My question is that whether
there are ways of improving the rtrace command to reduce the runtime?
>
> Cheers,
> Jia

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

You don't say which way the differences go. Are they consistently higher or lower? If higher, then you may be getting a more accurate result from the path tracing method due to Russian-roulette termination. If the path tracing results are lower, then you may need to decrease the -aw value further.

To answer your earlier quesiton, the -lr setting should be greater (in absolute value) than the -ab setting. They are similar. The reason a separate -ab setting is provided is because indirect irradiance is much more expensive to compute than other types of reflection, such as specular rays that do not create multiple branches in the ray tree.

Best,
-Greg

···

From: Jia Hu <[email protected]>
Date: August 31, 2010 7:01:25 AM PDT

Hello Greg:

The speed is pretty fast. But I found there was a 10% difference sometimes even if I use the following command (ab=8 and ad = 4096). Should I further decrease lw to reduce the variance between each run?

rtrace -w -h -I -ab 8 -n 4 -ad 4096 -as 0 -aa 0 -lw 1e-5 -lr -10 -u+ office.oct < points.inp

Thanks,
Jia

---------

From: Jia Hu <[email protected]>
Date: August 30, 2010 10:42:45 PM PDT

Hello:

Radiance works by calculating three parts, direct, specular and indirect. ab determines the number of ambient bounces (indirect part). But ab has a similar meaning with "lr". What is the difference between them? Is that right lr (positive) should be larger than ab?

As always, thank you,
Jia

Hello Greg:

For example, for the sky same conditions, I run twice and the results are as
follows (each means illuminance of a point). The sky luminance distribution
is generated by the gendaylit program.

MM:1-DD:2-Hour:9-Angle:0
802.381766
614.023063
395.616407
319.185386
MM:1-DD:2-Hour:9-Angle:0
907.889248 (larger than 802)
614.848339
393.397623
294.201388 (smaller than 319)

Cheers,
Jia

···

On Tue, Aug 31, 2010 at 11:28 AM, Greg Ward <[email protected]> wrote:

You don't say which way the differences go. Are they consistently higher
or lower? If higher, then you may be getting a more accurate result from
the path tracing method due to Russian-roulette termination. If the path
tracing results are lower, then you may need to decrease the -aw value
further.

To answer your earlier quesiton, the -lr setting should be greater (in
absolute value) than the -ab setting. They are similar. The reason a
separate -ab setting is provided is because indirect irradiance is much more
expensive to compute than other types of reflection, such as specular rays
that do not create multiple branches in the ray tree.

Best,
-Greg

> From: Jia Hu <[email protected]>
> Date: August 31, 2010 7:01:25 AM PDT
>
> Hello Greg:
>
> The speed is pretty fast. But I found there was a 10% difference
sometimes even if I use the following command (ab=8 and ad = 4096). Should I
further decrease lw to reduce the variance between each run?
>
> rtrace -w -h -I -ab 8 -n 4 -ad 4096 -as 0 -aa 0 -lw 1e-5 -lr -10 -u+
office.oct < points.inp
>
> Thanks,
> Jia

---------
> From: Jia Hu <[email protected]>
> Date: August 30, 2010 10:42:45 PM PDT
>
> Hello:
>
> Radiance works by calculating three parts, direct, specular and indirect.
ab determines the number of ambient bounces (indirect part). But ab has a
similar meaning with "lr". What is the difference between them? Is that
right lr (positive) should be larger than ab?
>
> As always, thank you,
> Jia

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

OK, you are talking about run-to-run consistency. We need to be clear on these things.

Try decreasing the -lw setting as I recommended to see how this affects run-to-run differences. There will always be some random variation, especially using the -u+ setting, but on average these should decrease with increasing calculation times.

Best,
-Greg

···

From: Jia Hu <[email protected]>
Date: August 31, 2010 8:47:50 AM PDT

Hello Greg:

For example, for the sky same conditions, I run twice and the results are as follows (each means illuminance of a point). The sky luminance distribution is generated by the gendaylit program.

MM:1-DD:2-Hour:9-Angle:0
802.381766
614.023063
395.616407
319.185386
MM:1-DD:2-Hour:9-Angle:0
907.889248 (larger than 802)
614.848339
393.397623
294.201388 (smaller than 319)

Cheers,
Jia

Hello:

I report the progress. I decrease -lw to 1e-6 and -lr to -12. The results
seem consistent enough. If I only change lr to -15 or only -lw to 1e-6, the
consistence still exists. So, should I change both?

Thanks,

Jia

···

On Tue, Aug 31, 2010 at 12:11 PM, Greg Ward <[email protected]> wrote:

OK, you are talking about run-to-run consistency. We need to be clear on
these things.

Try decreasing the -lw setting as I recommended to see how this affects
run-to-run differences. There will always be some random variation,
especially using the -u+ setting, but on average these should decrease with
increasing calculation times.

Best,
-Greg

> From: Jia Hu <[email protected]>
> Date: August 31, 2010 8:47:50 AM PDT
>
> Hello Greg:
>
> For example, for the sky same conditions, I run twice and the results are
as follows (each means illuminance of a point). The sky luminance
distribution is generated by the gendaylit program.
>
> MM:1-DD:2-Hour:9-Angle:0
> 802.381766
> 614.023063
> 395.616407
> 319.185386
> MM:1-DD:2-Hour:9-Angle:0
> 907.889248 (larger than 802)
> 614.848339
> 393.397623
> 294.201388 (smaller than 319)
>
> Cheers,
> Jia

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

Hi Jia,

You are now experimenting beyond my own experience, so try both and see if it increases your calculation time. I don't think -lr should affect how long it takes, so there's little harm in increasing its magnitude.

Best,
-Greg

···

From: Jia Hu <[email protected]>
Date: August 31, 2010 10:39:08 AM PDT

Hello:

I report the progress. I decrease -lw to 1e-6 and -lr to -12. The results seem consistent enough. If I only change lr to -15 or only -lw to 1e-6, the consistence still exists. So, should I change both?

Thanks,

Jia

On Tue, Aug 31, 2010 at 12:11 PM, Greg Ward <[email protected]> wrote:
OK, you are talking about run-to-run consistency. We need to be clear on these things.

Try decreasing the -lw setting as I recommended to see how this affects run-to-run differences. There will always be some random variation, especially using the -u+ setting, but on average these should decrease with increasing calculation times.

Best,
-Greg