Second of the lighting models

Published November 02, 2005
Advertisement
In a continuation from yesterday's coverage of the Blinn-Phong lighting model I suppose I best add the next one [smile]

Cook-Torrance

This is a more advanced model that takes surface roughness into account. Consequently if we map roughness as a texture then we can have different areas of a surface appearing as smooth/rough. A classic example seems to be rusty metal - you have some shiny bits and then you have the rough/matt rusty parts.

The equation is somewhat less pleasant than before:



Inputs:
  • Diffuse Texture
  • Specular Texture
  • Normals Texture
  • Roughness Texture

  • Ambient Constant
  • Refractive Index Constant
  • Light Position Constant
  • Light Range Constant
  • Light Falloff Constant

  • World Matrix
  • World*View*Proj Matrix

    Vertex Data:
  • Position
  • Normal
  • Tangent
  • TexCoord

    With regards to creating a generic base for these lighting models it's worth noting:
  • We require an additional texture (Roughness)
  • We require a new constant (Refractive Index)
  • We no longer have the 'specular power' constant

    All of the above fitting into yet another lovely Visio diagram (Visio rocks!):

  • Next Entry Cool resource
    0 likes 0 comments

    Comments

    Nobody has left a comment. You can be the first!
    You must log in to join the conversation.
    Don't have a GameDev.net account? Sign up!
    Advertisement
    Advertisement