Physical Simulation on GPUs Jim Van Verth OpenGL Software Engineer NVIDIA

Slides:



Advertisements
Similar presentations
AP Physics C Mechanics Review.
Advertisements

Introduction to Direct3D 10 Course Porting Game Engines to Direct3D 10: Crysis / CryEngine2 Carsten Wenzel.
Numeric Integration Methods Jim Van Verth Red Storm Entertainment
Chapter 1: The Database Environment
Chapter 1 The Study of Body Function Image PowerPoint
Business Transaction Management Software for Application Coordination 1 Business Processes and Coordination.
Lectures D25-D26 : 3D Rigid Body Dynamics
Copyright CompSci Resources LLC Web-Based XBRL Products from CompSci Resources LLC Virginia, USA. Presentation by: Colm Ó hÁonghusa.
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
1GR2-00 GR2 Advanced Computer Graphics AGR Lecture 18 Image-based Rendering Final Review of Rendering What We Did Not Cover Learning More...
16.1 Si23_03 SI23 Introduction to Computer Graphics Lecture 16 – Some Special Rendering Effects.
ENV 2006 CS4.1 Envisioning Information: Case Study 4 Focus and Context for Volume Visualization.
Chapter 5 Computing Components.
Chapter 5 Computing Components. 5-2 Chapter Goals Read an ad for a computer and understand the jargon List the components and their function in a von.
Lecture 1: Introduction
Reconstruction from Voxels (GATE-540)
Spring 2014 RMS/EOC Proctor Caching Training. Agenda 2 Proctor caching overview Downloading & installing Cache test content.
Multi-core/Cell Game Engine Design
Warm Up: Tuesday Solve for x and justify each step:
Multi-user Extensible Virtual Worlds Increasing complexity of objects and interactions with increasing world size, users, numbers of objects and types.
25 seconds left…...
A Hardware Processing Unit For Point Sets S. Heinzle, G. Guennebaud, M. Botsch, M. Gross Graphics Hardware 2008.
Week 1.
Bottoms Up Factoring. Start with the X-box 3-9 Product Sum
Systems of Particles.
FINAL EXAMINATION SCHEDULE SPRING 2009 MAY 15 – MAY 22 NOTE: A class that meets at more than one of the times on this final examination schedule will take.
COMPUTER GRAPHICS CS 482 – FALL 2014 NOVEMBER 10, 2014 GRAPHICS HARDWARE GRAPHICS PROCESSING UNITS PARALLELISM.
BY AHROORAN & CHRIS 3D Software. Blender Blender is a free open source software that is compatible with most operating systems for example GNU/Linux,
GPGPU Lessons Learned Mark Harris. General-Purpose Computation on GPUs Highly parallel applications Physically-based simulation image processing scientific.
Dealing with Computational Load in Multi-user Scalable City with OpenCL Assets and Dynamics Computation for Virtual Worlds.
Control Flow Virtualization for General-Purpose Computation on Graphics Hardware Ghulam Lashari Ondrej Lhotak University of Waterloo.
1 ITCS 6/8010 CUDA Programming, UNC-Charlotte, B. Wilkinson, Jan 19, 2011 Emergence of GPU systems and clusters for general purpose High Performance Computing.
Real-World GPGPU Mark Harris NVIDIA Developer Technology.
Introduction What is GPU? It is a processor optimized for 2D/3D graphics, video, visual computing, and display. It is highly parallel, highly multithreaded.
GPU Graphics Processing Unit. Graphics Pipeline Scene Transformations Lighting & Shading ViewingTransformations Rasterization GPUs evolved as hardware.
1 KIPA Game Engine Seminars Jonathan Blow Seoul, Korea November 29, 2002 Day 4.
GPU Programming Robert Hero Quick Overview (The Old Way) Graphics cards process Triangles Graphics cards process Triangles Quads.
Havok. ©Copyright 2006 Havok.com (or its licensors). All Rights Reserved. HavokFX Next Gen Physics on ATI GPUs Andrew Bowell – Senior Engineer Peter Kipfer.
Final Project Presentation& Demo Zhi Dong Real Time FEM of Elasto-Plastic Simulation.
BY: ALI AJORIAN ISFAHAN UNIVERSITY OF TECHNOLOGY 2012 GPU Architecture 1.
Chris Kerkhoff Matthew Sullivan 10/16/2009.  Shaders are simple programs that describe the traits of either a vertex or a pixel.  Shaders replace a.
GPU Programming and Architecture: Course Overview Patrick Cozzi University of Pennsylvania CIS Spring 2012.
NVIDIA Fermi Architecture Patrick Cozzi University of Pennsylvania CIS Spring 2011.
Emergence of GPU systems and clusters for general purpose high performance computing ITCS 4145/5145 April 3, 2012 © Barry Wilkinson.
Robert Liao Tracy Wang CS252 Spring Overview Traditional GPU Architecture The NVIDIA G80 Processor CUDA (Compute Unified Device Architecture) LAPACK.
CS662 Computer Graphics Game Technologies Jim X. Chen, Ph.D. Computer Science Department George Mason University.
GPU Computation Strategies & Tricks Ian Buck NVIDIA.
Advanced Computer Graphics Rigid Body Simulation Spring 2002 Professor Brogan.
Introduction What is GPU? It is a processor optimized for 2D/3D graphics, video, visual computing, and display. It is highly parallel, highly multithreaded.
By Dirk Hekhuis Advisors Dr. Greg Wolffe Dr. Christian Trefftz.
A Neural Network Implementation on the GPU By Sean M. O’Connell CSC 7333 Spring 2008.
GPU Based Sound Simulation and Visualization Torbjorn Loken, Torbjorn Loken, Sergiu M. Dascalu, and Frederick C Harris, Jr. Department of Computer Science.
Havok FX Physics on NVIDIA GPUs. Copyright © NVIDIA Corporation 2004 What is Effects Physics? Physics-based effects on a massive scale 10,000s of objects.
From Turing Machine to Global Illumination Chun-Fa Chang National Taiwan Normal University.
Mapping Computational Concepts to GPUs Mark Harris NVIDIA.
Rick Parent - CIS682 Rigid Body Dynamics simulate basic physics of an object subject to forces Keyframing can be tedious - especially to get ‘realism’
3/12/2013Computer Engg, IIT(BHU)1 CUDA-3. GPGPU ● General Purpose computation using GPU in applications other than 3D graphics – GPU accelerates critical.
GPU Computing for GIS James Mower Department of Geography and Planning University at Albany.
Martin Kruliš by Martin Kruliš (v1.0)1.
Veysi ISLER, Department of Computer Engineering, Middle East Technical University, Ankara, TURKEY Spring
GPU Architecture and Its Application
CUDA Interoperability with Graphical Environments
Graphics Processing Unit
From Turing Machine to Global Illumination
Graphics Processing Unit
Ray Tracing on Programmable Graphics Hardware
Graphics Processing Unit
CIS 6930: Chip Multiprocessor: GPU Architecture and Programming
Presentation transcript:

