Q2VKPT Makes Quake 2 the First Entirely Raytraced Game
Subject: General Tech | January 18, 2019 - 06:09 PM | Sebastian Peak
Tagged: vulkan, rtx, raytracing, Quake II, quake, Q2VKPT, Q2PRO, path tracing, open source, nvidia, john carmack, github, fps
Wait - the first fully raytraced game was released in 1997? Not exactly, but Q2VKPT is. That name is not a typo (it stands for Quake 2 Vulkan Path Tracing) it's actually a game - or, more correctly, a proof-of-concept. But not just any game; we're talking about Quake 2. Technically this is a combination of Q2PRO, "an enhanced Quake 2 client and server for Windows and Linux", and VKPT, or Vulkan Path Tracing.
The end result is a fully raytraced experience that, if nothing else, gives the computer hardware media more to run on NVIDIA's GeForce RTX graphics cards right now than the endless BFV demos. Who would have guessed we'd be benchmarking Quake 2 again in 2019?
"Q2VKPT is the first playable game that is entirely raytraced and efficiently simulates fully dynamic lighting in real-time, with the same modern techniques as used in the movie industry (see Disney's practical guide to path tracing). The recent release of GPUs with raytracing capabilities has opened up entirely new possibilities for the future of game graphics, yet making good use of raytracing is non-trivial. While some games have started to explore improvements in shadow and reflection rendering, Q2VKPT is the first project to implement an efficient unified solution for all types of light transport: direct, scattered, and reflected light (see media). This kind of unification has led to a dramatic increase in both flexibility and productivity in the movie industry. The chance to have the same development in games promises a similar increase in visual fidelity and realism for game graphics in the coming years.
This project is meant to serve as a proof-of-concept for computer graphics research and the game industry alike, and to give enthusiasts a glimpse into the potential future of game graphics. Besides the use of hardware-accelerated raytracing, Q2VKPT mainly gains its efficiency from an adaptive image filtering technique that intelligently tracks changes in the scene illumination to re-use as much information as possible from previous computations."
The project can be downloaded from Github, and the developers neatly listed the needed files for download (the .pak files from either the Quake 2 demo or the full version can be used):
- Github Repository
- Windows Binary on Github
- Quake II Starter ("Quake II Starter is a free, standalone Quake II installer for Windows that uses the freely available 3.14 demo, 3.20 point release and the multiplayer-focused Q2PRO client to create a functional setup that's capable of playing online.")
There were also a full Q&A from the developers, and some obvious questions were answered including the observation that Quake 2 is "ancient" at this point, and shouldn't it "run at 6000 FPS by now":
While it is true that Quake II is a relatively old game with rather low geometric complexity, the limiting factor of path tracing is not primarily raytracing or geometric complexity. In fact, the current prototype could trace many more rays without a notable change in frame rate. The computational cost of the techniques used in the Q2VKPT prototype mainly depend on the number of (indirect) light scattering computations and the number of light sources. Quake II was already designed with many light sources when it was first released, in that sense it is still quite a modern game. Also, the number of light scattering events does not depend on scene complexity. It is therefore thinkable that the techniques we use could well scale up to more recent games."
And on the subject of path tracing vs. ray tracing:
"Path tracing is an elegant algorithm that can simulate many of the complex ways that light travels and scatters in virtual scenes. Its physically-based simulation of light allows highly realistic rendering. Path tracing uses Raytracing in order to determine the visibility in-between scattering events. However, Raytracing is merely a primitive operation that can be used for many things. Therefore, Raytracing alone does not automatically produce realistic images. Light transport algorithms like Path tracing can be used for that. However, while elegant and very powerful, naive path tracing is very costly and takes a long time to produce stable images. This project uses a smart adaptive filter that re-uses as much information as possible across many frames and pixels in order to produce robust and stable images."
This project is the result of work by one Christoph Schied, and was "a spare-time project to validate the results of computer graphics research in an actual game". Whatever your opinion of Q2VKPT, as we look back at Quake 2 and its impressive original lighting effects it's pretty clear that John Carmack was far ahead of his time (and it could be said that it's taken this long for hardware to catch up).