Physical Simulation on GPUs Jim Van Verth Open
- Slides: 29
Physical Simulation on GPUs Jim Van Verth Open. GL Software Engineer NVIDIA jvanverth@nvidia. com www. essentialmath. com
Physics on GPU > Topics of discussion Ways of parallelizing physics > Examples of GPU physics > CUDA and you >
Parallelizing Physics > What we’ve talked about so far CPU Game Logic, AI, Physics Graphics Display Awfully busy… improve performance?
Parallelizing Physics > Solution 1: Multicore CPU Game Logic, AI Physics GPU Graphics Display
Parallelizing Physics > Solution 2 a: Cell processor Game Logic, AI CPU Graphics SPU SPU SPU Physics Display
Parallelizing Physics > Solution 2 b: AGEIA processor Game Logic, AI CPU � GPU Graphics � PPU Physics Display
Parallelizing Physics > Solution 3: Programmable GPU CPU Game Logic, AI GPU Graphics, Physics Display
Parallelizing Physics > Solution 3 b: SLI GPU CPU Game Logic, AI Graphics GPU Physics Display
GPU Computing > Modern GPU has many independent processors: Ge. Force 8800 GTX: 128 SPs > Ge. Force 8800 GT: 112 SPs > > Mostly processing power, not cache: Ge. Force 8800 GTX: 300 -400 Gflops > Ge. Force 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 >
Object Representation > Global object data in texture pairs Position > Orientation Linear Momentum Alternate frame to frame 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 Displacement > > Position Velocity Force Update position, velocity each frame from global object data Update force from collisions
Pipeline Update Particles Calculate Grid Compute Collisions Integrate
Update Particles > Update Particles For each object do: Iterate through all particles > Update particle position, velocity > Position Orientation Particle Position Calculate Grid Compute Collisions Displacement Linear Momentum Integrate Angular Momentum Particle Velocity
Grid Representation > Stored as slabs within 2 D rendertarget Update Particles Calculate Grid Compute Collisions > > Voxel stored as texel Four particle indices per texel 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 > Update Particles 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 Calculate Grid Compute Collisions Integrate
Integration > Compute new linear and angular momenta based on collision (and other) forces > > Update Particles Calculate Grid Force/torque on rigid body is weighted sum of forces from each particle Compute new position and orientation from momenta Compute Collisions Integrate
Demo
Other approaches Simon Green’s 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-G 80, had to use Cg, GLSL, HLSL > Problems: > Requires specialized shader knowledge > Data is often texture or rendertarget > Can’t “scatter” data easily >
CUDA Solution is CUDA > Stands for Compute Unified Device Architecture > Extensions on C/C++ > Interoperable with D 3 D and Open. GL > www. nvidia. com/cuda > 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 Presentations @ 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 > 3 D Stereoscopic Game Development How to Make Your Game Look Like Beowulf 3 D 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 3 D 10: 00 -18: 00, Monday, Feb 18 Room 2007 - West Hall > Beyond Printf: Debugging Graphics Through Tools 12: 00 -1: 00 pm, Thursday, Feb. 21 Room 131 - North Hall > Real-Time Ambient Occlusion 14: 50 -15: 10, Friday, Feb 22 Room 3004 - West Hall > Physics for Game Programmers 10: 00 -18: 00, Tuesday, Feb 19 Room 2018 - West Hall
15, 000 Visitors: The first-ever > 10, 000 amateur and visual pro gamers, demoscencers, Game computing modders, machinima mega-event. . creators, and 3 D artists > 3, 000 technical and The universe of marketing professionals visual from multiple industries > 2000 visitors computing in > 300 press & analysts one place at one time San Jose downtown Aug 25 -27 2008 http: //www. nvision 2008. com
Questions?
- Analyzing and leveraging decoupled l1 caches in gpus
- Gpu sql databases
- Understanding the efficiency of ray traversal on gpus
- Sah bvh
- Open innovation open science open to the world
- Van de graaff generator simulation
- Notc contact
- Open hearts open hands
- Physical rate fences
- Physical fitness grade 9
- Van deemter plots
- Nieuwbouw van open en gesloten verhardingen
- Trappe van vergelyking lekker
- Wet van behoud van impulsmoment
- Het stokske van johan van oldenbarnevelt
- Wet van behoud van energie
- Kerangka pemikiran dalam penelitian
- Gambar model implementasi van meter dan van horn
- Doorsnede wortel
- Van social y van privado
- Orra van de nem szagol nyelve van de nem beszél
- Uit welke stadia bestaat de levenscyclus van een koolwitje
- Kapitulasi tuntang
- Kernplasma
- Pronunciation van gogh
- Wet van behoud van energie
- Primerica rvp salary
- Jim kenney harvard pilgrim
- Jim gray database
- The new jim crow chapter 1