Inside id Tech 4

In november last year, id Software released the id Tech 4 source code – the inner workings of Doom 3, that is, on Github, and people have been happily hacking away at it ever since.

I found this website by Fabien Sanglard, on which he goes into great detail on how the project is structured, and how the different subsystems work. If you’re into programming, it’s a fantastic read, and very interesting to see how it all fits together. For me, the in-depth review of Doom 3’s renderer really stood out

One of Doom 3’s biggest achievements is introducing unified lighting into games, stepping away from the traditional hackery required to display several objects under lighting conditions which change dramatically from environment to environment.

Well, the fundamental thing about it on the rendering side is that it completely, properly unifies the lighting of surfaces. With previous games, you always had to use a collection of tricks and hacks to do your lighting. We would do light maps, blurring, ray-casted light maps for the static lighting, and static lights on static surfaces in the games. We used a different level-point Gouraud thing doing the static lights on dynamic surfaces moving around and then mushing together all of the dynamic lights onto the dynamic surfaces to modify the Gouraud shading.

There was this matrix of four things you would have static surfaces, dynamic surfaces, static lights, and dynamic lights, and there were four different sorts of ways that things got rendered. You might have lights this way and that way for one, and you might have shadows a different way and lighting a different way for another thing. That was more or less forced because of the limitations that we had to work with in terms of what the hardware and processors could do. I always thought that was a negative thing.Things Shaved differently as to whether they were going to move or not. i referred to it as the ‘Hanna- Barbera effect/You could always tell these rocks were going to fall away because they looked a little different than the cell painting behind them. The big goal for DOOM 3 was to unify the lighting and shading so that everything behaved the same no matter where it came from, whether it’s moving around or a fixed Part of the world.

There’s also a seperate page on interviews with John Carmack, which also contains all plans and interviews he’s done between 1996 and now. Carmack is a bit of a personal hero. He’s at the root of rendering in 3d games as we know it, pitched the Carmack’s reverse, and the rendering techniques he introduces for games have became instant industry standards (most certainly in the early 2000’s, now there’s more diversity with the deferred rendering pipelines). Oh, and he’s also a rocket scientist at Armadillo Aerospace.

You can read all the famous .plan files he kept during his development hours at id Software, and get an insight on how the tackles problems, and what daily problems arise when building a triple-A game title.

All of this just feeds the itch I have to dust out the old Doom 3 discs and compiling it myself.

Leave a Reply