Advertisement

Using lights....

Started by July 10, 2001 04:46 PM
1 comment, last by Tentacula 23 years, 7 months ago
Hi, My current project is to make a racing game, but I don''t know what lightning system is the best to render the light produced by the cars lights on the terrain. (if I have 8 cars, I will have 16 lights that must be lightning at the same time, really too much to use the glLights !) What''s the best : Lightmapping or Vertex lightning ?? And, in both case, how to use it ?? (In the case of Lightmapping, I don''t know if I can apply a lightmap as a decal on a surface ?) thanks.
The number of OpenGL lights needed is per polygon and not how many lights the scene will have. Vertex lighting is often used as another name for OpenGL lights. The best way to implement lightmaps is by using multitexturing. The lightmaps should not be applied as a decal but instead be mixed with the base texture.

Here is a number of things that can be used for the car lights:
- a blended cone to show the light in the air
- projected textures for the lights on the ground
- a OpenGL light with spotlight settings ( this can probably be skipped)
You can of course also implement shadows.

Here is some information about realtime realistic lighting effects http://www.cs.unc.edu/~hoff/projects/summer98_disney_lighting_effects/docs/index.html
A archive with the code and some bug fixes http://sites.netscape.net/ptrpck/hoff.htm
Advertisement
LIGHT MAP for sure !!

How...Read NeHe Tutorial !! Ok, fast note ::
Light map is basicly another polygon with an grayscale texture on it. So You place another polygon on the place where you want the light to be.
Help me with my Isometric OpenGL engine.

This topic is closed to new replies.

Advertisement