[Radiance-general] Surface normal and Rdot in mix functions

[email protected] [email protected]
Fri, 03 May 2002 16:21:08 +0200


Hi,
Is there anybody (Greg?) who could help in the following problem:

For the mixture material type one has to define a weight coefficient 
[0...1] for the 'foreground' material. Respectively, this coefficient 
subtracted from 1 is the weight for the 'background' material.

I have used .cal functions based on cos(theta) of the incoming (eye) ray. 
For this purpose, there is a special variable available, Rdot, which is the 
dot product of the eye ray and the surface normal and hence should be equal 
to cos(theta), if I have understood correctly. I have also supposed 
Radiance always flips the normal so that Rdot would get only positive 
values between 0 and 1. However, when I tested this, my functions gave 
warnings that imply negative values of Rdot. Something seems to be wrong in 
my reasoning.

Is it ok to treat positive and negative Rdot values symmetrically in mix 
functions?

I have not used surface textures, but the roughness values for trans 
material are moderately big.

Regards,
Markku


Markku_Norvasuo
Technical_Research_Centre_of_Finland