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

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@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

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@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@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@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

Hi Tarik,

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?

That's correct -- Radiance handles multiplication of the ambient with the various surfaces. (It would have to for any scene containing more than one surface type.)

-Greg

## ···

From: Tarik Rahman <tarik.rahman@ed.ac.uk>

Date: January 12, 2005 8:34:14 AM PST

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

Oh, I know that Radiance handles the ambient term but say I wanted to write my

own code implementing the Radiance model, which terms would I need to multiply

the ambient value by?

Tarik

Quoting Greg Ward <gregoryjward@gmail.com>:

## ···

Hi Tarik,

> 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?

That's correct -- Radiance handles multiplication of the ambient with

the various surfaces. (It would have to for any scene containing more

than one surface type.)

-Greg

> From: Tarik Rahman <tarik.rahman@ed.ac.uk>

> Date: January 12, 2005 8:34:14 AM PST

>

> 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

_______________________________________________

Radiance-general mailing list

Radiance-general@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

Hi Tarik,

This is explained pretty well in section 4 of the materials.pdf document. I assume you are reading this:

http://radsite.lbl.gov/radiance/refer/materials.pdf

You multiply the ambient by the rho_a parameter of the reflectance model, which is the same as rho_d in most cases.

-Greg

## ···

From: Tarik Rahman <tarik.rahman@ed.ac.uk>

Date: January 14, 2005 4:11:13 AM PST

Oh, I know that Radiance handles the ambient term but say I wanted to write my

own code implementing the Radiance model, which terms would I need to multiply

the ambient value by?

Tarik