PDA

View Full Version : Lights on a flat surface..!



iNsaNEiVaN
05-16-2001, 07:07 PM
Okay, i want lights to be moving across a flat surface but I know surface or vertex normals would do you no good because it only assigns one shade for the whole polygon. How do I achieve this effect?

THANKS!!!

Warrior
05-16-2001, 09:05 PM
You need to tesselate the surface with many polygons, then specify a surface normal for each polygon. this way your lighting effects will show up nicely.

As for moving lights, just define all your light propertys, then you move the light specifying a new position each time you want to move it. its that simple.

Teofuzz
05-16-2001, 11:54 PM
To achieve a better result you can use light mapping: it allows to use less polys (but one more texture) and then can be faster.
In the coding section of www.opengl.org (http://www.opengl.org) there are some links.
tFz