Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question
5

Ambient files increase illiminance

asked 2016-03-15 08:33:02 -0600

Grigori Grozman's avatar

updated 2016-03-15 12:29:23 -0600

Dear Radiance experts.

I am professionally using radiance for calculating daylight factors and illuminance. It all works quite well. However, I can not fully understand how to use ambient files.

Question 1: Is there any comprehensive documentation on the topic?

Question 2: It seems to me that when rtrace is used with ambient files, a higher value of illuminance is calculated than when no ambient files are used. Is there any explanations to that? Which value is more correct?

I have put together a simple example that illustates the problem. Since I am a newbie in this forum and I can not attach files, I post them here directly. All the files below need to be saved into the same directory. The run.bat file needs to be run and the result is printed to the file res.txt.

materials.mat

void plastic walls
0
0
5 0.5 0.5 0.5 0.002 0.3

void glass windows
0
0
3 0.7 0.7 0.7

zone1.rad

walls polygon zone1.1540
0
0
12
    1 0 0
    1 0 1
    0 0 1
    0 0 0

walls polygon zone1.4620
0
0
12
    0 0 1
    0 1 1
    0 1 0
    0 0 0

walls polygon zone1.2310
0
0
12
    0 1 0
    1 1 0
    1 0 0
    0 0 0

walls polygon zone1.5137
0
0
12
    1 0 1
    1 0 0
    1 1 0
    1 1 1

walls polygon zone1.6457
0
0
12
    0 1 1
    0 0 1
    1 0 1
    1 1 1

walls polygon zone1.1
0
0
18
    0 1 0
    1 1 0
    1 1 1
    0.75 1 0.75
    0.75 1 0.25
    0.25 1 0.25

walls polygon zone1.2
0
0
18
    0 1 0
    0.25 1 0.25
    0.25 1 0.75
    0.75 1 0.75
    1 1 1
    0 1 1

windows polygon zone1.3267
0
0
12
    0.75 1 0.25
    0.25 1 0.25
    0.25 1 0.75
    0.75 1 0.75

zone2.rad

walls polygon zone2.1540
0
0
12
  0  0  0
  0  0  1
 -1  0  1
 -1  0  0

walls polygon zone2.4620
0
0
12
 -1  0  1
 -1  1  1
 -1  1  0
 -1  0  0

walls polygon zone2.2310
0
0
12
 -1  1  0
  0  1  0
  0  0  0
 -1  0  0



walls polygon zone2.5137
0
0
12
  0  0  1
  0  0  0
  0  1  0
  0  1  1

walls polygon zone2.6457
0
0
12
 -1  1  1
 -1  0  1
  0  0  1
  0  1  1


walls polygon zone2.1
0
0
18
    0 1 0
    -1 1 0
    -1 1 1
    -0.75 1 0.75
    -0.75 1 0.25
    -0.25 1 0.25

walls polygon zone2.2
0
0
18
    0 1 0
    -0.25 1 0.25
    -0.25 ...
(more)
edit retag flag offensive close merge delete

Comments

You may have more luck asking the Radiance user community: Radiance Community

Chris Jones's avatar Chris Jones  ( 2016-03-15 09:15:03 -0600 )edit
3

@Chris Jones - At the Radiance Workshop attendees (including the most important one) agreed to begin using Unmet Hours. Since August 2015, users should have the same luck on both platforms. I personally think UH is a better platform for questions and encourage users to post question here instead of to the mailing list.

Andyrew's avatar Andyrew  ( 2016-03-15 10:46:27 -0600 )edit

4 Answers

Sort by ยป oldest newest most voted
5

answered 2016-03-16 10:52:51 -0600

updated 2016-03-16 20:52:04 -0600

This was posted simultaneously to the Radiance mailing list, which is a bit confusing. Do we have a standard way to cross-reference questions & answers between forums?

Anyway, here is the answer I posted there http://radiance-online.org/pipermail/radiance-general/2016-March/011585.html:

Hi Grigori,

This is an interesting test. Essentially, what you are seeing is light leaking via the ambient file from one zone to another. It also points out the fact that the -ab setting is not the only one that matters.

You have left all the other rtrace parameters to their defaults. Running rtrace [your options] -defaults, we can look at what these are. I am including all those that are relevant to your calculation, below:

-dt 0.030000 # direct threshold

-dc 0.750000 # direct certainty

-dj 0.000000 # direct jitter

-ds 0.200000 # direct sampling

