Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Heimdal

OpenGL OpenGL Lights

This topic is 5332 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
Advertisement
Thanks for that great advice.
Well, I already googled for some docs but did not find some otherwise I would not post.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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. . .

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!