NVIDIA. Interacting with Particle Simulation in Maya using CUDA & Maximus. Wil Braithwaite NVIDIA Applied Engineering Digital Film

Similar documents
CGT 581 G Fluids. Overview. Some terms. Some terms

Shape of Things to Come: Next-Gen Physics Deep Dive

Dynamics in Maya. Gary Monheit Alias Wavefront PHYSICALLY BASED MODELING SH1 SIGGRAPH 97 COURSE NOTES

Robust Simulation of Sparsely Sampled Thin Features in SPH-Based Free Surface Flows

Simulation: Particle Systems

T6: Position-Based Simulation Methods in Computer Graphics. Jan Bender Miles Macklin Matthias Müller

Topics in Computer Animation

Rendering diffuse objects using particle systems inside voxelized surface geometry. Thorsten Juckel Steffi Beckhaus

Interaction of Fluid Simulation Based on PhysX Physics Engine. Huibai Wang, Jianfei Wan, Fengquan Zhang

Interactive Fluid Simulation using Augmented Reality Interface

CUDA Particles. Simon Green

Navier-Stokes & Flow Simulation

Interactive Fluid Simulation Using Augmented Reality Interface

Announcements. Ray tracer is due in five days you should have started by now or you re going to have a bad week. Missing file posted on the web page

Fluid Simulation. [Thürey 10] [Pfaff 10] [Chentanez 11]

Technical Report TR

Post Mortem: GPU Accelerated Effects in Borderlands 2

CUDA Particles. Simon Green

Cloth Simulation. COMP 768 Presentation Zhen Wei

IMPROVED WALL BOUNDARY CONDITIONS WITH IMPLICITLY DEFINED WALLS FOR PARTICLE BASED FLUID SIMULATION

BACHELOR OF ARTS IN 3D ANIMATION AND VISUAL EFFECTS Term-End Theory Examination December, 2015 BNM-001 : ANIMATION PRODUCTION PIPELINE

Dynamical Simulation 1: Particle Systems and ODEs

Overview of Traditional Surface Tracking Methods

Simulation in Computer Graphics. Deformable Objects. Matthias Teschner. Computer Science Department University of Freiburg

Realtime Water Simulation on GPU. Nuttapong Chentanez NVIDIA Research

Particle-Based Fluid Simulation. CSE169: Computer Animation Steve Rotenberg UCSD, Spring 2016

Navier-Stokes & Flow Simulation

Index FEATURES LIST 2

CS4621/5621 Fall Particle Systems and Compute Shaders

Index FEATURES LIST 2

Acknowledgements. Prof. Dan Negrut Prof. Darryl Thelen Prof. Michael Zinn. SBEL Colleagues: Hammad Mazar, Toby Heyn, Manoj Kumar

Chapter 19- Object Physics

Particle-based Fluid Simulation

Abstract. Introduction. Kevin Todisco

Divergence-Free Smoothed Particle Hydrodynamics

CS-184: Computer Graphics Lecture #21: Fluid Simulation II

Fluids in Games. Jim Van Verth Insomniac Games

Comparison between incompressible SPH solvers

FLUID PARTICLE SIMULATION

Particle Systems. Sample Particle System. What is a particle system? Types of Particle Systems. Stateless Particle System

What is a Rigid Body?

CS GPU and GPGPU Programming Lecture 2: Introduction; GPU Architecture 1. Markus Hadwiger, KAUST

Particle Systems. Lecture 8 Taku Komura

Constraint fluids in Sprinkle. Dennis Gustafsson Mediocre

Navier-Stokes & Flow Simulation

Lattice Boltzmann with CUDA

RT 3D FDTD Simulation of LF and MF Room Acoustics

Fast Particle Neighbor Searching for Unlimited Scene with Fluid Refraction Improvement

Multiresolution volume processing and visualization on graphics hardware van der Laan, Wladimir

Two-Phase flows on massively parallel multi-gpu clusters

9 Dynamics. Getting Started with Maya 491

Art? 2 Computer Graphics 2 The Stages of Production 4 The CG Production Workflow 8 Core Concepts 10 Basic Film Concepts 21 Summary 26

Support for Multi physics in Chrono

Smoke Simulation using Smoothed Particle Hydrodynamics (SPH) Shruti Jain MSc Computer Animation and Visual Eects Bournemouth University

Recommended Prior Courses: CTAN 462, Visual Effects, or CTAN 452, Introduction to 3D Computer Animation

Homework 1: Implicit Surfaces, Collision Detection, & Volumetric Data Structures. Loop Subdivision. Loop Subdivision. Questions/Comments?

A Geometric Approach to Animating Thin Surface Features in SPH Water

C O M P U T E R G R A P H I C S. Computer Animation. Guoying Zhao 1 / 66

Adarsh Krishnamurthy (cs184-bb) Bela Stepanova (cs184-bs)

