Skip to main content
GameDev.net gamedev.net
🔒 Locked

Normalized BRDF

Started by maya18222 Apr 20, 2011 at 10:14 AM 4 replies 5.8k views
Original Post
maya18222
maya18222
When they talk about BRDFs having to be energy conserving, in that the reflected light cant be more than the incoming light, so integrating the BRDF over the hemisphere should return <=1.

If the BRDF for Lambert diffuse is 1/pi, then integrating that over the hemisphere, you get 2. You only get 1 if you include the cos(theta) weight, giving, cos(theta)/pi

So, within direct lighting, you usually have

Lo = BRDF() * Li() * cos(theta);


expanding that out of Lambert which reflects all wavelengths, wouldnt that be

Lo = (cos(theta)/pi) * Li() * cos(theta);

So when they say the brdf must integrate to <=1 over the hemisphere, do they mean

BRDF() * cos(theta), over the hemisphere


or

BRDF() , over the hemisphere
DarkChris
DarkChris
Just the BRDF itself should only return values between 0 and 1. That's all you need to know. The integral is irrelevant.

And the lambert BRDF is not:
fr_lambert = cos(theta)

it's:
fr_lambert = c

where c is the attenuation factor.
Hodgman
Hodgman
where c is the attenuation factor.
Isn't the Lambert attenuation factor N.L, which is the same as cos(theta)?
the BRDF for Lambert diffuse is 1/pi
Do you mean something else here? Isn't the Lambert BRDF N.L (or N.L/pi if energy conserving), or is the N.L done outside the BRDF?[hr][edit]Yeah, sorry I forgot that the angular attenuation (N.L / cos(theta) / light_ts.z) isn't part of the BRDF equation. Ignore me ;p
So when they say the brdf must integrate to <=1 over the hemisphere, do they mean ... or ...
Pretty sure you want to integrate the whole equation (the former "..."), as you're trying to ensure that the total reflected light <= the incoming light, and you need to evaluate more than just the BRDF by itself (the latter "...") to determine the reflected light.
DarkChris
DarkChris
[quote name='DarkChris' timestamp='1303305195' post='4800748']where c is the attenuation factor.
Lambert angular attenuation is N.L, which is the same as cos(theta)[/quote]
I was talking about material based attenuation like albedo.

On Topic: If you want to use a BRDF as a shading model, you have to use it like that:
lighting = brdf(viewDirectionTangentSpace, lightDirectionTangentSpace) * lightDirectionTangentSpace.z;
maya18222
maya18222
Just the BRDF itself should only return values between 0 and 1. That's all you need to know. The integral is irrelevant.
[/quote]

Why is the integral irrelevant? if I was integrating over a domain other than the hemisphere, then the "1/pi" in the "kd * 1/pi" constant for lambert would be incorrect.
David Neubelt
David Neubelt
A BRDF, f_r, is a unit less quantity that describes the ratio of incident radiance outgoing radiance.

The outgoing radiance will be the flux leaving the differential surface with respect to its out going angle. As will the incoming radiance. The will be a simple scalar or proportionality constant that relates the two.

To compute the reflected radiance you integrate over the hemisphere the BRDF against the incident radiance scaled by the cosine of the incident radiance.

For perfect diffuse lambertian surfaces incident flux is reflected equally in all directions. Solving the integral will give your reflected radiance as f_r * pi =c which means f_r = c / pi. Where c is your constant of proportionality or how much energy is reflected by the material where the rest is absorbed.

The cosine term must be inside the integral because you need to integrate radiance with respect to the surface this means you need to work with projected area. An easy way to visualize this is if you were to project all the radiance on the surface of a hemisphere you would end up projecting onto the surface of the circle on the plane of the hemisphere. The projected area would be pi.

-= Dave
Graphics Programmer - Ready At Dawn Studios

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.