OpenGL Lights

Started by
6 comments, last by Heimdal 20 years, 3 months ago
I just read that OpenGL Lights are not used in todays 3D engines but dynamic lightmaps. Is that right? Does anymone know an article about some concrete technics of a modern engine (please not source only, it takes to much time to read and understand)? Thx
Advertisement
Yup, google knows.
Thanks for that great advice.
Well, I already googled for some docs but did not find some otherwise I would not post.
google for details on the doom3 and halflife2 engines - both have nice lighting and neither use the standard opengl lighting.

other than that, look for tuts on lightmaps I guess.
[size="1"]
Both games probably do use standard T&L lighting when pixel shaders/fragment programs aren''t supported in hardware -- at least, for dynamic objects. For static objects and lights on that hardware they probably use lightmaps.

For capable hardware, I''m pretty sure that Doom 3 uses shadow volumes for everything. Not sure about HL2, though. . .
-Ostsol
Thx, I will try that. I am just wondering why they don''t use OpenGL lights. Is it to slow? Or does it not look good enough? Well, maybe I will finde the answer
quote:Original post by Heimdal
Thx, I will try that. I am just wondering why they don''t use OpenGL lights. Is it to slow? Or does it not look good enough? Well, maybe I will finde the answer


I am not sure about speed, but one problem is that they aren''t flexible enough. You can program shaders to do exactly what you want. If you use gl lights, you are stuck with what they have programmed for you.
----------------------------------------------------"Plant a tree. Remove a Bush" -A bumper sticker I saw.
quote:Original post by Heimdal
Thx, I will try that. I am just wondering why they don't use OpenGL lights. Is it to slow? Or does it not look good enough? Well, maybe I will finde the answer


Biggest problem with std OGL lighting is that its per-vertex based.
Imagine the situation when you have one big square and the light in the middle (bit moved forward). If the square is big enought that all vertices are far enought from the light, nothing will be lit(and it should be). In general, thats why are used some per-pixel aproaches (lightmaps, dot3, fragment programs). And these methods also provides some secondary effects that can be implented(e.g. per pixel bump mapping). And thus it looks far better than std lighting.


[edited by - osh on January 13, 2004 3:52:54 PM]

This topic is closed to new replies.

Advertisement