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

Similar documents
Cloth Hair. and. soft bodies

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

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

Post Mortem: GPU Accelerated Effects in Borderlands 2

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

PHYSICALLY BASED ANIMATION

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

Overview of Traditional Surface Tracking Methods

Navier-Stokes & Flow Simulation

Realtime Water Simulation on GPU. Nuttapong Chentanez NVIDIA Research

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

Topics in Computer Animation

Navier-Stokes & Flow Simulation

CUDA Particles. Simon Green

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

What is a Rigid Body?

Lagrangian methods and Smoothed Particle Hydrodynamics (SPH) Computation in Astrophysics Seminar (Spring 2006) L. J. Dursi

Cloth Simulation on the GPU. Cyril Zeller NVIDIA Corporation

CUDA Particles. Simon Green

Support for Multi physics in Chrono

Constraint fluids in Sprinkle. Dennis Gustafsson Mediocre

GPU Particles. Jason Lubken

Realistic Animation of Fluids

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

Mass-Spring Systems. Last Time?

Enabling Next-Gen Effects through NVIDIA GameWorks New Features. Shawn Nie, Jack Ran Developer Technology Engineer

Interactive Fluid Simulation using Augmented Reality Interface

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

Particle-based Fluid Simulation

Lattice Boltzmann with CUDA

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

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

Dynamical Simulation 1: Particle Systems and ODEs

Fluid-Structure-Interaction Using SPH and GPGPU Technology

Interactive Fluid Simulation Using Augmented Reality Interface

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

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

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

Permeable and Absorbent Materials in Fluid Simulations

Parallel GPU-Based Fluid Animation. Master s thesis in Interaction Design and Technologies JAKOB SVENSSON

Fluids in Games. Jim Van Verth Insomniac Games

Chapter 19- Object Physics

Navier-Stokes & Flow Simulation

Particle Simulation using CUDA. Simon Green

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

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

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

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

Chapter 13 - Modifiers

animation computer graphics animation 2009 fabio pellacini 1 animation shape specification as a function of time

animation computer graphics animation 2009 fabio pellacini 1

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

NVIDIA GameWorks Animation Technologies in Unreal Engine 4

The jello cube. Undeformed cube. Deformed cube

Two-Phase flows on massively parallel multi-gpu clusters

animation projects in digital art animation 2009 fabio pellacini 1

GPU-based Distributed Behavior Models with CUDA

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

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

Solidification using Smoothed Particle Hydrodynamics

The Jello Cube Assignment 1, CSCI 520. Jernej Barbic, USC

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

Alex Li 11/20/2009. Chris Wojtan, Nils Thurey, Markus Gross, Greg Turk

Real-Time Volumetric Smoke using D3D10. Sarah Tariq and Ignacio Llamas NVIDIA Developer Technology

Animation of Fluids. Animating Fluid is Hard

Discrete representations of geometric objects: Features, data structures and adequacy for dynamic simulation. Part I : Solid geometry

3D Simulation of Dam-break effect on a Solid Wall using Smoothed Particle Hydrodynamic

Abstract. Introduction. Kevin Todisco

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

CS 231. Fluid simulation

Cloth Simulation. COMP 768 Presentation Zhen Wei

MODELING AND HIERARCHY

Fast Particle Neighbor Searching for Unlimited Scene with Fluid Refraction Improvement

Discrete Element Method

CUDA. Fluid simulation Lattice Boltzmann Models Cellular Automata

DirectX10 Effects. Sarah Tariq

Lecture 16. Introduction to Game Development IAP 2007 MIT

Realistic Animation of Fluids

Real-Time Hair Simulation and Rendering on the GPU. Louis Bavoil

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

Physically Based Simulation

The 3D DSC in Fluid Simulation

Anatomy of a Physics Engine. Erwin Coumans

Cloth Simulations. 9.2 Physics - Cloth Simulations

Physically Based Simulation

GPU Computing: Particle Simulation

Particle Systems. Lecture 8 Taku Komura

Go With The Flow: Fluid and Particle Physics in PixelJunk Shooter. Jaymin Kessler Q-Games Technology Team

Animation Essentially a question of flipping between many still images, fast enough

Demoscene and Maths. Presentation by Konstantinos Pataridis aka Navis/ASD University of Oxford August 2006

MULTIPHYSICS SIMULATION USING GPU

University of Quebec at Chicoutimi (UQAC) Friction Stir Welding Research Group. A CUDA Fortran. Story

CS 378: Computer Game Technology

A Geometric Approach to Animating Thin Surface Features in SPH Water

Programmable Shaders for Deformation Rendering

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

DirectX10 Effects and Performance. Bryan Dudash

A simple example. Assume we want to find the change in the rotation angles to get the end effector to G. Effect of changing s

Cloth and Hair Collisions

FEMLAB Exercise 1 for ChE366

Transcription:

Shape of Things to Come: Next-Gen Physics Deep Dive Jean Pierre Bordes NVIDIA Corporation

Free PhysX on CUDA PhysX by NVIDIA since March 2008 PhysX on CUDA available: August 2008 GPU PhysX in Games

Physical Characteristics Smoke/Flames Water/Oil/Mud Gaseous Fluid Liquid Fluid Fabric/Clothing Plants/Pillows/Fat Deformable Solids Leafs/Slivers Sparks Gravel Splinters/Shrapnel Trash/Rocks Furniture Rigid Solids Characters Vehicles/Machines Scale of Visual Motion Buildings World Architecture Static Solid, Infinite Mass

