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

Physically based modelling Computer Graphics I February 27, 2003

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

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

Particle Systems. Lecture 8 Taku Komura

Navier-Stokes & Flow Simulation

PHYSICALLY BASED ANIMATION

Directional Constraint Enforcement for Fast Cloth Simulation

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

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

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

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

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

Fracture & Tetrahedral Models

Rigid Body Dynamics, Collision Response, & Deformation

Numerical Integration

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

An Analysis of Interactive Deformable Solid Object Modeling

CS-184: Computer Graphics. Today

Simulation: Particle Systems

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

Simulation of curly hair

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

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

Physically based simulation of thin-shell objects burning

Cloth The Animation of Natural Phenomena Adrien Treuille

Continuous Collision Detection and Physics

Physics Tutorial 2: Numerical Integration Methods

A Fast and Stable Approach for Restoration of Warped Document Images

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

Soft Body Deformation Dynamics Based on Shape Matching

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

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

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

Real Time Cloth Simulation

Simulation of Instrument-Tissue Interactions and System Integration

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

14: MASS-SPRING SYSTEMS & CLOTH

How To Implement a Pressure Soft Body Model

Real-Time Simulation of Deformation and Fracture of Stiff Materials

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

Rigid Body Dynamics, Fracture, & Deformation

Chapter 6 Visualization Techniques for Vector Fields

Cloth and Hair Collisions

Animation. Itinerary Computer Graphics Lecture 22

Position Based Dynamics for Character Effects

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

Dynamical Simulation 1: Particle Systems and ODEs

QP-Collide: A New Approach to Collision Treatment

Overview of Traditional Surface Tracking Methods

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

A Comparison of Different Techniques for Haptic Cloth Rendering

Implicit Integration Collision Detection

Fast Simulation of Mass-Spring Systems

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

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

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

CS205b/CME306. Lecture 9

Structure and Synthesis of Robot Motion

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

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

CS 231. Deformation simulation (and faces)

Hair Simulation (and Rendering)

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

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

Assignment 1: Mass-Spring System

animation computer graphics animation 2009 fabio pellacini 1

Fundamentals of Computer Animation

Fracture & Tetrahedral Models

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

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

DYNAMIC SIMULATION OF INEXTENSIBLE CLOTH

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

Particle-based Fluid Simulation

Computer Animation III

Simultaneous Coupling of Fluids and Deformable Bodies

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

CS 231. Deformation simulation (and faces)

Physically Based Modeling

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

animation projects in digital art animation 2009 fabio pellacini 1

Computer animation for fluid simulation of a high viscous fluid melting

Realistic Animation of Fluids

Spatial Data Structures

Karen Liu associate professor at School of Interactive Computing. Murali Varma graduate student at School of Interactive Computing

Transcription:

CSCI 420 Computer Graphics Lecture 21 Physically Based Simulation Examples Particle Systems Numerical Integration Cloth Simulation [Angel Ch. 9] Jernej Barbic University of Southern California 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! 3

Fluids Enright, Marschner, Fedkiw, SIGGRAPH 2002 4

Fluids and Rigid Bodies [Carlson, Mucha, Turk, SIGGRAPH 2004] 5

Fluids with Deformable Solid Coupling [Robinson-Mosher, Shinar, Gretarsson, Su, Fedkiw, SIGGRAPH 2008] 6

Deformations [Barbic and James, SIGGRAPH 2005] 7

Cloth Source: ACM SIGGRAPH 8

Cloth (Robustness) [Bridson, Fedkiw, Anderson, ACM SIGGRAPH 2002 9

Simulating Large Models [Doug James, PhD Thesis, UBC, 2001] 10

Sound Simulation (Acoustics) [James, Barbic, Pai, SIGGRAPH 2006] 11

Multibody Dynamics 12

Multibody Dynamics + Self-collision Detection [Barbic and James, SIGGRAPH 2010] 13

Physics in Games [Parker and O Brien, Symposium on Computer Animation 2009] 14

Haptic Interfaces hap tic ('hap-tik) adj. Of or relating to the sense of touch; tactile. 15

Surgical Simulation [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 Many seconds of computation time per frame 17

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 18

Particle System Basic physical system in computer graphics We have N particles They interact with some forces Fire, Smoke, Cloth,... [William Reeves, SIGGRAPH 1983] Very popular for its simplicity 19

Newton s 2nd law: Newton s Laws F = ma 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. F F 20

Case Study: Mass-spring Systems Mass particles connected by elastic springs One dimensional: rope, chain Two dimensional: cloth, shells Three dimensional: soft bodies Source:Matthias Mueller, SIGGRAPH 21

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 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: L F = khook ( L R) L 23

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: F = k d v k d = damping coefficient k d different than k Hook!! 24

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 25

Network organization is critical For stability, must organize the network of springs in some clever way Basic network Stable network Network out of control 26

Time Integration Physics equation: x = f(x,t) x=x(t) is particle trajectory Source:Andy Witkin, SIGGRAPH 27

Euler Integration x(t + Δt) = x(t) + Δt f(x(t)) Simple, but inaccurate. Unstable with large timesteps. Source:Andy Witkin, SIGGRAPH 28

Inaccuracies with explicit Euler Gain energy Blow-up Source:Andy Witkin, SIGGRAPH 29

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) Source:Andy Witkin, SIGGRAPH 3. Take a step using the midpoint value x(t+ Δt) = x(t) + Δt f mid 30

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 Complex Formulas Large Matrices Stability Collapsing triangles [Govindaraju et al. 2005] Self-collision detection 33

Self-collisions: definition Deformable model is self-colliding iff there exist non-neighboring intersecting triangles. 34

Bounding volume hierarchies [Hubbard 1995] [Gottschalk et al. 1996] [van den Bergen 1997] [Bridson et al. 2002] AABBs Level 1 AABBs Level 3 [Teschner et al. 2002] [Govindaraju et al. 2005] 35

Bounding volume hierarchy root root 36

Bounding volume hierarchy v w v w 37

Real-time cloth simulation Source: Andy Pierce Model Triangles FPS % Forces + Stiffness Matrix % Solver Curtain 2400 25 67 33 38

Multithreading implementation Source: Andy Pierce 39

Summary Examples of physically based simulation Particle Systems Numerical Integration Cloth Simulation 40