Sign in to follow this  

Simple Vertex Lighting Generation?

Recommended Posts

ajm113    355
Hello, I'm interested in generating my first light system for real time and I have a level loader that loads in cubes for walls, floors, entities, etc. What I want to do first before I dive into using something like Radiosity is I want to figure out how to do my own vertex lighting since most of my levels are going to be outside I don't need to worry about shadow detail. I can't seem to find a hole lot on this topic, but if someone can assist me on giving more detail on what I need to do or what the math equation is going to be like for each quad and or vertex. Thanks, Andrew.

Share this post

Link to post
Share on other sites
zyrolasting    280
Hey ajm!

A key ingredient of vertex lighting are normals for each vertex, so a knowledge of vector mathematics is a must. Based on the light types you want supported, you would implement a different algorithm for each.

For example, with directional lights you would use Lambert's Cosine Law to illuminate your vertices. At the most basic level no shadows are implemented, but this is a bigger problem than you think if realism is a priority. Experience in analytic geometry is also very helpful here.

Since you express that you do not care about shadows and you are in an outdoor environment, ambient light will come in handy. That's easy, just set each of your vertices to a constant color. As long as you understand that this will make your world look flat, you should be fine from the get-go.

Hope this helps!

Share this post

Link to post
Share on other sites

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

Sign in to follow this