Physical Simulation on GPUs Jim Van Verth OpenGL Software Engineer NVIDIA

Physics on GPU Topics of discussion Ways of parallelizing physics Examples of GPU physics CUDA and you

Parallelizing Physics CPU What weve talked about so far Display Game Logic, AI, Physics GPU Graphics Awfully busy… improve performance?

Parallelizing Physics Solution 1: Multicore CPU CPU Display Game Logic, AI GPU Graphics Physics

Parallelizing Physics CPU Solution 2a: Cell processor Display Game Logic, AI GPU Graphics Physics SPU

Parallelizing Physics CPU Solution 2b: AGEIA processor Display Game Logic, AI GPU Graphics Physics PPU

Parallelizing Physics CPU Solution 3: Programmable GPU Display Game Logic, AI GPU Graphics, Physics

Parallelizing Physics CPU Solution 3b: SLI Display Game Logic, AI GPU Graphics GPU Physics

GPU Computing Modern GPU has many independent processors: GeForce 8800 GTX: 128 SPs GeForce 8800 GT: 112 SPs Mostly processing power, not cache: GeForce 8800 GTX: Gflops GeForce 8800 GT: 500 Gflops A lot of parallel power for physics!

GPU Physics Example From GPU Gems 3 Takahiro Harada, Real-time Rigid Body Simulation on GPUs Simple physics engine, all running on GPU

