id Tech 4


id Tech 4
Codebase id Tech 3
Developer(s) id Software
Written in C++
Target Platform Cross-Platform
License GNU General Public License v3+

id Tech 4, popularly known as the Doom 3 engine, is a game engine developed by id Software and first used in the video game Doom 3. The engine was designed by John Carmack, who also created previous engines such as those for Doom and Quake, which are also widely recognized as marking significant advances in the field. This OpenGL-based game engine has also been used in Quake 4, Prey, Enemy Territory: Quake Wars, Wolfenstein and Brink.


id Tech 4 began as an enhancement to id Tech 3. During development, it was initially just a complete rewrite of the engine's renderer, while still retaining other subsystems, such as file access, and memory management. The decision to switch from C to the C++ programming language necessitated a restructuring and rewrite of the rest of the engine; today, while id Tech 4 contains code from id Tech 3, much of it has been rewritten.[1]

On November 22, 2011, Carmack released the Doom 3 source code on GitHub.[2] The source does not include any of the 'Carmack's Reverse' code. According to Carmack, minor tweaks were made to the code to avoid any infringement.[3]


The original requirement of id Tech 4 was that it needed a high-end graphics processing unit (GPU) with fully programmable vertex and pixel shaders. The "Ultra" graphics mode included in Doom 3 would not even run on the current popular graphics cards available in 2004, requiring at least 512 MB of video memory to display properly and at playable speeds, meaning that it was basically unusable at the time of release.[4]

id Tech 4 resulted in the obsolescence of DirectX 7 graphics chips such as the widespread GeForce 2 and Radeon 7200, as well as older chipsets. Until the advent of id Tech 4, a powerful CPU was able to somewhat compensate for an older video card. There have been cases of enthusiasts forcing Doom 3 to run on unsupported graphics chips, such as the long obsolete Voodoo 2, but these are unable to render the per-pixel lighting and bump mapping.[5]



Id Tech 4 added several new graphical features absent in its predecessor, id Tech 3. These included bump mapping, normal mapping, and specular highlighting. More features were added in the development of successive games, and in yet unreleased games using id Tech 4, new features have been added or are planned to be added soon.

The primary innovation of id Tech 4 was its use of entirely dynamic per-pixel lighting, whereas previously, 3D engines had relied primarily on pre-calculated per-vertex lighting or lightmaps and Gouraud shading. While dynamic effects had been available before (such as dynamic moving lights), this effect merely changed the brightness of the vertices of the polygon, with the pixel's colors simply being interpolated between the three vertex colors of its polygon.

This fully realtime approach used in Doom 3, combined with the use of shadow volumes permitted more realistic lighting and shadows[6] than in the previous generation of id's engines. The method used to create the shadow volumes is the subject of a patent by Creative, which Creative granted id permission to use in the Doom 3 engine, in exchange for supporting Creative's EAX advanced sound technologies.[7]

The models used in id Tech 4 engine games are animated using skeletal animation. The engine can blend multiple animations together, to produce a skin that moves correctly for those animations. Because this is CPU intensive, id did some work optimising this by using Intel's Streaming SIMD Extensions (SSE).[8]

MegaTexture rendering technology[edit]

The original version of the id Tech 4 engine was designed for somewhat dark environments so it was criticized for its perceived inability to handle extremely large day time outdoor areas. The MegaTexture technology not only removed this issue by introducing a means to create expansive outdoor scenes but also made the new version as the best game engine to handle the outdoor areas. By painting a single massive texture (32 768×32 768 pixels or more) covering the entire polygon map and highly detailed terrain, the desired effects can be achieved. The MegaTexture can also store physical information about the terrain such as the amount of traction in certain areas or indicate what sound effect should be played when walking over specific parts of the map. i.e. walking on rock will sound different from walking on grass.[9] It is expected that this will result in a considerably more detailed scene than the majority of existing technologies, using tiled textures, allow. Currently, the only game that utilizes MegaTexture based on the Tech 4 engine is Enemy Territory: Quake Wars.

