# Cook-Torrance’s BRDF

## Recommended Posts

allingm    539

I’m having trouble understanding Cook-Torrance’s BRDF fundamentals.  The function is:

F * G * D

----------------

4 * N.L * N.V

My question is where do the N.L and N.V come from?  The main reason I ask is the N.V is giving me trouble.  I know that the N.L goes away when we multiply the BRDF by the N.L and the incoming light intensity, but N.V remains and causes problems for me.  The objects in my scene have bright halo/sparkles around them.  Perhaps this isn’t even supposed to be a problem?  I would like a deeper understanding, so I can figure out what is going wrong.

#### Share this post

##### Share on other sites
MJP    19786

That denominator term accounts for foreshortening of the surface with respect to the eye and the light. You'd have to read through the original Cook-Torrance and Torrance-Sparrow papers for a full derivation and motivation. The main problem with those terms (and other similar terms commonly found in the distribution and geometry terms of other microfacet BRDF's) is that they are only stable when N.L > 0 and N.V > 0. In real-time rendering scenarios it's common to end up with N.V being negative due to normal maps, so you typically have to branch over the BRDF if either one of those terms is less than or equal to zero.

Edited by MJP

#### Share this post

##### Share on other sites
Vilem Otte    2941

I won't explain exactly why - because the derivation could be a bit longer for single forums post, and it might not be as easy to understand as when you read paper describing it. Either google for "Cook torrance derivation" or look F.e. here http://www.hungrycat.hu/microfacet.pdf - look for Appendix A where there is probabilistic derivation of Cook Torrance BRDF.

EDIT: MJP was faster, I'll just leave post here for the link to paper, where there is derivation. It's not original paper though...

EDIT2: Here is also original paper - http://inst.eecs.berkeley.edu/~cs283/sp13/lectures/cookpaper.pdf

Edited by Vilem Otte

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