Cloth Simulation on the GPU. Cyril Zeller NVIDIA Corporation

Similar documents
Cloth Simulation on GPU

DirectX10 Effects. Sarah Tariq

DirectX10 Effects and Performance. Bryan Dudash

Interactive Cloth Simulation. Matthias Wloka NVIDIA Corporation

Spring 2009 Prof. Hyesoon Kim

Modeling Cloth Using Mass Spring Systems

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

Spring 2011 Prof. Hyesoon Kim

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

A GPU Accelerated Spring Mass System for Surgical Simulation

APPROVAL SHEET. Title of Thesis: GPU Based Cloth Simulation on Moving Avatars

Dynamic Ambient Occlusion and Indirect Lighting. Michael Bunnell NVIDIA Corporation

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

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

Real Time Cloth Simulation

CS451Real-time Rendering Pipeline

DiFi: Distance Fields - Fast Computation Using Graphics Hardware

CSE 167: Introduction to Computer Graphics Lecture #19: Wrapping Up. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2017

2.11 Particle Systems

Ray Casting of Trimmed NURBS Surfaces on the GPU

Beginning Direct3D Game Programming: 1. The History of Direct3D Graphics

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

GPGPU Lessons Learned. Mark Harris

A Fast and Stable Approach for Restoration of Warped Document Images

UberFlow: A GPU-Based Particle Engine

3D Rendering Pipeline

L10 Layered Depth Normal Images. Introduction Related Work Structured Point Representation Boolean Operations Conclusion

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

CSE 167: Introduction to Computer Graphics Lecture #18: More Effects. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2016

Technical Report. GLSL Pseudo-Instancing

The Application Stage. The Game Loop, Resource Management and Renderer Design

Programming Graphics Hardware. GPU Applications. Randy Fernando, Cyril Zeller

GPU Computing: Particle Simulation

Rendering Grass with Instancing in DirectX* 10

EE 4702 GPU Programming

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

Sign up for crits! Announcments

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

CSE 167: Introduction to Computer Graphics Lecture #5: Rasterization. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2015

LOD and Occlusion Christian Miller CS Fall 2011

Image Processing Tricks in OpenGL. Simon Green NVIDIA Corporation

Real-Time Ray Tracing Using Nvidia Optix Holger Ludvigsen & Anne C. Elster 2010

Real Time Rendering of Expensive Small Environments Colin Branch Stetson University

Particle Systems. Lecture 8 Taku Komura

Abstract. Introduction. Kevin Todisco

6.837 Introduction to Computer Graphics Final Exam Tuesday, December 20, :05-12pm Two hand-written sheet of notes (4 pages) allowed 1 SSD [ /17]

How to Work on Next Gen Effects Now: Bridging DX10 and DX9. Guennadi Riguer ATI Technologies

CSE 167: Lecture #5: Rasterization. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012

Sorting and Searching. Tim Purcell NVIDIA

Direct Rendering of Trimmed NURBS Surfaces

PowerVR Hardware. Architecture Overview for Developers

Multi-View Soft Shadows. Louis Bavoil

Rendering. Converting a 3D scene to a 2D image. Camera. Light. Rendering. View Plane

Graphics Processing Unit Architecture (GPU Arch)

Cloth Simulation. COMP 768 Presentation Zhen Wei

B-KD Trees for Hardware Accelerated Ray Tracing of Dynamic Scenes

CS 4620 Midterm, March 21, 2017

Rain. Sarah Tariq

Graphics Hardware. Graphics Processing Unit (GPU) is a Subsidiary hardware. With massively multi-threaded many-core. Dedicated to 2D and 3D graphics

Programming Graphics Hardware

MODELING AND HIERARCHY

Character Modeling IAT 343 Lab 6. Lanz Singbeil

What is a Rigid Body?

3D Graphics and OpenGl. First Steps

CS GPU and GPGPU Programming Lecture 7: Shading and Compute APIs 1. Markus Hadwiger, KAUST

Topic 10: Scene Management, Particle Systems and Normal Mapping. CITS4242: Game Design and Multimedia

Youngho Kim CIS665: GPU Programming

CUDA Particles. Simon Green

Scalable multi-gpu cloud raytracing with OpenGL

Shaders. Slide credit to Prof. Zwicker

3D Design with 123D Design

Efficient and Scalable Shading for Many Lights

Render-To-Texture Caching. D. Sim Dietrich Jr.

Performance OpenGL Programming (for whatever reason)

Real Time Rendering of Complex Height Maps Walking an infinite realistic landscape By: Jeffrey Riaboy Written 9/7/03

Dynamical Simulation 1: Particle Systems and ODEs

Integrating Physics into a Modern Game Engine. Object Collision. Various types of collision for an object:

Real-Time Universal Capture Facial Animation with GPU Skin Rendering

Mia Round Corners Node

Programmable Shaders for Deformation Rendering

Parallelizing Graphics Pipeline Execution (+ Basics of Characterizing a Rendering Workload)