-av 0.000000 0.000000 0.000000 # ambient value

-aw 0 # ambient value weight

-aa 0.100000 # ambient accuracy

-ar 256 # ambient resolution

-ad 1024 # ambient divisions

-as 512 # ambient super-samples

-lr -10 # limit reflection (Russian roulette)

-lw 2.00e-03 # limit weight

In this case, you have a large ground plane and a shading plane behind the building, which means that the default -ar of 256 is on the low side. I would increase this to -ar 400 (divide scene size by desired detail scale).

The -aa setting of 0.1 means that you're shooting for roughly 10% error in your indirect calculations, which is what you are seeing in your results. Reducing this setting to -aa 0.05 increases calculation time substantially, but cuts your error roughly in half.

I determined these changes improve the result primarily by visualizing your calculation, rather than simply relying on the output. I always tell users that there's nothing more important than actually looking at your model. In this case, it's easy enough to visualize the point of view of your points:

p1: 0.5 0.5 0.1 0 0 1 -> -vth -vp .5 .5 .1 -vd 0 0 1 -vu 0 1 0 -vh 180 -vv 180

p2: -0.5 0.5 0.1 0 0 1 -> -vth -vp -.5 .5 .1 -vd 0 0 1 -vu 0 1 0 -vh 180 -vv 180

If you run rvu, you have to explicitly set the options (even the default ones) to match your rtrace calculation. That way, you can truly see what's going on and get a better idea of where errors may be creeping in.

Cheers,

-Greg


From: Grigori Grozman Grigori.Grozman@equa.se Subject: [Radiance-general] Ambient files increase illiminance Date: March 15, 2016 7:24:44 AM PDT Dear Radiance experts.

I am professionally using radiance for calculating daylight factors and illuminance. It all works quite well. However, I can not fully understand how to use ambient files.

Question 1: Is there any comprehensive documentation on the topic?

Question 2: It seems to me that when rtrace is used with ambient files, a higher value of illuminance is ... (more)

edit flag offensive delete link more

Comments

2

I think the best way to cross-ref is the way you've done it here, Greg. Requires a little bit of url sniffing, and for people to know what content is where. I think it's great that you and @Andyrew are still monitoring things over here on UH! I suppose it's possible that this will become the default for the Radiance community, which I never thought would happen. Thanks you guys.

rpg777's avatar rpg777  ( 2016-03-16 11:18:11 -0600 )edit
5

answered 2016-03-15 10:03:08 -0600

To your questions:

1) You can read up more on the Irradiance Cache (which is stored in the ambient file) in the following sources:

2) Do you still use an irradiance cache (i.e., a non-zero ambient accuracy (-aa) value) when you don't use ambient files? In my experience, you will get higher illuminance values when you use irradiance caching as opposed to turning it off, and the higher values are more correct. That's because using an irradiance cache effectively increases the number of bounces in ray paths beyond the constraints you set with -ab, -lr, and -lw for those values cached late in the process, because they can sample the values that were cached earlier. This effective increase is a good thing, because real physics does not place a limit on ray bounces.

SImilarly, when you use a previously created ambient file, any additional ambient values that are created early in the run also get the benefit of sampling previously calculated ambient values that were saved in the file.

In your case, your zone 2 simulation is reusing the ambient values calculated by your zone 1 simulation that were saved into the ambient file. You could consider using an overture pass: running rtrace twice for each zone, so that the first time you create the ambient file, and the second time you read the ambient file and use it to calculate that values you will use.

Note that setting the number of ambient bounces to 50 requires that you also set your ray relays (-lr) to 50 or higher and set your minimum ray weight (-lw) extremely low. Otherwise, I doubt very much that your large ab simulation is very different from your low ab simulation.

edit flag offensive delete link more

Comments

And, if you are interested in a copy of Rendering with Radiance, both hardcover and softcover printings are currently available, links here.

Randolph M. Fritz's avatar Randolph M. Fritz  ( 2016-03-16 14:47:03 -0600 )edit

I recently acquired a copy of Rendering with Radiance - great book for beginners and experienced users alike.

Chris Jones's avatar Chris Jones  ( 2016-03-16 15:20:00 -0600 )edit

There are a few slides discussing the new Hessian calculation and irradiance cache presented at the 2014 Radiance workshop in London -- the link to my talk is: http://www.radiance-online.org/community/workshops/2014-london/presentations/day1/Ward_WhatIsNew.pdf

