🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Lighting?

Started by
1 comment, last by Enalis 18 years, 3 months ago
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?
Douglas Eugene Reisinger II
Projects/Profile Site
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]
Thanks, I was just getting ready to use raytracing too :)
Douglas Eugene Reisinger II
Projects/Profile Site

This topic is closed to new replies.

Advertisement