Doom 3 - light model?

Hi gurus,

Recently I’ve been looking through screenshots for the upcoming Doom 3, and was just wondering how Carmack is getting such nice looking lighting effects:

Gorgeous diffuse lighting
On -the-fly specular highlights
Multiple overlapping shadows
Projected textures from light sources
Self-occlusions

So how is he doing it? The projected shadows’ geometry is too perfect to be anything other than calculated geometry, rendered via shadow volumes.

What about the diffuse lighting - surely that can’t be using light maps? I can’t see any obvious jagged edges to the lights - does this mean he is using very high-res luminance textures?

Specular reflections - surely he can’t be geometrically calculating those on a per-frame basis as well?

Any thoughts, speculations (pun unintended) or links to similar discussions much appreciated!

Bob B.

It has actually been discussed to death already
Browse this (note the “Archived updates” dropdown to the right).
The advanced forum seems to be down, unfortunately. We had some interesting threads on the subject.

Multiple overlapping shadows and self-shadowing are automatic feats of a good stencil shadow volume approach. Start with rendering all opaque geometry to the z buffer (ie leave the color buffer cleared to black), then
-produce volumes for one light
-accumulate contribution of this one light
-repeat for all lights

As I take it the volume geometry is calculated per frame, per light. To reduce workload, the polygon counts are kept pretty low. Some of the lost detail (from the original high-poly models) is reconstructed during the lighting phase with normal maps.

The rest is per-pixel lighting. That was one of the famous quotes from Macworld expo, every surface gets the same lighting equation, no more tricks, something along these lines.

One of your images obviously has a projected light map, but we can’t really know for sure whether that will be used to any meaningful extent in the final version.

Google for “per-pixel lighting”, “bumpmapping” (or “normalmapping”), “specular lighting” and “stencil shadows”. After reading the one billion papers you will find about that stuff, you will know everything you want to know.

Jan.

Originally posted by zeckensack:
Browse this (note the “Archived updates” dropdown to the right).
The advanced forum seems to be down, unfortunately. We had some interesting threads on the subject.

Ah, that’s a shame. I look forward to the advanced forum being fixed!

That’s an excellent link, thanks.

Originally posted by zeckensack:
Multiple overlapping shadows and self-shadowing […] The rest is per-pixel lighting. […]

There must be some serious multi-pass rendering going on, then? Like 10-15 passes each frame!

When I hear “per-pixel lighting” it’s usually in conjunction with pixel shaders, and I’ve thought no more about it. After a quick Google on the subject methinks I need to do some reading up on DOT3! I’d no idea this stuff was even possible in non-shader OpenGL.

Originally posted by zeckensack:
One of your images obviously has a projected light map, but we can’t really know for sure whether that will be used to any meaningful extent in the final version.

Good point - these screenshots all need to be considered “work in progress”. It’ll be interesting to see what changes by release.

Originally posted by Jan2000:
After reading the one billion papers you will find about that stuff, you will know everything you want to know.

Ah, heh, better put the kettle on…