Physically Based Simulation

Similar documents
Physically Based Simulation

Mass-Spring Systems. Last Time?

The jello cube. Undeformed cube. Deformed cube

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

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

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

Physically based modelling Computer Graphics I February 27, 2003

Cloth Animation with Collision Detection

Cloth Simulation. COMP 768 Presentation Zhen Wei

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

Modeling Cloth Using Mass Spring Systems

Navier-Stokes & Flow Simulation

Navier-Stokes & Flow Simulation

Particle Systems. Lecture 8 Taku Komura

PHYSICALLY BASED ANIMATION

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

Directional Constraint Enforcement for Fast Cloth Simulation

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

Navier-Stokes & Flow Simulation

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

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

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

Computer Graphics Disciplines. Grading. Textbooks. Course Overview. Assignment Policies. Computer Graphics Goals I

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

Fracture & Tetrahedral Models

Rigid Body Dynamics, Collision Response, & Deformation

Simulation: Particle Systems

An Analysis of Interactive Deformable Solid Object Modeling

Numerical Integration

Cloth Hair. and. soft bodies

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

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

CS-184: Computer Graphics. Today

Simulation of curly hair

PPGCC Linha de Pesquisa SIV Disciplina: Animação Computadorizada. Profª. Drª. Soraia Raupp Musse Pós-doc Dr Leandro Dihl 12/05/2015

Anatomy of a Physics Engine. Erwin Coumans

DYNAMICS FOR ANIMATION. Rémi Ronfard, Animation, M2R MOSIG

Continuous Collision Detection and Physics

Physics Tutorial 2: Numerical Integration Methods

Cloth The Animation of Natural Phenomena Adrien Treuille

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

Physically based simulation of thin-shell objects burning

Animation. Itinerary. What is Animation? What is Animation? Animation Methods. Modeling vs. Animation Computer Graphics Lecture 22

A Fast and Stable Approach for Restoration of Warped Document Images

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

Animation. Itinerary Computer Graphics Lecture 22

Real Time Cloth Simulation

CS-184: Computer Graphics. Today. Lecture #20: Spring and Mass systems. 20-SpringMassSystems.key - April 23, Spring and Mass systems

CS-184: Computer Graphics. Today. Lecture #22: Spring and Mass systems. Spring and Mass systems. Distance springs Spring dampers Edge springs

An Adaptive Collision Detection and Resolution for Deformable Objects Using Spherical Implicit Surface

How To Implement a Pressure Soft Body Model

Soft Body Deformation Dynamics Based on Shape Matching

14: MASS-SPRING SYSTEMS & CLOTH

MUTI-LEVEL SB COLLIDE: COLLISION AND SELF-COLLISION IN SOFT BODIES

Chapter 6 Visualization Techniques for Vector Fields

Cloth and Hair Collisions

Simulation of Instrument-Tissue Interactions and System Integration

Last Time? Animation, Motion Capture, & Inverse Kinematics. Today. Keyframing. Physically-Based Animation. Procedural Animation

QP-Collide: A New Approach to Collision Treatment

Position Based Dynamics for Character Effects

Dynamical Simulation 1: Particle Systems and ODEs

Overview of Traditional Surface Tracking Methods

A Comparison of Different Techniques for Haptic Cloth Rendering

Implicit Integration Collision Detection

Real-Time Simulation of Deformation and Fracture of Stiff Materials

CS205b/CME306. Lecture 9

Course Producer. Prerequisites. Textbooks. Academic integrity. Grading. Ming Chen. Same office hours as TA. The Hobbit: The Desolation of Smaug (2013)

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

Structure and Synthesis of Robot Motion

3D Physics Engine for Elastic and Deformable Bodies. Liliya Kharevych and Rafi (Mohammad) Khan Advisor: David Mount

CS 231. Deformation simulation (and faces)

Hair Simulation (and Rendering)

Soft-Bodies. Spatially Coupled Shells. Technical Report (Soft-Bodies) Benjamin Kenwright. 1 Introduction

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

Rigid Body Dynamics, Fracture, & Deformation

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

Assignment 1: Mass-Spring System

animation computer graphics animation 2009 fabio pellacini 1

Fast Simulation of Mass-Spring Systems

Homework 2 Questions? Animation, Motion Capture, & Inverse Kinematics. Velocity Interpolation. Handing Free Surface with MAC

Animation. Computer Graphics COMP 770 (236) Spring Instructor: Brandon Lloyd 4/23/07 1

Particle-based Fluid Simulation

BOURNEMOUTH UNIVERSITY INTERACTIVE TOOL FOR CLOTH SIMULATION VOLHA KOLCHYNA. MSc Computer Animation and Visual Effects

Last Time? Animation, Motion Capture, & Inverse Kinematics. Today. Keyframing. Physically-Based Animation. Procedural Animation

Computer Animation III

Spatial Data Structures

DYNAMIC SIMULATION OF INEXTENSIBLE CLOTH

Cloth Simulation. Elaine Kieran (d ) Gavin Harrison (d ) Luke Openshaw (d ) MSc Computer Animation NCCA Bournemouth University

CS 231. Deformation simulation (and faces)

Last Time? Inverse Kinematics. Today. Keyframing. Physically-Based Animation. Procedural Animation

animation projects in digital art animation 2009 fabio pellacini 1

Quaternions and Rotations

Physically Based Modeling

Animation, Motion Capture, & Inverse Kinematics. Announcements: Quiz

Realistic Animation of Fluids

Splines. Parameterization of a Curve. Curve Representations. Roller coaster. What Do We Need From Curves in Computer Graphics? Modeling Complex Shapes

Fundamentals of Computer Animation