GPU Physics Example Idea: GPU is good at: Many similar computations Simple data So: Particles for collision representation Grid for collision detection Simple collision response

Global object data in texture pairs Alternate frame to frame Object Representation PositionOrientation Linear Momentum Angular Momentum

Object Representation Collision rep: Solid (or shell) of particles Store as Fixed radius Displacement from center of mass

Object Representation Smaller particles == better fit But more processing

Object Representation Particle data stored in texture and three rendertargets Update position, velocity each frame from global object data Update force from collisions Displacement Position VelocityForce

Pipeline Update Particles Calculate Grid Compute Collisions Integrate

Update Particles For each object do: Iterate through all particles Update particle position, velocity Update Particles Calculate Grid Compute Collisions Integrate PositionOrientation Linear Momentum Angular Momentum Displacement Particle Position Particle Velocity

Grid Representation Stored as slabs within 2D rendertarget Voxel stored as texel Four particle indices per texel Update Particles Calculate Grid Compute Collisions Integrate

Grid Creation For each particle do Compute grid index Write particle index to appropriate component at that location Update Particles Calculate Grid Compute Collisions Integrate

Collision Resolution For each voxel do For each particle in voxel do Compute force based on particles in this and 27 neighboring voxels Regardless of collision! Spring force Damping from relative vel. Tangential force Update Particles Calculate Grid Compute Collisions Integrate

Integration Compute new linear and angular momenta based on collision (and other) forces Force/torque on rigid body is weighted sum of forces from each particle Compute new position and orientation from momenta Update Particles Calculate Grid Compute Collisions Integrate

Demo

Other approaches Simon Greens particles N-body Parallelize one piece: Ex. Broad Phase (GPU Gems 3) Do smaller problem Ex. Fluid dynamics (Hellfire: London)

GPU Computing How to program? Pre-G80, had to use Cg, GLSL, HLSL Problems: Requires specialized shader knowledge Data is often texture or rendertarget Cant scatter data easily

CUDA Solution is CUDA Stands for Compute Unified Device Architecture Extensions on C/C++ Interoperable with D3D and OpenGL Use it!

CUDA Updating our example: Instead of Cg, use standard C++ w/CUDA extensions Instead of textures or rendertargets, just use CUDA arrays Instead of vertex shader, use scatter operation

NVIDIA GDC 2008 NVIDIA Sessions Room 3003 – West Hall Advanced Skin Rendering in NVIDIA's Human Head Demo 4:00-5:00 pm, Wednesday, Feb. 20 Particle-based Fluid Simulation For Games 9:00-9:30 am, Thursday, Feb. 21 3D Stereoscopic Game Development - How to Make Your Game Look Like Beowulf 3D 9:30-10:00 am, Thursday, Feb. 21 GPU Optimization with the Latest NVIDIA Performance Tools 10:30-11:30 am, Thursday, Feb. 21 NVIDIA FX Composer 2: Shader Development Unleashed 12:00-1:00 pm, Thursday, Feb. 21 General GDC Sessions Advanced Visual Effects with Direct 3D 10:00-18:00, Monday, Feb 18 Room West Hall Beyond Printf: Debugging Graphics Through Tools 12:00-1:00 pm, Thursday, Feb. 21 Room North Hall Real-Time Ambient Occlusion 14:50-15:10, Friday, Feb 22 Room West Hall Physics for Game Programmers 10:00-18:00, Tuesday, Feb 19 Room West Hall

San Jose downtown Aug The first-ever visual computing mega-event.. The universe of visual computing in one place at one time 15,000 Visitors: 10,000 amateur and pro gamers, demoscencers, Game modders, machinima creators, and 3D artists 3,000 technical and marketing professionals from multiple industries 2000 visitors 300 press & analysts

Questions?