[Radiance-general] rtrace: strange behaviour

Francesco Anselmo [email protected]
Fri, 25 Oct 2002 18:58:05 +0200


Hi!

While waiting for an answer to my first message, here is a second question.

I get a strange behaviour when I use rtrace to get irradiance/illuminance 
values from sky patches described using the primitive "source" with modifier
"glow". Here is an example:

--------8<--------8<--------8<--------8<--------8<--------8<--------8<--------
#file: patch1.rad = patch located at altitude gamma=30�; theta=90�-30�=60�
void glow skyglow
0
0
4 1 1 1 0

skyglow source skypatch
0
0
4 0.836516 0.224144 0.500000 11.500000
--------8<--------8<--------8<--------8<--------8<--------8<--------8<--------
#file: patch2.rad = patch located at altitude gamma=90�; theta=90�-90�=0�
void glow skyglow
0
0
4 1 1 1 0

skyglow source zenith_skypatch
0
0
4 0.000000 0.000000 1.000000 11.500000
--------8<--------8<--------8<--------8<--------8<--------8<--------8<--------

The solid angles subtended by the patches are equal to 0.0316 steradians in 
both cases.

Then I "oconv" the two files to get the octrees (respectively p1.oct and 
p2.oct) and I want to get the direct daylight coefficients for the two 
patches.
The patch radiance is 1 and the scene is made only by each patch and a 
measurement point located at 0 0 0, direction 0 0 1. So ...

$ echo '0 0 0 0 0 1' | rtrace -h -w -I+ -ab 1 p1.oct | rcalc -e \       
      '$1=$1/0.0316'
0.373048734

ok! in this simple case it should be equal to sin(30)=cos(60)=0.5
so I increase the -ad and -as values:

$ echo '0 0 0 0 0 1' | rtrace -ad 2048 -as 1024 -h -w -I+ -ab 1 \
p1oct | rcalc -e '$1=$1/0.0316'
0.497311709

that is very close to the correct value.

Let's make the same with the second patch (orthogonal to the measurement 
point):

$ echo '0 0 0 0 0 1' | rtrace -h -w -I+ -ab 1 p2.oct | rcalc -e \
'$1=$1/0.0316'
1.1191462

uhm ok! let's increase the -ad and -as values:

$echo '0 0 0 0 0 1' | rtrace -ad 2048 -as 1024 -h -w -I+ -ab 1 \
p2.oct | rcalc -e '$1=$1/0.0316'
0.413590506

Hey! What happened?

If I set -as 0 I still get a good value ... is it a trouble with my way of 
using it or something wrong with the code?
Should I use some other -a* switch?

Thank you!

-- 
Francesco Anselmo
[email protected]