[Radiance-general] rtrace -oo adds direction to origin

Greg Ward gregoryjward at gmail.com
Mon Oct 24 17:50:58 CEST 2005


Hi Axel,

The -oo option and -od option report the origin and normalized ray  
direction (respectively), but only with -I-.  When you set -I+, then  
rtrace fudges the calculation by creating a ray 1 unit above an  
imaginary Lambertian surface, and this is why the origin (and  
direction if you check) do not match your input.  Instead, the  
intersection point (-op) and surface normal (-on or -oN) will match  
the origin and direction given.

This is not a new bug in 3.7, but something that's been there since I  
enabled reports of parameters besides ray value with -I+ in the 2.3  
release.  Perhaps you weren't using the -I+ setting in your previous  
scripts.

I think I could fix this behavior if it's really screwing you up.  I  
agree that it's confusing to have the -oo and -od options change  
their apparent reporting depending on the -I setting, but they are  
reporting the values on the ray actually traced.  You don't start out  
at the surface and direct the ray straight up in order to compute  
irradiance.  That wouldn't work.

-Greg

> From: "Axel Jacobs" <a.jacobs at londonmet.ac.uk>
> Date: October 24, 2005 7:27:00 AM PDT
>
> Confusing, I know
>
> I am using 3.7.2.
>
> I am trying something like:
>
> cnt 2 3| rcalc -e '$1=$1;$2=$2;$3=1;$4=0;$5=0;$6=1'| rtrace -I -ab  
> 1 -ad
> 64 -h -w -oov axel.oct| rcalc -e '$1=$1;$2=$2;$3=$3'
> 0       0       2
> 0       1       2
> 0       2       2
> 1       0       2
> 1       1       2
> 1       2       2
>
> Compare this to:
>
> cnt 2 3| rcalc -e '$1=$1;$2=$2;$3=1;$4=0;$5=1;$6=0'| rtrace -I -ab  
> 1 -ad
> 64 -h -w -oov axel.oct| rcalc -e '$1=$1;$2=$2;$3=$3'
> 0       1       1
> 0       2       1
> 0       3       1
> 1       1       1
> 1       2       1
> 1       3       1
>
> radiance 3.7.2 seems to add the direction vector to the ray's  
> origin at
> its -oo output.
>
> Now try:
>
> cnt 2 3| rcalc -e '$1=$1;$2=$2;$3=1;$4=0;$5=3;$6=0'| rtrace -I -ab  
> 1 -ad
> 64 -h -w -oov axel.oct| rcalc -e '$1=$1;$2=$2;$3=$3'
> 0       1       1
> 0       2       1
> 0       3       1
> 1       1       1
> 1       2       1
> 1       3       1
>
> Aha! It is in fact the _normalised_ direction vector which it adds.
>
> I've done similar rtrace jobs lots of times before, but this behavious
> seems to be newly introduced in a recent release. -oo always used  
> to spit
> out exactly the input, not (input+direction).
>
> Please advise.
>
> Axel
>



More information about the Radiance-general mailing list