Jump to content
  • entries
    422
  • comments
    1540
  • views
    490584

Second of the lighting models

Sign in to follow this  
jollyjeffers

103 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
    ×

    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!