[Radiance-general] Calculating diffuse component in a BRTDfunc
atelier iebele abel
atelier at iebele.nl
Fri Sep 30 16:10:17 CEST 2005
Hi all,
I am writing a BRTD material which I want to use to change the diffuse
component of a surface, related to a certain direction an the surface
normal.
Radiance reports: error bad arguments for BRTDfunc
What am I doing wrong here?
I get the impression that the rfdif, gfdif, bfdif, rbdif, gbdif and
bbdif are not variables ???
If these are not variables, how can I change/calculate/define the
diffuse component in a BRTDfunc?
See the bold lines of the example in my cal file.
I appreciate any suggestions !
Iebele
<--- snip ---->
{
directional.cal
arg10 red diffuse
arg11 green diffuse
arg12 blue diffuse
arg13 direction x
arg14 direction y
arg15 direction z
}
{ RGB values for the reflection }
valr = arg(10);
valg = arg(11);
valb = arg(12);
xdir = arg(13);
ydir = arg(14);
zdir = arg(15);
{ dot product direction and normal }
DdN = (xdir*Nx)+(ydir*Ny)+(zdir*Nz);
{ always return a positive value }
multi = if(DdN, DdN, -DdN) ;
*reflr = CrP + (multi*valr) ;
reflg = CgP + (multi*valg) ;
reflb = CbP + (multi*valb) ;*
{
example usage:
void BRTDfunc LAYER114
10
0 0 0 / reflection
0 0 0 / specular
0 0 0
directional.cal
0
15
* reflr reflg reflb */ diffuse front*
reflr reflg reflb * / diffuse back
0 0 0 / trans
0.8 0.7 0.6 / color of surface
0.57735 0.57735 0.57735 / vector defining bright side of
surface
}
More information about the Radiance-general
mailing list