Jump to content
  • Advertisement
Sign in to follow this  
allingm

Cook-Torrance’s BRDF

This topic is 1936 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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


Link to post
Share on other sites
Advertisement

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


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!