DirectX® 9.0 and SmartShader™ 2.0 White Paper
Animusic Pipe Dream
"Animusic" is a technique for generating a virtual orchestra
from a piece of digitized music. One of the most talked about
examples of this concept, a short movie called Pipe Dream, was
first shown in 2001 at the Electronic Theatre of SIGGRAPH, the
world's largest computer graphics conference. Like the Rendering
with Natural Light demo, the original version of Pipe Dream
was rendered offline at a rate of several minutes per frame.
Just one year later, the Radeon 9700 PRO makes it possible to
render the same sequence interactively, at over 30 frames per
second.
The technical highlights of this demo are the high polygon count,
dynamic shadows, and motion blurred objects. The full scene
consists of approximately 550,000 polygons, approximately ten
times more than the most advanced 3D games on the market today.
Many additional polygons are required to recreate the dynamic
shadows, but in spite of this the powerful vertex processing
engines of the Radeon 9700 PRO don't miss a beat.
|
In order to maintain smooth frame rates, the shadows in the
scene are divided into two types, static and dynamic. Static
shadows are cast by stationary objects and stationary light
sources, although the color and brightness of the light sources
can vary. For these shadows, an algorithm is run once over the
entire scene to determine the shape and position of the shadows
from each light source. The static shadows are then inserted
or "cut" into the existing polygons, making them a permanent
part of the scene. Each of these polygons is tagged to reference
the light source that created it, so they can be turned on and
off as desired.
|
|
|
|
The moving objects in the scene cast dynamic shadows, which
must be recalculated for every frame. This is done using a stencil
shadow volume technique. For each light source, a vertex shader
is used to determine which vertices on the moving shadow casting
object are facing away from it. These vertices are then projected
back away from the light source, creating a shadow volume behind
the object. The shapes and positions of these shadow volumes
are stored in a stencil buffer. When the final scene is rendered,
every pixel is checked against the values in the stencil buffer.
Pixels falling within the shadow volumes are darkened.
To increase the realism of the shiny, fast-moving balls, a sophisticated
motion blurring technique is used. In each frame, the position
of the ball is compared to its position in the previous frame
to determine its instantaneous velocity. The ball itself is
then split into two halves, one facing in the direction of forward
motion and the other facing away. The back facing half is drawn
where it was located in the previous frame, while the front
facing half is drawn in its location for the current frame.
The two halves are then joined together, producing a stretched
version of the ball.
|
|
|
|
Figure 11: Motion Blur
|
Each ball is highly reflective; in fact if you look closely
at a slow moving ball you can see the entire scene reflected
in it. To enhance the motion blur effect, the reflectivity and
opacity of each ball is scaled according to its velocity. In
other words, faster moving balls become less shiny and more
transparent. The levels of detail for the reflections are scaled
as well, so that they become blurrier as the velocity increases.
A slightly different motion blur effect is applied to the vibrating
strings, which are oscillating between two different positions.
In each frame, two versions of the string are drawn: one in
the instantaneous position for the current frame, and one in
which it is stretched across its entire range of motion. The
two versions of the string are then blended together to produce
the effect.
|