Reverse engineering the rendering of a frame in Deus Ex: Human Revolution

Earlier this year, Adrian Courrèges wrote an article detailing his findings while reverse engineering the rendering pipeline in Deus Ex: Human Revolution.

Starting from a given frame, he illustrates the different stages in the rendering: creation of the G buffer, shadow map, ambient occlusion, light prepass, how opaque and transparent objects are treated differently, volumetric lights, bloom effect in LDR, anti-aliasing and color correction, the depth of field, and finally the object interaction visual feedback.

Here are a few screenshots stolen from his article:

Normal map

The light pre-pass

Final image

Update:
Adrian since then posted a new article, this time breaking down the rendering of a frame in Supreme Commander. The comments also include insights from the programmer then in charge of the rendering, Jon Mavor.

GDC 2015 presentations

The Game Developers Conference took place last week in San Francisco. As I am starting to see more speakers publish their slides, I am creating this post to keep track of some them (this list is not meant to be exhaustive).

For a more extensive list, Cédric Guillemet has been garnering links to GDC 2015 papers on his blog.

A list of important graphics research papers

This is an announcement that got all my attention. Since Twitter is a mess to find anything older than a day, here is the list so far:

  1. A Characterization of Ten Hidden-Surface Algorithms, Sutherland et al., ACM Computing Surveys, 1974
  2. Survey of Texture Mapping, Paul Heckbert, IEEE Computer Graphics and Applications, 1986
  3. Rendering Complex Scenes with Memory-Coherent Ray Tracing, Matt Pharr et al., proceedings of SIGGRAPH, 1997
  4. An Efficient Representation for Irradiance Environment Maps, Ramamoorthi & Hanrahan, proceedings of SIGGRAPH, 2001
  5. Decoupled Sampling for Graphics Pipelines, Ragan-Kelley et al. ACM Transactions on Graphics, 2011
  6. The Aliasing Problem in Computer-Generated Shaded Images, Franklin C. Crow, Communications of the ACM, 1977
  7. Ray Tracing Complex Scenes, Kay & Kajiya, proceedings of SIGGRAPH, 1986
  8. Hierarchical Z-buffer Visibility, Greene et al., proceedings of SIGGRAPH, 1993
  9. Geometry Images, Gu et al., ACM Transactions on Graphics, 2002
  10. A Hidden-Surface Algorithm with Anti-Aliasing, Edwin Catmull, proceedings of SIGGRAPH, 1978
  11. Modeling the Interaction of Light Between Diffuse Surfaces, Goral et al., proceedings of SIGGRAPH, 1984
    “The first radiosity paper, with the real physical Cornell box (which I’ve actually have seen in real life!)”
  12. Pyramidal Parametrics, Lance Williams, proceedings of SIGGRAPH, 1983
  13. Rendering synthetic objects into real scenes: bridging traditional and image-based graphics with global illumination and high dynamic range photography, Paul Debevec, proceedings of SIGGRAPH 2008
    “Influence on gfx proportional to title length!”
  14. A parallel algorithm for polygon rasterization, Juan Pineda, proceedings of SIGGRAPH, 1988
  15. Rendering from compressed textures, Beers et al., proceedings of SIGGRAPH 1996
    “This one (out of 3) of the 1st texture compression papers ever! Uses VQ so probably not something you want today, but major eye opener!”
  16. A general version of Crow’s shadow volumes, P. Bergeron, IEEE Computer Graphics and Applications, 1986
    “Generalized SV. Nice trick”
  17. Reality engine graphics, Kurt Akeley, proceedings of SIGGRAPH 1993
    “Paper describes MSAA, guard bands, etc etc”
  18. The design and analysis of a cache architecture for texture mapping, Hakura and Gupta, proceedings of ISCA 1997
    “Classic texture $ paper!”
  19. Deep shadow maps, Lokovic and Veach, proceedings of SIGGRAPH 2000
    “Lots of inspiration here!”
  20. The Reyes image rendering architecture, Cook et al., proceedings of SIGGRAPH 1987
    “Sooo good & mega-influential!”
  21. A practical model for subsurface light transport, Jensen et al., proceedings of SIGGRAPH 2001
  22. Casting curved shadows on curved surfaces, Lance Williams, proceedings of SIGGRAPH 1978
    “*the* shadow map paper!”
  23. On the design of display processors, Myer and Sutherland, Communications of the ACM 1968
    “Wheel of reincarnation”
  24. Ray tracing Jell-O brand gelatin, Paul S. Heckbert, Communications of the ACM 1988
  25. Talisman: Commodity realtime 3D graphics for the PC, Torborg and Kajiya, Proceedings of SIGGRAPH 1996
  26. A Frequency Analysis of Light Transport, Durand et al., Proceedings of SIGGRAPH 2005
    “Very influential!!”
  27. An Ambient Light Illumination Mode (behind a paywall), S. Zhukov, A. Iones, G. Kronin, Eurographics 1998
    “First paper on ambient occlusion, AFAIK. Not that old…”

Simple fragment shader based wireframe display

On his blog, Florian Boesch introduces to a clever technique to render wireframe polygons using fragment shading, along with a live demo. The full explanation is presented in this paper. For convex polygons, just add as an attribute (or compute in the geometry shader?) the distance between the vertex and the other edges, and use the minimum distance in the fragment shader. Simple, easy to implement, and a nice anti-aliased result. (the paper also presents a second technique for non-convex polygons).

Series of articles on anti-aliasing

Matt Pettineo is writing an interesting and in-depth series of articles on anti-aliasing:

In this last article, he provides a list of captures comparing the results he obtained, as well as the source code.

On a side note, I like this short post of Timothy Lottes (well known for FXAA and TXAA) where he compares typical film image with typical video game one. His example of temporal aliasing is also worth keeping in mind.