A Performance Optimization Study for the DreamWorks Animation Fluid Solver

by John J. O'Neill, Charles Congdon, Ram Ramanujam
Intel Corporation

Silviu Borac, Ron Henderson
DreamWorks Animation



We present a performance optimization study for an incompressible fluid simulation code designed for animated special effects. The solver uses a marker-and-cell (MAC) method to simulate the motion of liquids and gases. The main challenges in the optimization were identifying efficient data structures for managing the particle data, and rewriting the iterative pressure projection step so as to introduce threading without compromising the convergence rate. On average we achieved an improvement of over 300% in the performance of the serial implementation and parallel effciency of 65% on an 8-core desktop by threading portions of the application.


Fluid simulation is a widely used technique in special effects to create smoke, fire, splashes and similar visual elements. Figure 1 shows a typical example from DreamWorks* Animation's Megamind where a liquid surface is animated using a fluid simulation. While there are a variety of methods used to simulate fluid motion, most of them involve algorithms that are computationally intensive and run sequentially over a number of frames to produce an animated result. For this reason the performance of a given algorithm, in addition to its visual characteristics, is a critical factor in how useful the algorithm may be as an artistic tool.

In this report we discuss a performance optimization study for a fluid simulation package developed at DreamWorks* Animation and based on techniques now commonly used in computer graphics [1, 2, 3]. Our report includes a description of the algorithm, an analysis of the serial performance, and a discussion of modifications required to achieve good scalability for threading.

Figure 1. In DreamWorks* Animation's Megamind we see the character Roxanne Ritchie suspended over a tank of aligators. The dynamic fluid surface was animated using the solver discussed in this report.


Download the PDF

To read the rest of this white paper, download  A Performance Optimization Study for the DreamWorks Animation Fluid Solver [PDF 838KB]


Related Articles and Videos

Article:  Optimizing Without Breaking A Sweat: Optimizing DreamWorks Animation applications
Article:  Rethinking the Pipeline: DreamWorks Animation Advances the Art

Video: Marty Johnson discusses Shrek's Law and how Intel worked with DreamWorks Animation to optimize their rendering process
Video: The Technology Behind DreamWorks' Monsters vs Aliens


For more complete information about compiler optimizations, see our Optimization Notice.