CS8803SC Software and Hardware Cooperative Computing GPGPU. Prof. Hyesoon Kim School of Computer Science Georgia Institute of Technology

Particle Simulation using CUDA. Simon Green

Design of a dynamic simulation system for VR applications

Comparison of CPU and GPGPU performance as applied to procedurally generating complex cave systems

Example 13 - Shock Tube

Youngho Kim CIS665: GPU Programming

Splotch: High Performance Visualization using MPI, OpenMP and CUDA

Chapter 3: Computer Animation Reminder: Descriptive animation. Procedural animation : Examples. Towards methods that generate motion?

2.7 Cloth Animation. Jacobs University Visualization and Computer Graphics Lab : Advanced Graphics - Chapter 2 123

Introduction to Computer Graphics. Animation (2) May 26, 2016 Kenshi Takayama

GPU-based Distributed Behavior Models with CUDA

Computer Animation. Animation A broad Brush. Keyframing. Keyframing

Dynamics and Particle Effects, Part 1 By Audri Phillips

LATTICE-BOLTZMANN AND COMPUTATIONAL FLUID DYNAMICS

Efficient Tridiagonal Solvers for ADI methods and Fluid Simulation

Cloth Simulation. Tanja Munz. Master of Science Computer Animation and Visual Effects. CGI Techniques Report

Computer Graphics Introduction. Taku Komura

Simulation in Computer Graphics. Introduction. Matthias Teschner. Computer Science Department University of Freiburg

CNM 190, pt 2 Advanced Digital Animation Lec 03 : Art Direction on Madagascar / Effects 1

Rigid Body Dynamics, Collision Response, & Deformation

Discrete Element Method

International Supercomputing Conference 2009

CS 378: Computer Game Technology

Cloth Simulation on the GPU. Cyril Zeller NVIDIA Corporation

Cloth Hair. and. soft bodies

Computational Fluid Dynamic Hydraulic Characterization: G3 Cube vs. Dolos Armour Unit. IS le Roux, WJS van der Merwe & CL de Wet

Object representation

Mass-Spring Systems. Last Time?

Particleworks: Particle-based CAE Software fully ported to GPU

A High Quality, Eulerian 3D Fluid Solver in C++ A Senior Project. presented to. the Faculty of the Computer Science Department of

About Phoenix FD PLUGIN FOR 3DS MAX AND MAYA. SIMULATING AND RENDERING BOTH LIQUIDS AND FIRE/SMOKE. USED IN MOVIES, GAMES AND COMMERCIALS.

SimTenero Particle Physics

CSE 591: GPU Programming. Introduction. Entertainment Graphics: Virtual Realism for the Masses. Computer games need to have: Klaus Mueller

GAME PROGRAMMING ON HYBRID CPU-GPU ARCHITECTURES TAKAHIRO HARADA, AMD DESTRUCTION FOR GAMES ERWIN COUMANS, AMD

Physically Based Simulation

Real-time haptic display of fluids

Black Desert Online. Taking MMO Development to the Next Level. Dongwook Ha Gwanghyeon Go

Portland State University ECE 588/688. Graphics Processors

High Scalability of Lattice Boltzmann Simulations with Turbulence Models using Heterogeneous Clusters

Current Trends in Computer Graphics Hardware

Physically Based Simulation

Transcription:

NVIDIA Interacting with Particle Simulation in Maya using CUDA & Maximus Wil Braithwaite NVIDIA Applied Engineering Digital Film

Some particle milestones FX Rendering Physics 1982 - First CG particle FX in StarTrek 2. 2008 - Disney use GPUs to efficiently render particles as sprites. 2009 - ILM use GPU particles for fast rigid-body dynamics in Transformers 2. Images: Star Trek 2 The Wrath of Khan Bolt, Walt Disney Pictures Transformers 2, Paramount Pictures

What are particles? Discrete points with mass, moving in space. Movement is defined by forces and constraints. They have limited state: e.g. Force modifies velocity, and velocity modifies position. Not constrained by a grid: Computation and storage are only used where needed. f p Position Velocity Colour Etc. u u i+1 = u i + f p i+1 = p i + u i+1

Maya classic particles It has support for: Emitters: Omni, Volume, Surface, etc. Surfaces can emit attributes. Collision geometry. Force-fields: Uniform, Radial, Vortex, etc. Particle expressions.

Maya nparticles Nucleus nparticles, ncloth, etc. Allows integration of different kinds of materials (e.g. cloth, fluid) by using a singular physics representation. You can use Maya Fields to influence the behavior of Nucleus objects. nparticle objects use the same emitter objects that are used with Maya classic particles. - Autodesk

Movie nparticles vs. NVIDIA Particles

Motivation for GPU particles Particles are simple and elegant. Easy to implement. They are used extensively in VFX and games. They form the basis of many other complex effects. Highly scalable. Very GPU friendly!...

