Jump to content
  • Advertisement
Sign in to follow this  
Enalis

Lighting?

This topic is 4616 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 have been pondering how to tackle lighting and I've decided that I would like to add lighting similar to Doom 3 in my engine where each light source almost seems like it's raytraced but I can't be sure. Basically how would you guys handle multiple light sources casting multiple shadows on everything or perhaps would you inface kind of raytrace the lights so that the shadows are not even done, they are automatically generated by the absence of light? Or would I simply have to manage what every single light collides into and what portion of the light would continue wrather than calculating every "ray"? Basically what I'm asking is, how did doom3 do it and can someone point me in the direction of an article or even perhaps a tutorial? And yes I realize that it isn't for the faint hearted programmer, I understand shaders and have used them and I was just wondering how to go about this one?

Share this post


Link to post
Share on other sites
Advertisement
Doom3 does not use raytracing, infact no games use raytracing because it's way to computationaly intesive.

Doom3 uses z-fail shadow volumes wich is sort of an advancement of lesson27 and under the right conditions creates shadows that looks sort of like if they where raytraced.
besides the shadow volumes uses normal maps and per pixel lighting, it's really basic stuff and more or less every game uses this stuff today.
but the real heart of doom3 is what makes it a third gen game engine.
It can combine any number of light sources by using multiple passes.
Basically you render one lightpass and then copy that to a texture additive blending or using the accum buffer, it's fairly simple once you know it, try using the method from lesson36 or FBOs.

some links
http://www.gamedev.net/reference/articles/article1990.asp
http://en.wikipedia.org/wiki/Stencil_shadow_volume
http://www.devmaster.net/articles/shadow_techniques/

[Edited by - lc_overlord on March 29, 2006 5:32:08 PM]

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!