• Advertisement
  • entries
    422
  • comments
    1540
  • views
    489613

Second of the lighting models

Sign in to follow this  

95 views

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!):

  • Sign in to follow this  


    0 Comments


    Recommended Comments

    There are no comments to display.

    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

    • Advertisement