256 Pages 99 B/W Illustrations
    by A K Peters/CRC Press

    Tackle the Challenges of Parallel Programming in the Visual Effects Industry

    In Multithreading for Visual Effects, developers from DreamWorks Animation, Pixar, Side Effects, Intel, and AMD share their successes and failures in the messy real-world application area of production software. They provide practical advice on multithreading techniques and visual effects used in popular visual effects libraries (such as Bullet, OpenVDB, and OpenSubdiv), one of the industry’s leading visual effects packages (Houdini), and proprietary animation systems. This information is valuable not just to those in the visual effects arena, but also to developers of high performance software looking to increase performance of their code.

    Diverse Solutions to Solve Performance Problems

    After an introductory chapter, each subsequent chapter presents a case study that illustrates how the authors used multithreading techniques to achieve better performance. The authors discuss the problems that occurred and explain how they solved them. The case studies encompass solutions for shaving milliseconds, solutions for optimizing longer running tasks, multithreading techniques for modern CPU architectures, and massive parallelism using GPUs. Some of the case studies include open source projects so you can try out these techniques for yourself and see how well they work.

    Introduction and Overview James Reinders
    Introduction
    Overview of Case Studies
    Motivation
    Program in Tasks, Not Threads
    Value of Abstraction
    Scaling and Vectorization
    Advancing Programming Languages for Parallel Programming
    Parallel Programming in C and C++
    Data Movement and Layout
    Summary
    Additional Reading

    Houdini: Multithreading Existing Software Jeff Lait
    What Is Houdini?
    Rewrite or Refactor
    Patterns
    Copy on Write
    Dependencies
    OpenCL

    The Presto Execution System: Designing for Multithreading George ElKoura
    Introduction
    Presto
    Presto's Execution System
    User Extensions
    Memory Access Patterns
    Flexibility to Experiment
    Multithreading Strategies
    Background Execution
    Other Multithreading Strategies
    Debugging and Profiling Tools
    Summary

    LibEE: Parallel Evaluation of Character Rigs Martin Watt
    Introduction
    Motivation
    Specific Requirements for Character Animation Graph
    Threadsafety
    Scalability: Software Considerations
    Scalability: Hardware Considerations
    Production Considerations
    Threading Visualization Tool
    Rig Optimization Case Studies
    Overall Performance Results
    Limits of Scalability
    Summary

    Fluids: Simulation on the CPU Ronald D. Henderson
    Motivation
    Programming Models
    Fluid Simulation
    Summary

    Bullet Physics: Simulation with OpenCL Erwin Coumans
    Introduction
    Rewriting from Scratch Using OpenCL
    GPU Spatial Acceleration Structures
    GPU Contact Point Generation
    GPU Constraint Solving

    OpenSubdiv: Interoperating GPU Compute and Drawing Manuel Kraemer
    Representing Shapes
    The Control Cage
    Uniform Subdivision
    Serializing the Mesh Representation
    Transition from Multicores to Many-Cores
    Reducing Branching Divergence
    Optimization Trade-Offs
    Evaluating Our Progress
    Fundamental Limitations of Uniform Subdivision
    Feature Adaptive Subdivision
    Implementing the GPU Rendering Engine
    Texturing
    Conclusion

    Bibliography

    Index

    Biography

    Martin Watt, Erwin Coumans, George ElKoura, Ronald Henderson, Manuel Kraemer, Jeff Lait, James Reinders

    "Multithreading applications is hard, but for today’s performance-critical codes, an absolute necessity. This book shows how the latest parallel programming technology can simplify the daunting challenge of producing fast and reliable software for multicore processors. Although the instructive case studies are drawn from visual effects applications, the authors cover the gamut of issues that developers face when parallelizing legacy applications from any domain."
    —Charles Leiserson, MIT Computer Science and Artificial Intelligence Laboratory

    "Multithreading graphics algorithms is a new and exciting area of research. It is crucial to computer graphics. This book will prove invaluable to researchers and practitioners alike. It will have a strong impact on movie visual effects and games."
    —Jos Stam, Senior Principal Research Scientist, Autodesk, Inc.

    "Visual effects programming is undergoing a renaissance as high-end videogame effects technology approaches the state-of-the-art defined by blockbuster Hollywood movies, empowered by the capabilities of multi-Teraflop GPU hardware. A wealth of graphics algorithms are now graduating into the realm of real-time rendering, yet today’s programmers face a formidable challenge in structuring these algorithms to take full advantage of today’s multi-core CPU architectures and deliver on their potential.
    This book, the collaborative result of many industry luminaries, wonderfully bridges the gap between the theory of multithreading and the practice of multithreading in advanced graphical applications. Join them on this journey to bring real-time visual effects technology to the next level!"
    —Tim Sweeney, CEO and Founder of Epic Games

    "…valuable not just to those in the visual effects arena, but also to developers of high performance software looking to increase performance of their code."
    —Scott R. Garrigus, NewTechReview