Rendering techniques used in id Tech 4[edit]


id Tech 4 has a comprehensive scripting language which can be used when creating mods, and is used in Doom 3 to control monsters, weapons, and map events. This scripting language is similar to C++.[10]

In addition to the main scripting language, idTech 4 also has another scripting language that is used for GUIs - both the menus and HUD, and also for GUIs embedded into the game world.[11] These in-game GUIs are sufficiently powerful that you can, for example, run another game such as Doom 1 within the game-world.[12]

Despite this additional level of scripting, it is also possible to create mods using C++ to build native code.[13]


As a result of the agreement with Creative regarding the patent on shadow volumes, the id Tech 4 engine supports OpenAL, including the Creative Technology-specific EAX extensions. The work to include OpenAL support was done by Creative Technology, not by id themselves.[14]


The engine uses a traditional client–server model. Initially it was planned to have a peer-to-peer networking model.[15] This part of the engine works in a fundamentally similar way to the id Tech 3 equivalent, however id Tech 4 exposes a lot more of the network protocol to mod developers.[16]

Although Doom 3 only supports 4 players, the id Tech 4 engine can be used with more players than this, with Quake 4 and Enemy Territory: Quake Wars both supporting significantly more players.

Games using the engine[edit]

Unlike the preceding and widely used id Tech 3 (Quake III Arena engine) and id Tech 2 (Quake II engine), id Tech 4 has had less success in licensing to third parties. This is especially apparent in comparison to its closest contemporaries, Unreal Engine 2 (2002) and Unreal Engine 3 (2006) from Epic Games.[17] id Software was unwilling to license their newest engine before its "parent game" Doom 3 was completed. However the unexpected long development time going into Doom 3 from 2002-04 meant that they could not put up competition to Epic Games's Unreal Engine 2 during that period. Many who licensed Unreal Engine 2 were thus able to make the switch to Unreal Engine 3 more easily.

While id Tech 4 had taken a new direction with its dynamic per-pixel lighting, this unconventional feature had steeper hardware requirements and was initially only useful in "spooky games" (until the MegaTexture addition), whereas an increasing number of developers preferred conventional engines that could render large outdoor areas. Also notable was id Tech 4's relative lack of downward scalability compared to competing FPS engines; id Tech 4 generally required a DirectX 8.0 compliant GPU such as a GeForce 3; the rival Source engine could still run on the older widespread DirectX 7 GPUs (albeit without shaders being used).

Games using a proprietary license[edit]

Official source ports
Based on Name Base for
id Tech 3 id Tech 4 Doom 3 source code
Doom 3: BFG Edition source code
id Tech 5


  • This article incorporates text from the open-content Wikipedia online encyclopedia article id Tech 4.

See also[edit]

External links[edit]


  1. Q&A with John Carmack, E3 2002
  2. Doom 3 Source on GitHub
  3. John Carmack tweets about code infringement work around
  4. Doom is a boon Game Industry News, article by Todd Hargosh.
  5. Doom3 + Voodoo2_Patch_v1_0
  6. Doom 3
  7. John Carmack: "This sucks."
  8. Optimizing the Rendering Pipeline of Animated Models Using the Intel Streaming SIMD Extensions
  9. GameSpy: Enemy Territory: Quake Wars Preview
  10. Making DOOM 3 Mods : Scripts (archived 🏛)
  11. Making DOOM 3 Mods : GUIs (archived 🏛)
  12. Fully Interactive Surfaces
  13. Making DOOM 3 Mods : The Code (archived 🏛)
  14. How the latest Sound Blaster X-Fi technology was utilized in QUAKE 4
  15. Doom 3 multiplayer networking info
  16. The Code - see Game Utility Files (archived 🏛)
  17. id Tech 5
  18. Prey 2 producer on taking new direction, with 'capable' id Tech 4
id Software
Doom era
Idlogo old.png
Doom 3 era
IdSoftware Logo 200x.png
ZeniMax era
IdSoftware Logo 2016.png