Adding More Special Effects
In our ray-tracing conversion, once
we reached the same quality as the
original game, we began adding
enhancements and more special
effects. Ray tracing does a very good
job with reflections and refractions.
The most common everyday objects in
the world that exhibit this behavior
are glass and water.
Glass
A large dome exists in the original
game. We changed the surface
properties of the dome so that it
would appear to be made out of glass
(Figure 8). Using the refraction index for glass (which you can find in your
favorite physics books), we wrote
a shader to accurately depict the
reflections and refractions. The code
is about 15 lines long in our HLSL-
like ray-tracing shading language and
generates very pleasing results.
Figure 8. Dome appears to be made out of glass after applying a shader.
Water
Rendering water can be accomplished different ways. We investigated two approaches:
water on a 2D surface and water with genuine 3D properties (Source: Implementation by Jacco Bikker).
To render the water in 2D, we used a bump map to
simulate waves [Figure 9(a)]. The 3D water image
uses a mesh with around 100,000 triangles in
several subgrids [Figure 9(b)]. Those subgrids are
updated every frame, depending on their visibility.
(During rendering, subgrids that are not visible are ignored.) The visibility test is performed over rays.
Figure 9(a). Water with a 2-D surface and a bump map.
Figure 9(b). Water with a real 3-D surface.
The Performance Issue
Performance is the main reason why ray tracing
is not yet used in mainstream games. Compared to
special-purpose rasterization graphics hardware—such
as current-generation GPUs—ray tracing is fairly slow.
Also, a lack of texture units for our CPU-based approach
to ray tracing causes significant slowdowns when
trilinear filtering is used for all texture samples.
With Intel’s latest quad-socket systems—equipped with
a 2.66 GHz Dunnington processor in each socket—we
can achieve approximately 20 to 35 fps at a resolution
of 1280x720. Nonetheless, this represents a significant
improvement over the experiments in 2004 that required
20 machines to render a simpler game more slowly and
at a lower resolution. The greatest performance gains
result from research efforts around the world that improve
efficiency and the new, many-core hardware platforms
that use parallelism to accelerate graphics operations.
The Future of Ray Tracing
As mentioned earlier, creating very realistic shadows
in games is not an easy task. Given the current state of
our demo work, only hard-edged shadows are produced. Modern games tend toward soft shadows, which usually
require many more rays. This important topic deserves
more study; smarter approaches to this task need to be
developed. Also, to obtain higher quality images, better
anti-aliasing methods are needed. Adaptive super-sampling
is a smart way of refining the rendering of the scene
at those exact places where it will deliver the greatest
benefit. There are experimental implementations, but they
need to be tested and tuned for the best results. With
the industry moving from multi-core to many-core (that is,
greater than ten cores), improving the algorithms so they
can fully use the newly acquired power will be interesting.
Even though Intel’s upcoming many-core graphics
architecture, code named Larrabee, has been primarily
developed as a rasterizer card, it will also be freely
programmable. This opens up some extremely interesting
opportunities to perform ray tracing with the Larrabee
architecture.
Stay tuned for more information about our upcoming
ray-tracing projects!
|
Voxel vs. Triangle: The Main Event. =)
Personally I wish developers would get it through their heads that -- USERS DONT CARE.
Take the new Empire total war for instance, for most of the battle the camera is far removed from the often highly detailed character models most of the time. Supreme commander also had this major issue - for all the graphical flash, most of the time you were so far zoomed out the details didn't matter.
At the rate CPU and GPU power is increasing, developers need to focus on gameplay and fixing bugs rather then graphics. Empire total war is a totally unfinished game in terms of the AI and the campaign, and no amount of rasterized, voxelized, or ray traced tree's are going to change the fact that the poor engineering of the game itself is the problem, not the graphics. Less money spent on art, more money spent on game mechanics and sound engineering.
I've been increasingly disappointed at the cluelessness of game developers and they seem lost in myopic worlds often times.