[Radiance-general] Calculating diffuse component in a BRTDfunc

Greg Ward gregoryjward at gmail.com
Fri Sep 30 18:27:39 CEST 2005


Hi Iebele,

You are correct that the real arguments cannot be expressions.  The  
definition of a diffuse component is one that does not change with  
angle, so there should be no need to define these parameters as  
variables.  If you have some varying portion to your BRDF, then put  
this in the directional-diffuse component, which are string arguments  
7-9 for BRTDfunc.

-Greg

P.S.  On my mailer, the first message came through better than the  
second.

> From: atelier iebele abel <atelier at iebele.nl>
> Date: September 30, 2005 7:10:17 AM PDT
>
> 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