GPGPU on Mobile Devices

Journal of Universal Computer Science, vol. 14, no. 14 (2008), submitted: 30/9/07, accepted: 30/4/08, appeared: 28/7/08 J.

Polygon Meshes and Implicit Surfaces

Physically-Based Modeling and Animation. University of Missouri at Columbia

Real-Time Reyes: Programmable Pipelines and Research Challenges. Anjul Patney University of California, Davis

Polygon Meshes and Implicit Surfaces

Collision Detection. Pu Jiantao.

Doodle Processing System Using Cinder Graphics and Bullet Physics

Parallelizing Graphics Pipeline Execution (+ Basics of Characterizing a Rendering Workload)

Building a Million Particle System

Computer Graphics I Lecture 11

Shadows & Decals: D3D10 techniques from Frostbite. Johan Andersson Daniel Johansson

Enhancing Traditional Rasterization Graphics with Ray Tracing. October 2015

Enabling immersive gaming experiences Intro to Ray Tracing

Subdivision overview

Full Screen Layout. Main Menu Property-specific Options. Object Tools ( t ) Outliner. Object Properties ( n ) Properties Buttons

GPGPU. Peter Laurens 1st-year PhD Student, NSC

Spring 2012 Final. CS184 - Foundations of Computer Graphics. University of California at Berkeley

Fast Interactive Sand Simulation for Gesture Tracking systems Shrenik Lad

Transcription:

Cloth Simulation on the GPU Cyril Zeller NVIDIA Corporation

Overview A method to simulate cloth on any GPU supporting Shader Model 3 (Quadro FX 4500, 4400, 3400, 1400, 540, GeForce 6 and above) Takes advantage of the massive parallel computation horsepower of GPUs Geared toward performance and visual realism, not physical accuracy Suitable to 3D games and virtual reality systems

Outline Demo Algorithm outline GPU implementation

Demo Available at http://download.developer.nvidia.com/developer/sdk/ Individual_Samples/samples.html#Cloth

Cloth as a Set of Particles Each particle is subject to: A force (gravity, wind, drag, etc.) Various constraints: To maintain overall shape (springs) To prevent interpenetration with the environment Constraints are resolved by relaxation CPU version successfully used in games: Jakobsen, T. Advanced character physics, GDC 01

Force Verlet integration: P(t + Δt) = P(t) + k (P(t) P(t - Δt)) + Δt 2 F(t) Δt: simulation time step P(t): particle position F(t): force k: damping coefficient No force applied to fixed or user-moved particles

Spring Constraints Particles are linked by springs: Structural springs Shear springs A spring is simulated as a distance constraint between two particles

Distance Constraint A distance constraint between two particles is enforced by moving them away or towards each other: If both particles are free: If one particle is fixed: Distance at rest

Collision Constraints The environment is defined as a set of collision objects (planes, spheres, boxes, ellipsoids) A collision constraint between a particle and a collision object is enforced by moving the particle outside the object:

Algorithm Outline For every simulation time step: For every particle that isn t fixed or user-moved: Apply force For every relaxation step: For every spring constraint: Enforce distance constraint For every particle: For every collision object: If the particle is inside, move it outside

GPU Implementation Overview The particle positions and normals are stored into floating-point textures The CPU never reads back these textures! At every frame: GPU simulation: Update the position and normal textures GPU rendering: Render using vertex texture fetch (available on Shader Model 3.0 and above)

GPU Simulation: Updating the Position Texture Two textures are required: Current and New Positions get updated through a series of draw calls Each draw call is of the form: Set the appropriate pixel shader Set New as the render target Current Pixel shader Draw a quad covering the entire render target Swap Current and New New

GPU Simulation: Force One draw call Verlet integration requires three textures: Current Force pixel shader Old New

GPU Simulation: Spring Constraints Interdependent constraints must be enforced sequentially for the relaxation to converge So constraints are divided into 8 groups of independent constraints One draw call per group One draw call Another draw call

GPU Simulation: Spring Constraints 4 draw calls for the structural springs: 4 draw calls for the shear springs:

GPU Simulation: Collision Constraints One draw call The parameters of each collision object (center, dimension) are stored into 1Dtextures: One texture per geometric type Textures are necessary for looping through the collision objects since Shader Model 3.0 does not support indexing of constant registers

GPU Simulation: Cloth Cutting In cut mode each mouse motion defines a cutter triangle A pixel shader intersects the cutter with each cloth triangle The result is read back to the CPU and cut triangles and springs are removed

Cloth with a Generic Shape Non-rectangular mesh or mesh with holes: Create a geometry image from the mesh [Gu et al. Geometry Images Siggraph 02] Handle split vertices by: Enforcing spring constraints attached to each duplicate Averaging the resulting positions before enforcing the collision constraints

Performance 400 frames per second On a GeForce 6800 Ultra With: 100 x 100 particles One relaxation step Structural and shear springs

Future Work Better collision detection Self-collision detection Simulation level of details