# trying to implement isotropic reflection model

Hi there
I'm trying to implement the isotropic reflection model where
[ exp(-tan^2(delta/alpha^2)]
K = -------------------------------------------------
sqrt( cos(theta_i)*cos(theta_r) )*4pi*alpha^2

my diffuse is (0.2 0.2 0.2) and specular is 0.05 ( roughness = 0.05 ) so I get
the reflected colour as = diffuse/pi + spec*K and multiply this by the light
colour (1 1 1 )
and return it

my values are supposed to be around 0.106 but I always get either too big like
1.137 or too small like 0.0653.

Anyone have any idea where I might be going wrong, should I be doing some kind
of fall off factor where the light intensity at an intersection ( of a simple
plane) is inversely proportional to the distance from the light source.

Thanks for any help,

Tarik

···

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

Hi Tarik,

Against your current formula, you must multiply the projected solid angle of the light source, which accounts for the 1/r^2 fall-off with distance. The projected solid angle equals the cosine of theta_i times the apparent solid angle of the source, which depends on the source geometry in relation to the calculation point, but may be approximated as the projected area in the source direction divided by the distance to the source squared.

By the way, some folks recently offered a correction to the Radiance specular (Gaussian) reflectance model, which eliminates the square root in the denominator of your formula:

[ exp(-tan^2(delta/alpha^2)]
K = -------------------------------------------------
cos(theta_i)*cos(theta_r)*4pi*alpha^2

This achieves a more accurate normalization of the reflectance, as the original square root was really an error on my part in a change of variables I screwed up.

-Greg

···

From: Tarik Rahman <[email protected]>
Date: October 8, 2004 4:47:20 PM CEST

Hi there
I'm trying to implement the isotropic reflection model where
[ exp(-tan^2(delta/alpha^2)]
K = -------------------------------------------------
sqrt( cos(theta_i)*cos(theta_r) )*4pi*alpha^2

my diffuse is (0.2 0.2 0.2) and specular is 0.05 ( roughness = 0.05 ) so I get
the reflected colour as = diffuse/pi + spec*K and multiply this by the light
colour (1 1 1 )
and return it

my values are supposed to be around 0.106 but I always get either too big like
1.137 or too small like 0.0653.

Anyone have any idea where I might be going wrong, should I be doing some kind
of fall off factor where the light intensity at an intersection ( of a simple
plane) is inversely proportional to the distance from the light source.

Thanks for any help,

Tarik