Jump to content
  • Advertisement
  • entries
    422
  • comments
    1540
  • views
    490105

First of the lighting models

Sign in to follow this  
jollyjeffers

77 views

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:

  • 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!