3D Art Shaders/Scripts Resume Demo Reel Texturing Tutorial

James O'Donnell - jeodonnell@gmail.com - (425) 891 - 9688

Vertex animated flags

-Back to Tech Gallery-

I worked on this project for Forza Motorsport 3. While our engine supported animation for the crowd members that stand alongside the track, we did not have any suppot for animation for other objects in the game. One of the central art objectives for Forza Motorsport 3 was improving the sense of "track life," and animated flags would play a part in this, as race courses are often dotted with a great number of flags for the venue, driver nationalities, and team or manufacturer logos. It initally appeared that we might have to scale back on this, as we would not have time to integrate support for animated track-side objects. However, I was able to develop a shader-based solution by using procedural methods in the vertex shader to create real-time animated flags. These flags were added to nearly all of the tracks in the game, but they were featured particularly in the Le Mans circuit.

These flags use a combination of trigonometric math and rotational transforms to give a sense of wind blowing past the flag. These deformations are scaled based on the UV coordinates of the vertex, attenuating the affect towards the hoist side. The entire effect is scaled via a set of staggered sine waves that create a gust and doldrums cycle in the animation. A pair of bump maps are additionally panned and rotated across the flag in the pixel shader to add high-frequency detail and to create a 'billowing' feel to the flag's animation.




This video requires Adobe Flash to play.

Later in the project, I developed an additional variant of this shader for use in grandstands on the track. While there are many stationary flag poles around a given race track, many flags are also being swung about by spectators. I used the same base tech from my first flag shader, but added an additional rotational transform. Each vertices' transform was time-delayed based on its UV coordinate, causing the hoist side to move first, causing the rest of the flag to trail behind it.



This video requires Adobe Flash to play.




James O'Donnell - jeodonnell@gmail.com - (425) 891 - 9688