Advertisement

lighting ~_~

Started by January 09, 2003 12:12 PM
5 comments, last by ZeroGravity 22 years, 1 month ago
is there a nother way to do lighting sence openGL is only limited to 7 lights per scene i need nother way to handle light.a way that suppots all the same lighting types of OpenGL(emmisive spotlight ect).or is there a way to have more then 7 light ???
Free Your mind Free your Feeling~~~Working on~~~Nothing
It''s actually 8 lights ( 0-7 ). Remember that those 8 lights are per-primitive, not per scene. If you use vertex programs, you can have as many lights as you want, plus there''s always per-pixel lighting methods, which is unlimited in the number of lights you are able to use ( well, practically you have limits ).

Death of one is a tragedy, death of a million is just a statistic.
If at first you don't succeed, redefine success.
Advertisement
no more than 8 lights, (from GL_LIGHT0 to GL_LIGHT7) but 8 lights is more than enough. I''m pretty sure you don''t need more than 8 lights *simultaneously*. It has already been discussed billions of time, please search the forum.
ah, python_regious you were faster than me

at opengl.org faq there a brief answer to your question
Tee hee

Death of one is a tragedy, death of a million is just a statistic.
If at first you don't succeed, redefine success.
a related question - should I really try and use the built-in lights or is implementing all of the lights in the scene via lightmapping a hugely inoptimal way?

Crispy
"Literally, it means that Bob is everything you can think of, but not dead; i.e., Bob is a purple-spotted, yellow-striped bumblebee/dragon/pterodactyl hybrid with a voracious addiction to Twix candy bars, but not dead."- kSquared
Advertisement
lightmaps should be used wisely since (1) usually they''re not dynamic and (2) they eat a texture unit. Moreover it''s a bit hard to implement lightmaps whereas OpenGL standard lighting is easy (you don''t even have to call glNormal thanks to the GL_AUTO_NORMAL option).

This topic is closed to new replies.

Advertisement