Gamasutra is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.


Gamasutra: The Art & Business of Making Gamesspacer
Sponsored Feature: Scaling Ambient Animations for Improved Game Experience
View All     RSS
October 20, 2020
arrowPress Releases
October 20, 2020
Games Press
View All     RSS







If you enjoy reading this site, you might also want to check out these UBM Tech sites:


 

Sponsored Feature: Scaling Ambient Animations for Improved Game Experience


September 17, 2009 Article Start Previous Page 2 of 3 Next
 

To achieve this enhanced performance, the entire animation process must be highly parallel. The code uses OGRE 3D, with a custom-threaded version of OGRE's animation system. Although some documentation exists that details the threaded animation system already available in OGRE, the performance of the animation system was not acceptable for this demo. Optimization of the existing code was necessary.

Let's start with a simple overview of how animation normally works in OGRE, shown in Figure 4.


Figure 4. OGRE animation system: single-threaded case.

The demo calls renderOneFrame in OGRE once per frame. This loops through all the entities in the scene and updates the animation by calling updateAnimation. When OGRE runs updateAnimation, it calculates all the vertex positions based on the current frame of animation. This update includes calculating bone positions, blending animations, and applying weight maps.

OGRE updates all of the entities in serial order, using a single thread as illustrated in Figure 5. This presents a unique opportunity to increase performance by introducing multi-threading. OGRE's animation is ideal for threading because:

  • There are many calculations
  • An entity's animation doesn't affect other entities
  • The work can be easily pulled out of OGRE

For Horsepower, OGRE's animation system was modified to distribute the updates of all the entities across multiple threads (the work shown in the OGRE block in Figure 4), increasing performance. All of the "adjustments" (change or advance animations) could also be threaded, and, fortunately, because Horsepower is built on top of Smoke, the threading benefits that were already in place were taken advantage of.


Figure 5. In single-threaded mode, we can maintain only about 87 horses.


Article Start Previous Page 2 of 3 Next

Related Jobs

innogames
innogames — Hamburg, Germany
[10.20.20]

Mobile Software Developer (C++) - Video Game: Forge of Empires
Johnson County Community College
Johnson County Community College — Overland Park, Kansas, United States
[10.19.20]

Assistant Professor, Game Development
Insomniac Games
Insomniac Games — Burbank, California, United States
[10.18.20]

Lead Gameplay Programmer
Insomniac Games
Insomniac Games — Burbank, California, United States
[10.18.20]

Lead Engine Programmer





Loading Comments

loader image