GregWard's avatar GregWard  ( 2016-03-16 21:01:15 -0600 )edit
2

answered 2016-03-15 10:34:54 -0600

Nathaniel's answer is very detailed and accurate. I would like to add some details on the _overture calculation_. The overture calculation is used to populate the ambient cache only. As such, the rendering size may be extremely small (50px square). We don't care about the output rendering from this pass (in fact, it can be immediately thrown away, or if on unix, simply piped to /dev/null), it's purely for some rays to get traced through the scene to generate some values for the ambient cache. Be sure to save an ambient cache, and to refer to it on the subsequent run!

edit flag offensive delete link more
1

answered 2016-03-15 10:55:21 -0600

Grigori Grozman's avatar

updated 2016-03-15 10:56:18 -0600

Thank you for your answers.

Following the advise of Nathanael, I tried to increase -lr and decrease -lw. My aim is to generate the same illuminance value without the use of the ambient file as I get using it.

I have tried -ab 500 -lr 1000 -lw 0.000000001. The results are still (for zone 2):

With ambient file (created in rtrace for zone 1): 211.394704

Without ambient file: 203.645436

So I am closer than before, but still not there.

The new run.bat file is:

echo This result file is to show that usage of ambient file increases illuminance > res.txt

gensky -ang 0 45 -b 22.86 -c -m 0 -g 0.2 > sky.mat 

oconv sky.mat sky.rad materials.mat zone1.rad zone2.rad shade.rad > scene.oct

echo Zone 1 without ambient file >> res.txt
rtrace -ab 5 -h -I+ -ov -u- -faa scene.oct < p1.pnt | rcalc -ia -oa -e $1=179*(0.265*$1+0.67*$2+0.065*$3); >> res.txt

echo Zone 2 without ambient file >> res.txt
rtrace -ab 5 -h -I+ -ov -u- -faa scene.oct < p2.pnt  | rcalc -ia -oa -e $1=179*(0.265*$1+0.67*$2+0.065*$3); >> res.txt

echo Zone 1 without ambient file but with large ab >> res.txt
rtrace -ab 500 -lr 1000 -lw 0.000000001 -h -I+ -ov -u- -faa scene.oct < p1.pnt | rcalc -ia -oa -e $1=179*(0.265*$1+0.67*$2+0.065*$3); >> res.txt 

echo Zone 2 without ambient file but with large ab >> res.txt
rtrace -ab 500 -lr 1000 -lw 0.000000001 -h -I+ -ov -u- -faa scene.oct < p2.pnt  | rcalc -ia -oa -e $1=179*(0.265*$1+0.67*$2+0.065*$3); >> res.txt 

echo Zone 1 with ambient file >> res.txt
rtrace -ab 5 -h -I+ -ov -u- -faa -af ambf.amb scene.oct < p1.pnt | rcalc -ia -oa -e $1=179*(0.265*$1+0.67*$2+0.065*$3); >> res.txt 

echo Zone 2 with ambient file >> res.txt
rtrace -ab 5 -h -I+ -ov -u- -faa -af ambf.amb scene.oct < p2.pnt | rcalc -ia -oa -e $1=179*(0.265*$1+0.67*$2+0.065*$3); >> res.txt 

echo The illuminance in zone 2 is higher when using ambient files than without it. Such a high value can not be achieved by using a very large ab. >> res.txt

del ambf.amb
del scene.oct
del sky.mat

The result file is:

This result file is to show that usage of ambient file increases illuminance 
Zone 1 without ambient file 
189.745012
Zone 2 without ambient file 
193.791486
Zone 1 without ambient file but with large ab 
195.498072
Zone 2 without ambient file but with large ab 
203.645436
Zone 1 with ambient file 
189.745012
Zone 2 with ambient file 
211.394704
The illuminance in zone 2 is higher when using ambient files than without ...
(more)
edit flag offensive delete link more

Comments

That's 3% error, which is ridiculously low compared to the error you would likely get against sensor data in the actual building. To see if it's reasonable, try a few runs with -u+ to see how much error could be attributed just to the pseudorandom sequence. Also, regardless of how many bounces you allow, you still aren't getting the benefit of the overture pass when you don't use an ambient file.

Nathaniel Jones's avatar Nathaniel Jones  ( 2016-03-15 11:13:33 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Training Workshops

Careers

Question Tools

1 follower

Stats

Asked: 2016-03-15 08:33:02 -0600

Seen: 533 times

Last updated: Mar 16 '16