The GPU in 1½ slides Huge cache Lots of cores multi-core CPU (4 cores) many-core GPU (448 cores) Not representative of scale

Latency-hiding vs. Throughput Cores WAIT stall GO The CPU hides latency by optimizing memory accesses. C M C M C M C M C M C M WAIT GO C M C M C M C M C M C M The GPU hides latency by quickly switching between compute threads. M C Time = Stall = Memory access time = Computation time

Implementation goals Integrate with existing Maya workflow. Be more interactive than current Maya tools. We don t want to slow down the Maya user-experience. Write clean code as we might release it.

Movie CUDA-Accelerated particles

The life-cycle of particles Potentially kill particles.

Particle sort P bid, P pid 10,0 10,2 12,1 16,3 0 1 2 3 B i 0 2 3 0 10 11 12 16 P bid, P pid 10,0 12,1 10,2 16,3 0 1 2 3 P data 0 2 1 3 0 1 2 3

Particle death If particle expires, set death flag. Bucket assignment will put it in deadpool (numbuckets+1 = 25) Sorting will put all dead particles in a contiguous block. P bid, P pid 10,0 10,2 17,3 25,1 0 1 2 3 P data 0 2 3 B i 0 2 3 0 10 11 17 25 0 1 2 3 numparticles

Particle emission Upload emitted data using numparticles. E data 0 2 3 numparticles count += numemitted P data 0 2 3 0 1 2 3 4 5 We use fast host-to-device transfer for a small block of emission data. i.e. page-locked & write-combined host memory.

Collisions - Primitives Geometric primitives. Unitized for faster math. Can be transformed by matrix. Interior or exterior. Collision event types bounce, die, etc.

Collisions Collision response N 2 u N 4 3 P r u P r d d 1 1. Transform particle (P) into unit-space and calculate penetration (d) 2. Determine normal (N) 3. Move particle out of collider (along normal) 4. Update velocity based on collider s friction and restitution coefficients

Collisions image maps Allows more complex objects. Effectively a 2-level BVH. xnormal for map creation. Note artifacts Normals Displacement

Fluid dynamics (in one slide) More interesting than boring particles. Works well on GPUs; it has many data elements. Existing techniques: Eulerian (grid-based) Lagrangian (particle-based) Heightfield (2D / 2.5D grid) Smoothed Particle Hydrodynamics (SPH) water pressure + incompressibility + viscosity + external forces

The life-cycle of particles (with SPH)

Particle SPH pressure

Movie Digital Elevation Model collision

Rendering particles as a fluid Polygonize density field e.g. Marching cubes, etc. Screen-space rendering

Rendering particles Screen-space

Getting data back to Maya We might want to use the particle data inside Maya. Modern NVIDIA GPUs can overlap compute with copy. Quadro and Tesla both have dual-copy engines. We can remove the cost of the data transfer if we allow some latency

Overlapped transfer Frame [f] H - Acquire emission [f] D1 - Upload emission [f-1] DC - Insert emission [f-2] DC - Simulate [f-2] DC - Generate Mesh [f-2] D2 - Download mesh [f-3] Dual-copy engines H - Access mesh [f-4]

NVIDIA Maximus Quadro AND Tesla with 6GB & 448 cores. Benefits of Maximus DCC apps like Maya already use many GPU resources. Share the data between two cards allowing for larger simulations. Multi-GPU is scalability for the future.

Multi-GPU sharing the compute GPU[0] GPU[1] Partition plane Cross-over to other side We already have the framework for this: If particle is beyond partition then kill it and emit on other device. If within threshold then emit as a ghost (i.e. it lives for only one update). Ghost on other side Threshold

Known issues Floating particles Not enough SPH kernel support. Simulation values must be chosen carefully. Only a subset of Maya s force-fields are supported: Reverse engineering is not sufficient. Handling solid boundaries in SPH is an active area of research.

Future enhancements More simulation algorithms: Flocking birds, schooling fish, rigid-bodies More rendering styles: Smoke, Sprites, Instanced geometry Better fluid rendering by using anisotropic kernels. Scriptable events using a virtual-machine. Maya Viewport 2.0 integration.

Conclusions Building CUDA-accelerated particles in Maya is easy. Leverages some of Maya s existing framework. Using techniques like overlapping and multi-gpu can provide even more performance. By using Maximus and simulating on the Tesla card, Maya is still interactive.

Acknowledgments Robert Bridson: Fluid Simulation for Computer Graphics, A K Peters, 2008 Wladimir J Van Der Laan, Simon Green, Miguel Sainz: Screen space fluid rendering with curvature flow - Proceedings of the 2009 symposium on Interactive 3D graphics and games Markus Becker, Matthias Teschner: Weakly compressible SPH for free surface flows Eurographics / ACM SIGGRAPH Symposium on Computer Animation, 2007

Questions? wbraithwaite@nvidia.com