Jump to content
  • Advertisement
Sign in to follow this  
redeemer90

How does the doom3 engine render soo many lights

This topic is 4978 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

How do you mean realtime shadows?

From playing FarCry just now, it seems that it does indeed have dynamic stencil shadows. I couldn't really tell, but it seemed they were only cast by certain objects under certain lights. The FarCry website also has this:
Quote:

Lighting and Shadows: Combines pre-calculated, real-time shadows, stencil-shadows, and lightmaps to produce a dynamic environment. Includes high-resolution, correct-perspective, and volumetric smooth-shadow implementations for dramatic and realistic indoor shadowing. Also supports advanced particle technology and all kinds of volumetric lighting effects on particles.

From here.

The HL2 engine is a different story... what boggles my mind is why they spent so much time making awesome looking water, when shadows are a single projection coming from the sun, regardless of whether you are inside or out. Not to mention the fact that they go through walls, steps, etc. I've killed (and no doubt been killed by) CS:Source players simply because the shadow of a person was visible in places it shouldn't have been, thus alerting me to their position. (Awesome game, though, and that's what really counts.)

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by zedzeek
doom3 is the only one of the 3 games mentioned that features realtime shadows


Exactly! I'm not sure why, but Far-Cry, Half Life 2, and Doom 3 all seem to get lumped in the same category when people discuss engine architecture. (Maybe it's because they all use normal mapping... who knows.)

The way I see it is that Source is pretty much the last of the old "Quake" style engines, in that it relies heavily on pre-computed lightmapping and a lot of similar, "older" techniques to acheive it's graphical effects. It can look very nice if done right, but it has a lot of drawbacks such as most of the lighting being static, and requiring a HUGE amount of pre-processing time.

Doom 3, in contrast, is the first of a new generation of engines which are designed from the ground up to be completely dynamic. In the Doom 3 editor, you can pick up a light, move it around a hallway, and see the results in realtime as you move. That would never, EVER have happened with the old lightmapping techniques. (Far Cry seems to fall somewhere between these two, but I think it lies more on the Lightmapping side of the line)

Of course, you can never get everything right on the first go, and since Doom 3 is the first of these new style of engines, there were bound to be some bumps. Probably the most obvious is the classic "It's too dark!" complaint. The engine has been adjusted since to accomodate this (See Quake Wars screenshots), and future engines (such as Unreal Engine 3) definately look like an improvement. The fact of the matter is, though, that Doom 3 is probably the most advanced engine on the market at this moment.

(Get's off his little soapbox and goes back to cursing at Lightwave)

Share this post


Link to post
Share on other sites
Doom 3 does a bit of extra work to cut down on the amount of time per pass. Basically it draws just to the depth buffer, then it draws shadows, then it makes a pass or two per-light for the textures. And obviously you can throw in things like scissor testing, etc to cut down on how much drawing per-light you have to do.

http://www.beyond3d.com/interviews/carmackdoom3/

Share this post


Link to post
Share on other sites
Quote:
The DOOM engine performs some pre modulation and post scaling to support arbitrarily bright light values without clamping at the expense of dynamically tossing low order precision bits
I've wondered before about this. How would the scaling be done?

Share this post


Link to post
Share on other sites
there is a tutorial about how to make shadow with multiple light using opengl :
http://www.geocities.com/duktroa/RealTimeShadowTutorial.htm

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!