Doom III Referesher

Well... that's even more perplexing... why wouldn't Id tech 4 use that method... and that seems to contradict this statement from CarstenS "Stencil Shadows use bounding volumes, requiring the generation of triangles, which classically is CPU work"...
 
Becouse casting triangles to infinity will double the number of triangles you have to render for shadow casters? You can avoid that by calculating shadow volume on CPU (or geometry shaders). As said, there are more ways to do this.
But again, why do you think stencil shadows are the problem? What's the data? It could be just that Doom 3 doesn't go over certain fps to avoid physics cheating. Or that it doesn't scale over multiple CPU cores (if you are generating shadow volumes on CPU then this can be easily multithreaded).
 
Well... Doom 3 itself is not so limited FPS-wise other than the physics ticks... (on today's CPU's) But if you try to use Id Tech 4 for a game that has more Geometry than Doom 3 (which is pretty low-poly by today's standards) then the additional shadow detail will eat up CPU cycles quickly... I believe that Prey's version of Id Tech 4 has multi-core support but it has not been specified if the Shadow algorithm takes advantage of that. If you disable the Shadows in Doom 3 the FPS rate sky-rockets but that would not be acceptable for "The Dark Mod" or other games that rely on Shadows for the game mechanic. In fact, many of the maps for "The Dark Mod" have sections where dynamic shadows are disabled to improve Geometry processing at the expense of some game-play depth...
 
QW:ET uses stencil shadow. Wolfenstein uses prebaked lighting with perhaps additional dynamic shadow mapping - but certainly no stencil shadows.

Just a clarification, the multiplayer part of Wolfenstein uses stencil shadows (with a soft pass) because it's based on the ETQW engine not the single player engine (custom made by Raven on top of Q4's).

