First of the lighting models

Published November 01, 2005
Advertisement
Right, so I finally have something moderately technical to put in my journal. Hope you guys find it useful [grin]

This is an extension of yesterdays overview on lighting.

Blinn-Phong

This model is pretty much the defacto-standard kicking around today. It's also pretty similar to what you can get if you use the Direct3D fixed-function lighting. Seems like a good place to start.

There are a few similar variants kicking around, and this following equation is the one I'm going to use:



The subscript 'I' (Intensity) and 'C' (Colour) parts can be rolled into one, making there 3 colours in the equation: Ambient, Diffuse and Specular.

Inputs
  • Diffuse Texture Map
  • Specular Texture Map
  • Normal Texture Map

  • Ambient Term Constant
  • Specular Power Constant
  • Light Position Constant
  • Light Range Constant
  • Light Falloff Constant

  • World Matrix
  • World*View*Proj Matrix

    Vertex Data
  • Position
  • Normal (Computed with D3DXComputeNormals())
  • Tangent (Computed with D3DXComputeTangents())
  • TexCoord

    All fitting into this lovely Visio diagram:

  • Previous Entry Will it work..
    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