Physical Characteristics Smoke/Flames Water/Oil/Mud Gaseous Fluid Liquid Fluid Number of Computational Elements Particle Fluids Fabric/Clothing Plants/Pillows/Fat Deformable Solids Opportunity for Parallelization Deformables Leafs/Slivers Sparks Gravel Splinters/Shrapnel Trash/Rocks Furniture Rigid Solids Particles Rigid Body Actors Characters Vehicles/Machines Scale of Visual Motion Jointed RB Actors Buildings World Architecture Static Solid, Infinite Mass Static Actors

Presentation Overview Introduction Feature presentations Particle systems Fluids Deformables Parallel PhysX SDK Conclusion Demos

Particle Based Features Deformables adding constraints Fluids adding SPH forces Particle Systems colliding with the environment Seamless collision with rigid bodies Algorithmic reuse and consistency Massively parallel execution on CUDA enabled GPUs

Particle Systems Ubiquitious in games Increased realism: Universal collision with game environment Basis for more advanced features

Robust Particle Collision Features Minimize penetration and artificial energy loss Handle high velocity collisions Configurable collision radius Static over dynamic precedence Edge Case (avoid leaking and sticking) Static Precedence

Robust Particle Collision Mixed Approach Continuous CD: motion ray against shapes Discrete CD: motion target against shape p p old pose new pose p q q Continuous Test (multiple shapes) Continuous Test (moving shape) p q Discrete Test

CUDA Implementation GPU Workloads (set of particles, set of shapes) Particle level parallelism t 2 t 3 t 1 Optimization for shapes >> particles particle-shape pair parallelism for early outs t 2 t 1 Caching of static geometry Texture cache and shared memory for shapes t 3

Applications Small objects that should collide with the environment Debris (gravel, shrapnel, dirt bits, etc...) Shells Sparks Leaves, Slivers Animate Meshes: Oriented particles that rotate based on collisions

GRAW-2

Fluids Mathematical descriptions for continuous materials Lagrangian (particles) Eulerian (grids) Particle vs. Grid based fluid simulation in games Particles already used in games (easier integration) Seamless collision with lagrangian game objects Mass conservation for free Leonhard Euler 1707-1783 Joseph-Louis Lagrange 1736-1813

Smoothed Particle Hydrodynamics Particle acceleration given by Navier-Stokes eqn. External acceleration (e.g. gravity) Internal acceleration Pressure (pressure field gradient) Viscosity (smoothed velocity field) Particles = sampling points for physical fields Kernels to reconstruct smooth fields

SPH Algorithm 2 Passes over particle neighborhood Density Force (Pressure, Viscosity) R Particle Neighborhood Densities at Particle Locations

CUDA Implementation Neighbor finding optimizations Group particles into cells Map cells to regular cube (e.g. 16x16x16) Radix sort particles according to mapping

CUDA Implementation Neighborhood pass Particle level parallelization Texture cache particle access

Applications Dynamic, interactive scenarios Bursting liquid containers Flame throwers Mud puddles Splashes

SPH Demo

Deformables = Cloth, Softbody,... = Particles + Constraints + Meshes Specific features Tearing Self-collision Pressure... and more

Constraints p i2 ϕ 0 Internal Stretching (l 0 ) p i3 l 0 p i1 p i4 Bending (ϕ 0 ) p i1 Volume conservation (V) p i2 V l 0 p i4 External (Self-)collision Attachments, adherence, dominance Custom constraints p i3

Meshes Cloth Triangle mesh Softbody Tetrahedral mesh TetraMaker tool Simulation vs. graphics mesh

Tearing Algorithm Choose vertex p adjacent to overstretched edge l Duplicate vertex p p Split mesh perpendicular to l at vertex p p p l p Updates Add particle (p ) Modify constraints (impacted by p and p ) Split graphical mesh too!

Tearing

Self-collision Perfect self-collision is tricky & slow Uncontrollable external effects Needs untangling Simplified approach Particle repulsion Works surprisingly well... and fast... in parallel! Thickness h

Simulation Algorithm Position based dynamics 1 Update positions p 1,, p n velocities v 1,, v n 2 Prediction q i = p i + v i Δt 3 (Self-)collision add constraints based on ray p i q i 4 Solver for all constraints c i : modify q i1,, q im to satisfy c i 5 Integration v i = (q i p i ) / Δt p i = q i 6 Damping modify v 1,, v n

Parallel Solver Work packet w i = (c 1,, c ni, p 1,, p mi, phase) Each c i is contained in exactly one work packet All w i contain all particles referenced by c 1,, c ni For each phase, the partition of particles is disjoint phase 1 2 3 Parallel Algorithm For phase = 1 to #phases End for Process work packets of phase in parallel Sync

CUDA Implementation Update, (self-)collision, solver kernels Work on batched instance data Heavily use shared memory for work packets

Nurien

Parallel PhysX SDK Exploits task- and data-parallelism in different layers and modules Rendering PhysX AI... Scenes Fluids Deformables Rigid Bodies... Particles Constraints...

Parallelization Challenges Algorithms Robustness vs. massive parallelism Generality vs. specialization Scheduling Immediate vs. batched execution Task- and data-dependencies Load balancing Data management DMAs, cache hierarchies Asynchronous access, double-buffering

Conclusion Particle based features Broad range of applications Highly scalable content Suitable for parallelization NVIDIA PhysX SDK Exploits massive parallelism offered by CUDA Delivers solution to challenges and complexity Drives next-gen games and applications Available now!

The Great Kulu Demo

NVIDIA Fluid

The End Questions?