DoomTracer

DoomTracer was a experimental source port created by Sohail Shafii and AJ Tavakoli. It implements a renderer in Doom and it uses the Chocolate Doom port to provide a common codebase to send events to it.

History
Starting preliminary development in 2008, DoomTracer was initially conceived as a pure raytracer that could render Doom levels with typical features associated with it, such as refraction, reflection and shadowing and constituted more of a extended experiment. In order to get the renderer to a playable state, the Chocolate Doom port was chosen.

The first release, incidentally also the first public release using Chocolate Doom as its base was 0.5 beta, released on June 11, 2010. It required a high resolution texture pack and music files to function, a significant limitation which was resolved with the next release on July 11, 2010 which in turn provided compilation for Linux.

A final release followed a few months later on November 6, 2010 as 0.56 beta. It brought in support for specific flashes for damage and item pickups, included support for the screen melt effect, moving textures for moving walls, tweaked reflections and the inclusion of transparent (refractive) spectres.

Legacy
Shafii noted afterwards in this Doomworld forums that he initially thought using Doom's underpinnings, with its two-dimensional BSP, would make rendering very fast but he soon realized that making a three-dimensional representation of what is essentially a 2D data structure comes with several caveats, and mentioned Quake as a possible better alternative.

Engine
Since DoomTracer features a raytracer that runs on the, performance is not only dependent on the of a single processor core, but also on the amount of  that can be used. In DoomTracer, the renderer will slow down when the amount of lights in a scene gets very high, despite using multiple threads. In order to speed up the rendering process, several workarounds are devised. DoomTracer cuts out lights that are too far away from the player since their intensity fades out as distance increases. A system is employed for each point that requires lighting: The only lights tested are those that are visible from the point that requires illumination.

The PVS system depends on geometry, but uses sector information to compute it. Since sectors aren't convex, the computational algorithm for this is rather rough. However, it has the benefit that loading times are relatively fast. It was originally planned by the team to use subsectors which are convex, but they ran into issues figuring out the neighboring subsector on the other side of a subsector's double-sided portal. An alternative package system was devised to compute the PVS, but further issues prevented the team from incorporating its code, in the end sticking by with the existing rough solution.

A standalone renderer/level viewer can be created which allows the user to walk through the levels without visualizing sprites or dealing with game events. In order to do this you need to use the file from the source code to compile. This also requires the Fonts archive to render FPS and other statistics.

A more detailed explanation of the raytracing renderer used in DoomTracer can be found in the file.

Features
DoomTracer needs at minimum a dual-core processor and is compiled with eight SDL threads, so it scales reasonably well with processors that can meet this amount. The thread count can be modified in the file.
 * All existing features from Chocolate Doom 1.3.0
 * Different resolutions:
 * 320x200
 * 320x240
 * 640x480 (This runs very slow)
 * Raytraced shadows for monsters as they are represented as paper-like objects
 * Moving textures on moving walls
 * Dynamic and static raytraced lighting using a PVS system
 * Lights are automatically generated based on certain textures that the renderer determined as lights
 * Reflections on certain surfaces, like slime, water
 * Refractions (for spectre's)
 * Tested with The Ultimate Doom only

Trivia

 * Andrew Stine (Linguica) compiled the standalone level viewer in March 2018 and showed off two high-resolution screenshots (789x441 and 790x586 resolution, respectively) of the renderer in this Doomworld and in this Doomworld.