rewrite BRDF as .cal file for plasfunc

I sent this message earlier - but I think it may have gotten lost. I
apologize if you receive it twice!

Hello,

Has anyone an example of how to write a .cal function for plasfunc,
for a given BRDF?
Specifically, I am not sure which predefined variables correspond to
the view direction vector.

This is the BRDF I want to use in Radiance:
V(i,j,n,a)=(1/PI)*(a/(a+(i dot n)(j dot n))
:i is unit vector from the source direction, j is unit vector of view
direction, n is surface normal, a some other parameter.

I know the Radiance-predefined variable names for the source direction
(x,y,z) and surface normal (Nx,Ny,Nz), but I am not sure what to use
for the view direction.

Can anyone help?
Thank you!
katja

Hi Katja ---

Here's the hack I use. Pass the viewpoint as arguments to the .cal function. Then view direction is just:

Vx = -(arg(1) - Px);
Vy = -(arg(2) - Py);
Vz = -(arg(3) - Pz);

where Px, Py and Pz are the Radiance predefined variable names for the ray intersection points.

Hope this helps,
Roland

I sent this message earlier - but I think it may have gotten lost. I
apologize if you receive it twice!

Hello,

Has anyone an example of how to write a .cal function for plasfunc,
for a given BRDF?
Specifically, I am not sure which predefined variables correspond to
the view direction vector.

This is the BRDF I want to use in Radiance:
V(i,j,n,a)=(1/PI)*(a/(a+(i dot n)(j dot n))
:i is unit vector from the source direction, j is unit vector of view
direction, n is surface normal, a some other parameter.

I know the Radiance-predefined variable names for the source direction
(x,y,z) and surface normal (Nx,Ny,Nz), but I am not sure what to use
for the view direction.

Can anyone help?
Thank you!
katja

_______________________________________________
Radiance-general mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general

r o l a n d f l e m i n g p h d
r e s e a r c h s c i e n t i s t

m a x p l a n c k i n s t i t u t e f o r b i o l o g i c a l c y b e r n e t i c s
s p e m a n n s t r . 3 8
7 2 0 7 6 t u e b i n g e n
g e r m a n y

t e l :: [ + 4 9 ] 0 7 0 7 1 6 0 1 - 6 0 9

···

On Jul 18, 2005, at 5:26 PM, Katja Doerschner wrote:

Hi ,

you might have a look at the header section of the file 'rayinit.cal', here all predefined variables can be found..
The general ray direction e.g is Dx, Dy, Dz (which of course correponds to the view direction for the primary view rays.)

-cb

Thanks. Yes, I did look at rayinit.cal- that is were I found the other
variables. Now I used DxDyDz as my view direction vector and my .cal
function seems to work. (Well, technically that is).

katja

···

----- Original Message -----
From: Carsten Bauer <[email protected]>
Date: Monday, July 18, 2005 9:43 pm
Subject: Re: [Radiance-general] rewrite BRDF as .cal file for plasfunc

Hi ,

you might have a look at the header section of the file
'rayinit.cal',
here all predefined variables can be found..
The general ray direction e.g is Dx, Dy, Dz (which of course
correponds
to the view direction for the primary view rays.)

-cb

_______________________________________________
Radiance-general mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general

Hi Roland,
I just tried out your suggestion after getting funny results with the
DxDyDz as view direction. Your 'hack' works perfectly!!!!! Thanks a lot.

katja

···

----- Original Message -----
From: Roland William Fleming <[email protected]>
Date: Monday, July 18, 2005 11:44 am
Subject: Re: [Radiance-general] rewrite BRDF as .cal file for plasfunc

Hi Katja ---

Here's the hack I use. Pass the viewpoint as arguments to the .cal
function. Then view direction is just:

Vx = -(arg(1) - Px);
Vy = -(arg(2) - Py);
Vz = -(arg(3) - Pz);

where Px, Py and Pz are the Radiance predefined variable names for
the
ray intersection points.

Hope this helps,
Roland

On Jul 18, 2005, at 5:26 PM, Katja Doerschner wrote:

> I sent this message earlier - but I think it may have gotten
lost. I
> apologize if you receive it twice!
>
> Hello,
>
> Has anyone an example of how to write a .cal function for plasfunc,
> for a given BRDF?
> Specifically, I am not sure which predefined variables correspond to
> the view direction vector.
>
> This is the BRDF I want to use in Radiance:
> V(i,j,n,a)=(1/PI)*(a/(a+(i dot n)(j dot n))
> :i is unit vector from the source direction, j is unit vector of
> direction, n is surface normal, a some other parameter.
>
> I know the Radiance-predefined variable names for the source
> (x,y,z) and surface normal (Nx,Ny,Nz), but I am not sure
what to use
> for the view direction.
>
> Can anyone help?
> Thank you!
> katja
>
>
>
>
> _______________________________________________
> Radiance-general mailing list
> [email protected]
> http://www.radiance-online.org/mailman/listinfo/radiance-general
>
r o l a n d f l e m i n g p h d
r e s e a r c h s c i e n t i s t

m a x p l a n c k i n s t i t u t e f o r b i o l o g i c a
l
c y b e r n e t i c s
s p e m a n n s t r . 3 8
7 2 0 7 6 t u e b i n g e n
g e r m a n y

t e l :: [ + 4 9 ] 0 7 0 7 1 6 0 1 - 6 0 9

_______________________________________________
Radiance-general mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general

I think that Dx, Dy, Dz correspond to the direction vector of the ray which is different than the direction vector of the view. So this may account for some of your funny results.

-Jack

Katja Doerschner wrote:

···

Hi Roland,
I just tried out your suggestion after getting funny results with the
DxDyDz as view direction. Your 'hack' works perfectly!!!!! Thanks a lot.

katja

----- Original Message -----
From: Roland William Fleming <[email protected]>
Date: Monday, July 18, 2005 11:44 am
Subject: Re: [Radiance-general] rewrite BRDF as .cal file for plasfunc

Hi Katja ---

Here's the hack I use. Pass the viewpoint as arguments to the .cal function. Then view direction is just:

Vx = -(arg(1) - Px);
Vy = -(arg(2) - Py);
Vz = -(arg(3) - Pz);

where Px, Py and Pz are the Radiance predefined variable names for the ray intersection points.

Hope this helps,
Roland

On Jul 18, 2005, at 5:26 PM, Katja Doerschner wrote:

I sent this message earlier - but I think it may have gotten
     

lost. I
   

apologize if you receive it twice!

Hello,

Has anyone an example of how to write a .cal function for plasfunc,
for a given BRDF?
Specifically, I am not sure which predefined variables correspond to
the view direction vector.

This is the BRDF I want to use in Radiance:
V(i,j,n,a)=(1/PI)*(a/(a+(i dot n)(j dot n))
:i is unit vector from the source direction, j is unit vector of
     
direction, n is surface normal, a some other parameter.
   
I know the Radiance-predefined variable names for the source
     
(x,y,z) and surface normal (Nx,Ny,Nz), but I am not sure

what to use
   

for the view direction.

Can anyone help?
Thank you!
katja

_______________________________________________
Radiance-general mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general

r o l a n d f l e m i n g p h d
r e s e a r c h s c i e n t i s t

m a x p l a n c k i n s t i t u t e f o r b i o l o g i c a l c y b e r n e t i c s
s p e m a n n s t r . 3 8
7 2 0 7 6 t u e b i n g e n
g e r m a n y

t e l :: [ + 4 9 ] 0 7 0 7 1 6 0 1 - 6 0 9

_______________________________________________
Radiance-general mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general

_______________________________________________
Radiance-general mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general

--
# John E. de Valpine
# president
#
# visarc incorporated
# http://www.visarc.com
#
# channeling technology for superior design and construction