Well... Doom 3 itself is not so limited FPS-wise other than the physics ticks... (on today's CPU's) But if you try to use Id Tech 4 for a game that has more Geometry than Doom 3 (which is pretty low-poly by today's standards) then the additional shadow detail will eat up CPU cycles quickly... I believe that Prey's version of Id Tech 4 has multi-core support but it has not been specified if the Shadow algorithm takes advantage of that. If you disable the Shadows in Doom 3 the FPS rate sky-rockets but that would not be acceptable for "The Dark Mod" or other games that rely on Shadows for the game mechanic. In fact, many of the maps for "The Dark Mod" have sections where dynamic shadows are disabled to improve Geometry processing at the expense of some game-play depth...

Fillrate has always been a problem, the way maps are built make more difference than whether the game is mc-aware or not. I haven't (yet, no time damnit) tried the Dark Mod so I can't judge the maps but as a level designer myself there's a definitive way to build id Tech 4 maps. fortune cookie advice: the bigger the light volumes the less geometry you can have. There's also all kinds of tricks you can do with Q4 (and I think Prey) like selectively disable dynamic shadow casting (not lighting) on parts of the geometry. The level compiler will (sometimes) optimise for this but in my experience I could always do a better job than it. This will introduce another problem which, I believe, is the real issue here: batching.

The engine doesn't deal very well with it and it's quite, quite easy to build a level with horrible draw calls if you don't pay attention to the problem. It got easier with Q4 since it had some debugging tools specifically for finding suboptimal batching areas but it's still a balance between shadow fillrate, texture quality, light count per surface and CPU batching overhead.

D3 also had shadow volumes on the CPU because you could precalc all the static geometry and then have low-poly shadow hulls for characters/dynamic geometry. For a game aimed at GF4 level hardware and released when the R300/GFFX were brand new, it was definitely the right choice.
 
Yeah, it all makes sense now... I just prefer that most processing be done on the GPU, partly because of my ancient rig but mostly because I know that the pace of CPU improvement is significantly slower than GPU improvement.

I still feel that Id Tech 4 is a great fundamental step towards real-time lighting replacing baked lighting and the core of what was done could be extended to newer techniques. The only thing I didn't like was the polygon counts. I could easily live without Radiance Transfer (and better shaders could be used to improve the situation). The engine seems especially suited to night lighting and The Dark Mod is almost the perfect example of this. It's a shame that Id seems to have retreated from full-on real-time lighting in their Id Tech 5 products but I probably would've set out to prove my mettle with Texturing after being "defeated" in popular opinion by Half Life 2's texture heavy approach. I can imagine Carmack's frustration as legions of gamers showered HL2 with adoration as an advanced DX9 game when most of it's visual kick is from DX7 techniques.( I was equally put-off by people calling Painkiller a DX9 game... I believe that it had no DX9 shaders at all).
I can also imagine him shouting "You people want textures!?!? I'll give you f*cking textures!?! MEGATEXTURE!!!" ...And maybe his Voxel Octree is Carmack similarly schooling the industry about how to achieve polygon density.

It kinda reminds me of when I was in a band and the lead guitar / vocalist was also the primary songwriter but he had some deficiencies in melody structure comprehension. I got fed-up with the weak or unresolved melody lines in his songs and I wrote a whole song with a simple (but correct) melody to prove my point (I was usually such a perfectionist I could never complete complete anything... constant revision...).
 
If 90% of the visual appearance of a game is from textures, I consider the game DX7 regardless of the actual API used (unless the textures are procedural). I will concede that HL2's look couldn't be fully achieved with textures alone but I won't pretend that the shaders were the biggest part of why HL2 is pretty.
 
I disagree. HL2's look primarily comes from radiosity combined with normal mapping and that's just impossible with DX7 tech. Read the paper.
 
Last edited by a moderator:
The paper appears to show MRT's for shader passes. The resultant MRT textures could be approximated via pre-rendered multi-textures but... yes the Specular and Radiosity could not (well... the Specular could be approximated via EMBM...). I cant "technically" justify calling HL2 a DX7 game but Doom 3's dynamic capabilities seem to be a more significant leap forward. If Doom 3 is a DX8 baseline engine then I wanted to see something similarly dynamic for DX9 level effects (the closest current contender for that role is UE3???).

I cant really disparage HL2 too much... It's an excellent game and looks very good...
I would even prefer the Source Engine for games like the recent Ghostbusters title... (c'mon L4D2 Ghostbuster Co-Op Mod...plz dont die)

I just find Doom 3's technology more exciting, even now (especially with the looming GPL...)
 
Well why is "normal mapping" (Doom 3) more then "normal mapping combined with precomputed radiosity". The question is: how are local lights solved and how are global lights solved? In D3 there really aren't many global lights and the whole point is kinda ignored, or solved with a bunch of local lights. HL 2 has both and it solves global lights with precomputed radiosity and thus doesn't really need a ton of sharp obvious local lights.

And what's that with MRT's? What is shown in the paper is how the entire effect is assembled in shaders step by step. You could do the same for D3 or any other game. And this has nothing to do with MRT.
 
There's a lot of info about Doom 3's stencil shadowing in this paper. As you'll see they do the volume extrusion on the CPU, so it's not surprising that high vertex loads will swamp the CPU.
 
For a game aimed at GF4 level hardware and released when the R300/GFFX were brand new, it was definitely the right choice.

Not to nit-pick, but D3 was released in late summer of 2004, almost two years after R300 and 1.5 (give or take a little time) behind NV30. Not brand new, but your point still stands since both IHVs were still releasing derivatives of those architectures in 2004 (if memory serves).
 
QW:ET uses stencil shadow. Wolfenstein uses prebaked lighting with perhaps additional dynamic shadow mapping - but certainly no stencil shadows.

Afaik QW uses stencil shadows for the dynamic objects and baked (on the Megatexture) shadows for the terrain. Wolfenstein (sp) doesn't use prebaked light as you said and does use stencil shadows in this case soft edge stencil shadows.
 
Well why is "normal mapping" (Doom 3) more then "normal mapping combined with precomputed radiosity". The question is: how are local lights solved and how are global lights solved? In D3 there really aren't many global lights and the whole point is kinda ignored, or solved with a bunch of local lights. HL 2 has both and it solves global lights with precomputed radiosity and thus doesn't really need a ton of sharp obvious local lights.

And what's that with MRT's? What is shown in the paper is how the entire effect is assembled in shaders step by step. You could do the same for D3 or any other game. And this has nothing to do with MRT.

OK, I had a misconception about what was presented there. I thought each image was a render-target and that they were blended to form the final image (Multiple Render Targets).

That said, I think that Doom 3, from an artistic angle tried, (as best as possible) to make sure that the look of their textures were as neutral as possible so it inherited most of it's appearance from the lighting. I now that I have my preconceptions back in line, I see that HL2 had a fair amount of "lighting-neutral" textures that also inherited from the Radiance map. I guess the defining difference is that Doom 3 used normal maps in such a way that detailed nooks and crannies of the surfaces played against the light sources to imbue a greater sense of geometric complexity (until you look at the silhouettes) , while HL2 seemed to have smoother surfaces and subtle depth cues in it's normal maps (and maybe less normal maps overall?).

So perhaps if HL2 had used more normal maps (with more pronounces depth cues), there would be even less reason to believe that Id Tech 4 had any strengths in comparison to Source. Yet, I can't help but marvel at the realism of seeing a guard wandering around with a torch in hand who is projecting shadows against walls that realistically shrink or grow (depending on distance) in a way that only shadow volumes seem to be able to achieve. I just wish this magic was happening 100% on my GPU...
 
Last edited by a moderator:
That's either a remarkable coincidence or you frequent "The Dark Mod"s forums a because mappers forum has been praising Blade of Darkness recently... (and some textures were donated to them from an original member of the team who created it...).
 
Back
Top