Realtime Water Simulation on GPU. Nuttapong Chentanez NVIDIA Research

An added mass partitioned algorithm for rigid bodies and incompressible flows

Simultaneous Coupling of Fluids and Deformable Bodies

Transcription:

CSCI 480 Computer Graphics Lecture 21 Physically Based Simulation April 11, 2011 Jernej Barbic University of Southern California http://www-bcf.usc.edu/~jbarbic/cs480-s11/ Examples Particle Systems Numerical Integration Cloth Simulation [Ch. 11.2-11.6] 1 Physics in Computer Graphics Very common Computer Animation, Modeling (computational mechanics) Rendering (computational optics) 2 Physics in Computer Animation Fluids Smoke Deformable strands (rods) Cloth Solid 3D deformable objects... and many more! Fluids 3 Enright, Marschner, Fedkiw, SIGGRAPH 2002 4 Fluids and Rigid Bodies [Carlson, Mucha, Turk, SIGGRAPH 2004] Fluids with Deformable Solid Coupling [Robinson-Mosher, Shinar, Gretarsson, Su, Fedkiw, SIGGRAPH 2008] 5 6 1

Deformations Cloth [Barbic and James, Source: SIGGRAPH 2005] 7 ACM SIGGRAPH 8 Cloth (Robustness) Simulating Large Models [Bridson, Fedkiw, Anderson, ACM [Doug James, SIGGRAPH 2002 9 PhD Thesis, UBC, 2001] 10 Sound Simulation (Acoustics) Multibody Dynamics [James, Barbic, Pai, SIGGRAPH 2006] 11 12 2

Multibody Dynamics + Self-collision Detection Physics in Games [Parker and James, [Barbic and James, SIGGRAPH 2010] 13 Symposium on Computer Animation 2009] 14 Haptic Interfaces Surgical Simulation hap tic ('hap-tik) adj. Of or relating to the sense of touch; tactile. 15 [James and Pai, SIGGRAPH 2002] 16 Offline Physics Special effects (film, commercials) Large models: millions of particles / tetrahedra / triangles Use computationally expensive rendering (global illumination) Impressive results Real-time Physics Interactive systems: computer games virtual medicine (surgical simulation) Must be fast (30 fps, preferably 60 fps for games) Only a small fraction of CPU time devoted to physics! Has to be stable, regardless of user input Many seconds of computation time per frame 17 18 3

Particle System Basic physical system in computer graphics Newton s 2nd law: Newton s Laws We have N particles They interact with some forces Fire, Smoke, Cloth,... Very popular for its simplicity [William Reeves, SIGGRAPH 1983] Gives acceleration, given the force and mass Newton s 3rd law: If object A exerts a force F on object B, then object B is at the same time exerting force -F on A. 19 20 Case Study: Mass-spring Systems Mass particles connected by elastic springs One dimensional: rope, chain Two dimensional: cloth, shells Three dimensional: soft bodies Single spring Obeys the Hook s law: F = k (x - x 0 ) x 0 = rest length k = spring elasticity (stiffness) For x<x 0, spring wants to extend For x>x 0, spring wants to contract Source:Matthias Mueller, SIGGRAPH 21 22 Hook s law in 3D Assume A and B two mass points connected with a spring. Let L be the vector pointing from B to A Let R be the spring rest length Then, the elastic force exerted on A is: Damping Springs are not completely elastic They absorb some of the energy and tend to decrease the velocity of the mass points attached to them Damping force depends on the velocity: k d = damping coefficient k d different than k Hook!! 23 24 4

A network of springs Every mass point connected to some other points by springs Springs exert forces on mass points Hook s force Damping force Other forces External force field Gravity Electrical or magnetic force field Collision force Network organization is critical For stability, must organize the network of springs in some clever way Basic network Stable network Network out of control 25 26 Time Integration Euler Integration x(t + Δt) = x(t) + Δt f(x(t)) Physics equation: x = f(x,t) Simple, but inaccurate. x=x(t) is particle trajectory Unstable with large timesteps. 27 28 Inaccuracies with explicit Euler Midpoint Method Improves stability 1. Compute Euler step Δx = Δt f(x, t) 2. Evaluate f at the midpoint f mid = f((x+δx)/2, (t+δt)/2) Gain energy Blow-up 3. Take a step using the midpoint value x(t+ Δt) = x(t) + Δt f mid 29 30 5

Many more methods Runge-Kutta (4th order and higher orders) Implicit methods sometimes unconditionally stable very popular (e.g., cloth simulations) a lot of damping with large timesteps Symplectic methods exactly preserve energy, angular momentum and/or other physical quantities Symplectic Euler 31 Cloth Simulation Cloth Forces - Stretch - Shear - Bend Many methods are a more advanced version of a mass-spring system Derivatives of Forces necessary for stability [Baraff and Witkin, SIGGRAPH 1998] 32 Challenges Self-collisions: definition Complex Formulas Large Matrices Stability Collapsing triangles [Govindaraju et al. 2005] Deformable model is self-colliding iff there exist non-neighboring intersecting triangles. Self-collision detection 33 34 Bounding volume hierarchies Bounding volume hierarchy [Hubbard 1995] [Gottschalk et al. 1996] [van den Bergen 1997] [Bridson et al. 2002] root root AABBs Level 1 AABBs Level 3 [Teschner et al. 2002] [Govindaraju et al. 2005] 35 36 6

Bounding volume hierarchy Real-time cloth simulation v w v w Source: Andy Pierce Model Triangles FPS % Forces + Stiffness Matrix % Solver 37 Curtain 2400 25 67 33 38 Multithreading implementation Summary Examples of physically based simulation Particle Systems Numerical Integration Cloth Simulation Source: Andy Pierce 39 40 7