Quake 4: Ray traced
For my master thesis I wanted to analyze how well a modern 3D Shooter from the year 2005 would perform using ray tracing. For this purpose Quake 4 by Raven Software and id Software has been chosen.
An algorithm was invented for this work that uses rays for collision detection (CD). A polygon-exact CD is quite easy for direct weapons. Only one ray is needed to determine the target. Shooting this ray works through the exact same mechanisms and data structures as shooting a ray to get a color value in rendering.
(Polygon exact collision detection using ray tracing)
For the player model a bounding sphere was approximated through many rays like in a radar system.
(Bounding sphere approximated through rays)
An interesting special effect which I want to present here in more detail is water. As we expect it from nature water should reflect the surrounding environment and it should be possible to look through the water with some refractions going on. Water in motion should not look flat; there should be some visible height differences in the waves. I want to present you some examples of water in games that we have seen the last years. Of course these ‘optimizations’ had to be done to make the game render fast enough, so this should not be a critic of the game or company itself. It should just show how water looks today in some games, what it lacks and how it could look in ray tracing games.
(‘Far Cry’ (2004): The reflection in the water shows only the mountains, not the trees.)
(‘Far Cry’: Taking a close look at the reflections you see that the resolution is lower then the rest of the world.)
(‘Gothic 3’ from 2006: Quite unspectacular water without any reflections)
The water in ‘Quake 4: Ray traced’ (http://www.q4rt.de/) uses an animation set of many normal maps to simulate the height differences from the waves. One ray is used for reflection on that normal maps, one ray is used to get the refraction through the water. The result is nice looking water.
(‘Quake 4: Ray traced’: The water reflects the environment and the player)
Samples from Q4RT in action can be seen in this video: