Sign in to follow this  
GaryPolter

BRDF confusion

Recommended Posts

I'm a little confused as to what a BRDF actually is; specifically, is it the specular component, or both the specular and diffuse component of light?

GPU Gems 3 has an article on skin rendering and it says that skin reflection is done with a specular BRDF and the diffuse color uses sub surface scattering. Their final color is: BRDF + SSS; (http://http.developer.nvidia.com/GPUGems3/gpugems3_ch14.html).

An ebook on this site (http://wiki.gamedev.net/index.php/D3DBook:%28Lighting%29_Foundation_and_theory#BRDF.E2.80.99s_and_the_rendering_equation) implies that it's both. Of course the book also says "The rendering equation is a simple and intuitive formula...", which is definitely not true for me.

Wikipedia (http://en.wikipedia.org/wiki/Bidirectional_reflectance_distribution_function) says that it is a function that describes how much light is reflected from a surface (implying specular and diffuse).

Would I say that I use a "Cook-Torrance BRDF", or is Cook-Torrance only the specular component and I must choose a different lighting strategy for the diffuse light?

Thanks for any clarification.

Share this post


Link to post
Share on other sites
A BRDF is a function, that provided with 2 directions (incoming and outgoing), tells you how much of the light is reflected from the incoming direction, to the outgoing direction (or vice versa, by the reciprocity property)

It allows you to say things like -

Im looking at some infinitesimal point from some direction wo, and there is light arriving at that point coming from some other direction wi. Based on the type of reflectance of the surface (its BRDF), how much light arriving from wi is reflected into wo.

Share this post


Link to post
Share on other sites
[quote name='hick18' timestamp='1305746038' post='4812683']
A BRDF is a function, that provided with 2 directions (incoming and outgoing), tells you how much of the light is reflected from the incoming direction, to the outgoing direction (or vice versa, by the reciprocity property)

It allows you to say things like -

Im looking at some infinitesimal point from some direction wo, and there is light arriving at that point coming from some other direction wi. Based on the type of reflectance of the surface (its BRDF), how much light arriving from wi is reflected into wo.
[/quote]

Thanks for the reply, hick18. So is something like the Phong light model composed of two BRDFs? One to tell you how much specular light is reflected and one for how much diffuse light is reflected? Or would it be considered one BRDF?

Share this post


Link to post
Share on other sites
[quote name='GaryPolter' timestamp='1305816232' post='4813012']
[...] So is something like the Phong light model composed of two BRDFs? One to tell you how much specular light is reflected and one for how much diffuse light is reflected? Or would it be considered one BRDF?
[/quote]

It's only one BRDF. The Phong model is a particular description of a BRDF as the sum of a specular component and a diffuse component. You have a few parameters to tweak (the color of each component and the sharpness of the specular component), but in the end all the materials you can achieve that way more or less look like plastic.

Share this post


Link to post
Share on other sites
A BRDF is just a function that returns how much of the potential incident radiance of a specific direction is being reflected to another direction. It can be a BRDF that just describes the diffuse component of a material, but it can also be a BRDF that just describes the specular component. But in a real scenario you are just interested in a full BRDF. If you don't have one just add 2 diffuse and specular BRDFs together (and clamp the result ).

Here are a few BRDFs:

Lambert: fr(L, V) = kd
Phong Specular: fr(L, V) = ks * (R.V)^ns / N.L
Blinn Specular: fr(L, V) = ks * (N.H)^ns / N.L
Phong Diffuse + Specular: fr(L, V) = kd + ks * (R.V)^ns / N.L
Blinn Diffuse + Specular: fr(L, V) = kd + ks * (N.H)^ns / N.L
Cook-Torrance: fr(L, V) = F / PI * (D*G) / (N.L * N.V)
...

Share this post


Link to post
Share on other sites
I do understand that this topic is a bit confusing, it is for me too.
Wikipedia "coverage" on this topic is pretty sparse, this article http://en.wikipedia.org/wiki/Bidirectional_scattering_distribution_function mentions some of the other modells though.
As I see it, definitions get a little blurry here.
Basically a BRDF could give you specular shading or diffuse shading only, but it can also be composed of several components.
Ashikhmin and Shirley for example proposed a BRDF that consists of a component that evaluates specular lighting and links it to a simple component for diffuse lighting, so that the amount of diffuse lighting diminishes as the amount of specularity gets higher.
Other BRDFs like Oren-Nayar, Minnaert or simple Lambert modells only provide diffuse lighting, while Phong and Blinn for example may only offer specular lighting. (like DarkChris showed here)
BRDFs can be combined of course, so you can have an object with a Lambert shader for diffuse lighting and a Blinn shader, or Ashikhmin-Shirley highlights (leaving out the diffuse part of the model) on top of a model that is diffusely shaded by a Oren-Nayar shader. (like DarkChris practically also showed)

On the other hand a BRDF normally only cares about reflectance, that is the light bouncing of the surface, and doesn´t take into account light that enters the object/material; this is where e.g. BSSRDFs kick in.
This more complex type of model also takes into account the light that enters the object and computes how it leaves the object, where it does and with what properties.
This way you can achieve subsurface scattering which... well... describes how light is scattered under the surface of an object. ;-)
With this SSS you can more believably visualize things that are diffusely translucent like milk, wax, etc..
On the other hand the Hapke-Lommel-Seeliger shader for example (used for shading powdery surfaces like, originally, the surface of certain moons) is considered a BRDF even though it incorporates a (comparatively simple though) method of calculating the amount of light that enters the surface and how it distributes and leaves the surface, hence a simple subsurface scattering term.
That´s why I wrote that imho these definitions are a little blurry.
So just don´t mind being confused.
For todays game design most of those BRDFs have little relevance anyway, often being awfully slow to compute; the most basic ones, like those posted by DarkChris, excluded.

Share this post


Link to post
Share on other sites
I suggest you to read through this paper:

[url="http://www.cs.princeton.edu/courses/archive/fall06/cos526/tmp/wynn.pdf"]Chris Wynn - An Introduction to BRDF-Based Lighting[/url] (pdf)

The paper does not cover the more specialised models, but it gives you an idea how a BRDF function is supposed to model light-material interaction.

One of the aims in creating a BRDF model is to be energy conserving and invertible. Basically the amount of light coming in, hitting the surface, must equal to the amount of light reflected, scattered, or diffused off the surface. So that includes ambient, diffuse, subsurface scattering and specular components. Invertible means that if we were to reverse the equation, recombine the outgoing light, you will get the same amount of energy back as the original light ray(s) hitting the surface.

The other aim for BRDFs is to model reflectance, particularly the specular term, and sometimes the diffuse as well. The Phong model is often regarded as inadequate, because the specular highlights do not behave correctly under some circumstances, and the equation itself does not conserve energy. Therefore, each new method described in the literature attempts to improve on previous models, and focus on rendering materials (particularly exotic ones) realistically using a generalised equation. For example, the Lafortune model is predominantly a specular shader. The specular component can be controlled to such extent, that you can use it for diffuse reflections, as well as for anisotropic highlights.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this