[Radiance-general] Re: implementing Radiance reflection model

Tarik Rahman tarik.rahman at ed.ac.uk
Wed Jan 12 17:34:14 CET 2005


Thanks for that, made the correction for tan^2(delta) and delta is as you say
delta = normal.dotProduct(halfwayVectorUnit);
where
halfwayVector = point_to_lightUnit  - point_to_camUnit;
halfwayVectorUnit = halfwayVector.normalize();


So for the ambient light of .5 .5 .5 I just add it at the end? I don't need to
multiply by the diffuse component rho_diffuse?

Tarik


Quoting Greg Ward <gregoryjward at gmail.com>:

> Hi Tarik,
>
> The formula for K should be:
>
> 			             exp(-tan^2(delta)/alpha^2)
> 			  K =     -----------------------------------
> 			         cos(theta_i)*cos(theta_r) *4pi*alpha^2
>
> How are you computing delta?  It is the angle between the half-vector
> and the normal.
>
> Also, for large disk sources, the exact calculation for solid angle is:
>
> 	2pi*(1 - cos(theta_s/2))
>
> Where theta_s is the subtended angle of the light source.  This is a
> insignificant correction to what you have for distant sources.
>
> -Greg
>
> > From: Tarik Rahman <tarik.rahman at ed.ac.uk>
> > Date: January 11, 2005 7:05:40 AM PST
> >
> > Hi there
> > I'm still trying to get the correct values for the Radiance reflection
> > model,
> > they're close but not quite right. So for isotropic reflectance I get
> > K as below
> >
> >
> > 			             [ exp(-tan^2(delta/alpha^2)]
> > 			  K =     -----------------------------------
> > 			         cos(theta_i)*cos(theta_r) *4pi*alpha^2
> >
> >
> > and use the formula to get the returned colour as
> > Li = Ii*projected_solid_angle(rho_diffuse/pi + rho_specular*K) where
> >
> > 				cos(theta_i)*PI*r^2
> > projected_solid_angle =		-------------------
> > dist_to_light^2
> >
> > and r is the radius of my spherical light source.
> > when I do rview -vf view.vp -av .5 .5 .5 file.oct do I just add this
> > -av value
> > for ambient light as below?
> > Li = light.colour*projected_solid_angle*(rho_diffuse/pi
> > +rho_specular*K)
> > + ambient;
> >
> > Thanks for any help
> >
> > Tarik
> > --
> > Tarik Rahman
> > PhD student, Institue of Perception, Action and Behaviour
> > School of Informatics
> > University of Edinburgh
>
>
> _______________________________________________
> Radiance-general mailing list
> Radiance-general at radiance-online.org
> http://www.radiance-online.org/mailman/listinfo/radiance-general
>


--
Tarik Rahman
PhD student, Institue of Perception, Action and Behaviour
School of Informatics
University of Edinburgh



More information about the Radiance-general mailing list