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

Similar documents
Physically Based Simulation

Physically Based Simulation

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

Mass-Spring Systems. Last Time?

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

The jello cube. Undeformed cube. Deformed cube

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

Cloth Simulation. COMP 768 Presentation Zhen Wei

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

Cloth Animation with Collision Detection

Cloth Hair. and. soft bodies

Fracture & Tetrahedral Models

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

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

Simulation in Computer Graphics Space Subdivision. Matthias Teschner

A Fast and Stable Approach for Restoration of Warped Document Images

Collision Detection based on Spatial Partitioning

Co-rotational Finite Element Solid Simulation with Collisions. Patrick Riordan

Directional Constraint Enforcement for Fast Cloth Simulation

Lecture VI: Constraints and Controllers. Parts Based on Erin Catto s Box2D Tutorial

Navier-Stokes & Flow Simulation

DYNAMIC SIMULATION OF INEXTENSIBLE CLOTH

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

Physically based modelling Computer Graphics I February 27, 2003

Fundamentals of Computer Animation

PHYSICALLY BASED ANIMATION

Rigid Body Dynamics, Fracture, & Deformation

Rachel Weinstein, Joseph Teran and Ron Fedkiw

Collision Detection with Bounding Volume Hierarchies

Particle-based Fluid Simulation

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

A simple example. Assume we want to find the change in the rotation angles to get the end effector to G. Effect of changing s

Modeling Cloth Using Mass Spring Systems

CS 231. Deformation simulation (and faces)

CS-184: Computer Graphics. Today

Cloth Simulation on the GPU. Cyril Zeller NVIDIA Corporation

Rigid Body Dynamics, Collision Response, & Deformation

PSE Game Physics. Session (3) Springs, Ropes, Linear Momentum and Rotations. Oliver Meister, Roland Wittmann

Lecture VI: Constraints and Controllers

Computer Animation. Algorithms and Techniques. z< MORGAN KAUFMANN PUBLISHERS. Rick Parent Ohio State University AN IMPRINT OF ELSEVIER SCIENCE

Computer Graphics Ray Casting. Matthias Teschner

Physics Tutorial 2: Numerical Integration Methods

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

Guidelines for proper use of Plate elements

Numerical Integration

Auto Injector Syringe. A Fluent Dynamic Mesh 1DOF Tutorial

CS 231. Deformation simulation (and faces)

Particle Systems. Lecture 8 Taku Komura

Overview of Traditional Surface Tracking Methods

Cloth The Animation of Natural Phenomena Adrien Treuille

Development of the Compliant Mooring Line Model for FLOW-3D

Fracture & Tetrahedral Models

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

Simulation of Overhead Crane Wire Ropes Utilizing LS-DYNA

Partial Differential Equations

The goal is the definition of points with numbers and primitives with equations or functions. The definition of points with numbers requires a

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

SIMULATION OF ELASTIC SOFT TISSUE DEFORMATION IN ORTHODONTICS BY MASS-SPRING SYSTEM

Cloth and Hair Collisions

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

Simulation of curly hair

Real Time Cloth Simulation

An Analysis of Interactive Deformable Solid Object Modeling

2.11 Particle Systems

Motion Capture & Simulation

Navier-Stokes & Flow Simulation

Simulation: Particle Systems

Advanced Computer Graphics Transformations. Matthias Teschner

Modeling Strategies for Dynamic Finite Element Cask Analyses

Real-Time Simulation of Deformation and Fracture of Stiff Materials

Computer Graphics Curves and Surfaces. Matthias Teschner

Revision of the SolidWorks Variable Pressure Simulation Tutorial J.E. Akin, Rice University, Mechanical Engineering. Introduction

Support for Multi physics in Chrono

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

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

ROBOTICS 01PEEQW. Basilio Bona DAUIN Politecnico di Torino

Collision handling: detection and response

AMSTERDAM BOSTON HEIDELBERG LONDON NEW YORK OXFORD PARIS SAN DIEGO SAN FRANCISCO SINGAPORE SYDNEY TOKYO F ^ k.^

Animating cuts with on-the-fly re-meshing

Volumetric Deformable Models for Simulation of Laparoscopic Surgery

QP-Collide: A New Approach to Collision Treatment

Lesson 1: Introduction to Pro/MECHANICA Motion

Intersection Acceleration

Example 24 Spring-back

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

Virtual Environments

Discrete representations of geometric objects: Features, data structures and adequacy for dynamic simulation. Part I : Solid geometry

NVIDIA. Interacting with Particle Simulation in Maya using CUDA & Maximus. Wil Braithwaite NVIDIA Applied Engineering Digital Film

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

Table of Contents. Chapter 1. Modeling and Identification of Serial Robots... 1 Wisama KHALIL and Etienne DOMBRE

Physical based Rigging

Simulation of Instrument-Tissue Interactions and System Integration

Cooperative Control and Mobile Sensor Networks

Recent Advances on Higher Order 27-node Hexahedral Element in LS-DYNA

Written exams of Robotics 2

Hourglass (HG) Modes. Hourglass (HG) Modes

Planning Motion in Completely Deformable Environments

Surgical Cutting on a Multimodal Object Representation

Transcription:

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

Outline introduction forces performance collision handling visualization University of Freiburg Computer Science Department Computer Graphics - 2

Motivation sets of particles are used to model time-dependent phenomena such as ropes, cloth, deformable objects forces between particles account for resistance to stretch, shear, bend, volume changes... 1D, 2D, and 3D mass-point systems, University of Freiburg University of Freiburg Computer Science Department Computer Graphics - 3

Example discretization of an object into mass points representation of internal forces between mass points, e. g. spring forces computation of the dynamics, positions and velocities at discrete time points University of Freiburg Computer Science Department Computer Graphics - 4

Applications entertainment technologies cloth facial expressions computational medicine medical training pre-operative surgical planning Bridson, Fedkiw, Anderson, Stanford University University of Freiburg Computer Science Department Computer Graphics - 5

Outline introduction forces examples energy constraints damping plasticity and other effects performance collision handling visualization University of Freiburg Computer Science Department Computer Graphics - 6

Internal Forces internal forces are symmetric with respect to at least two mass points sum of internal forces is zero internal forces cause no torque internal forces external forces University of Freiburg Computer Science Department Computer Graphics - 7

Internal Forces internal forces are defined for at least two points internal forces do not influence the global dynamic behavior of a mass-point system (linear and angular momentum is preserved) spring force is an internal force external forces can change linear and angular velocity of a mass-point system is gravitational force an internal force? University of Freiburg Computer Science Department Computer Graphics - 8

Gravity objects with positions and masses attract each other with forces is the gravitational constant internal force, if applied to both objects University of Freiburg Computer Science Department Computer Graphics - 9

Gravity on earth gravity is dominated by earth mass of the earth is constant distance from surface to center is nearly constant is an acceleration pointing towards the earth center in virtual environments, the direction depends on the coordinate system, e. g. force exerted to due to gravity: external force, if not applied to both objects University of Freiburg Computer Science Department Computer Graphics - 10

Elastic Spring - spring stiffness - initial spring length - current spring length linear force-deformation relation (Hooke s law) simple mechanism for internal forces elasticity: ability of a spring to return to its initial configuration in the absence of forces University of Freiburg Computer Science Department Computer Graphics - 11

Mass-Spring System in 3D non-linear relation of forces and mass-point positions University of Freiburg Computer Science Department Computer Graphics - 12

A Simple Deformable Object discretize the object into mass points define the connectivity (topology, adjacencies of mass points) set model parameters point: mass, position, velocity spring: stiffness, initial length compute forces: spring force, gravity update positions and velocities of all mass points with a numerical integration scheme, e. g. University of Freiburg Computer Science Department Computer Graphics - 13

Explicit Numerical Integration e.g., Heun for all mass points compute for all mass points compute for all mass points compute depends on position and all connected neighbors depends on the predicted position and on the predicted positions of all neighbors University of Freiburg Computer Science Department Computer Graphics - 14

Implicit Numerical Integration e.g., implicit Euler force linearization University of Freiburg Computer Science Department Computer Graphics - 15

Implicit Numerical Integration in the Jacobian, a spring force between and is represented by four sub matrices that are accumulated at positions University of Freiburg Computer Science Department Computer Graphics - 16

Outline introduction forces examples energy constraints damping plasticity and other effects performance collision handling visualization University of Freiburg Computer Science Department Computer Graphics - 17

Spatial Discretization deformable objects are commonly discretized into mass points and simplices line segments in 1D, triangles in 2D, tetrahedrons in 3D 1349 mass points 4562 tetras 6888 springs 2949 mass points 10257 tetras 15713 springs 8 mass points 5 tetras University of Freiburg Computer Science Department Computer Graphics - 18

Generalized Springs can be used to preserve, e. g., a distance between two points an area defined by three points a volume defined by four points forces are derived from constraints depends on mass point positions iff the constraint is met, e. g. a current distance equals a goal distance, a current area equals a goal area, motivation demo University of Freiburg Computer Science Department Computer Graphics - 19

Constraint Forces potential energy based on constraint iff the constraint is met iff the constraint is not met force at mass point based on the potential energy University of Freiburg Computer Science Department Computer Graphics - 20

Constraint Forces for a constraint, the sum of constraint forces at all involved mass points is equal to zero linear and angular momentum of the system are preserved constraint forces are internal forces (conservative forces) University of Freiburg Computer Science Department Computer Graphics - 21

Distance Preservation preserve distance between and University of Freiburg Computer Science Department Computer Graphics - 22

Distance Preservation forces based on constraint are spring forces with stiffness constant University of Freiburg Computer Science Department Computer Graphics - 23

Area Preservation preserve area of a triangle edges constraint forces University of Freiburg Computer Science Department Computer Graphics - 24

Volume Preservation preserve volume of a tetrahedron edges constraint forces University of Freiburg Computer Science Department Computer Graphics - 25

Demos distance preservation vs. volume preservation surface tension vs. volume preservation University of Freiburg Computer Science Department Computer Graphics - 26

Demos volume preservation can be used to mimic curvature preservation at adjacent triangles curvature can be preserved by preserving the volume of the virtual tetrahedron (x 1,x 2,x 3,x 4 ) volume forces can mimic bending forces University of Freiburg Computer Science Department Computer Graphics - 27

Constraint Forces - Summary powerful mechanism to preserve various characteristics (constraints) are internal forces, preserve linear and angular momentum are defined for sets of mass points can be combined, weighted with stiffness constants drawbacks can be computationally expensive non-intuitive parameters in case of combined constraints can be redundant or competing University of Freiburg Computer Science Department Computer Graphics - 28

Outline introduction forces examples energy constraints damping plasticity and other effects performance collision handling visualization University of Freiburg Computer Science Department Computer Graphics - 29

Damping Forces are proportional to a velocity act in the direction opposite to a velocity model friction can improve the stability of a system should not slow down the movement of a system University of Freiburg Computer Science Department Computer Graphics - 30

Point Damping damping force according to the velocity of a mass point force is applied in opposite direction to the velocity force at a point is "used" for acceleration and damping e.g., mass point under gravity does not accelerate iff gravity and damping cancel out each other University of Freiburg Computer Science Department Computer Graphics - 31

Explicit Point Damping damping does not always damp - velocity without damping - velocity with added damping - damping force University of Freiburg Computer Science Department Computer Graphics - 32

Implicit Point Damping considering the current velocity for damping can cause problems considering the velocity of the next time step reduces problems can still be directly solvable for, e.g., University of Freiburg Computer Science Department Computer Graphics - 33

Explicit Spring Damping damping force according to the relative velocity of adjacent mass points and normalized direction difference of the magnitudes of velocities projected onto (magnitude of the relative velocity) damping forces University of Freiburg Computer Science Department Computer Graphics - 34

Implicit Spring Damping generally more robust implementation in two integration steps first step predicts positions and velocities without damping second step corrects predicted quantities with added damping implementation in one integration step predict positions and velocities within the damping force computation, e. g. using Euler prediction and actual integration can be done with different schemes University of Freiburg Computer Science Department Computer Graphics - 35

Demos benefits and drawbacks of damping University of Freiburg Computer Science Department Computer Graphics - 36

Damping - Summary point and spring damping influence the stability implicit forms are preferable due to time discretization reduces oscillations point damping affects the global object dynamics integration schemes can add artificial point damping (which cannot be controlled by the user) spring damping does not affect the global object dynamics University of Freiburg Computer Science Department Computer Graphics - 37

Outline introduction forces examples energy constraints damping plasticity and other effects performance collision handling visualization University of Freiburg Computer Science Department Computer Graphics - 38

Elasticity and Plasticity elastic deformation is reversible plastic deformation is not reversible elastic object reversible deformation original shape deformation due to forces University of Freiburg Computer Science Department Computer Graphics - 39 plastic object irreversible deformation

Elasticity and Plasticity decomposition of deformation decomposition of corresponding forces only elastic forces are considered University of Freiburg Computer Science Department Computer Graphics - 40

Implementation initialization update are user-defined parameters University of Freiburg Computer Science Department Computer Graphics - 41

Elastic and Plastic Deformation University of Freiburg Computer Science Department Computer Graphics - 42

Resting Distance, Area, Volume plastic deformation corresponds to adjusting the resting distance between mass points principle can also be applied to other properties, e. g. area, volume adjustment of resting states causes internal forces can be used for effects such as contraction University of Freiburg Computer Science Department Computer Graphics - 43

Strain Limiting limited deformation geometric, position-based implementation University of Freiburg Computer Science Department Computer Graphics - 44

Strain Limiting implementation approximates a bi-phasic force-deformation relation position update can be performed after the integration step iterative implementation for mass-point systems preserves linear and angular momentum corresponds to some internal forces deformation force University of Freiburg Computer Science Department Computer Graphics - 45

Forces - Summary external forces change the linear and angular momentum of a system, e.g. gravity, point damping internal forces can preserve characteristics, e.g. distances, areas, volumes damping forces improve the stability of a system resting length adjustments, symmetric position or momentum adjustments can mimic internal forces, e. g. for plasticity, stiff springs challenge: stable simulation of stiff, non-oscillating deformable objects without explicit or artificial point damping University of Freiburg Computer Science Department Computer Graphics - 46

Outline introduction forces performance collision handling visualization University of Freiburg Computer Science Department Computer Graphics - 47

Performance criteria system updates per second (frames per second) simulation time step parameters number of primitives (mass points, distances, volumes ) internal and external forces numerical integration scheme additional costs for, e.g., collision handling, rendering, University of Freiburg Computer Science Department Computer Graphics - 48

Performance - Example cube with 4096 mass points, 16875 tetrahedrons, 22320 springs, distance and volume forces, gravity, Pentium 4, 2GHz method error time step comp. time ratio order [ms] [ms] expl. Euler 1 0.5 9.5 0.05 RK 2 2 3.8 18.9 0.20 impl. Euler 1 49.0 172.0 0.28 RK 4 4 17.0 50.0 0.34 Verlet 3 11.5 9.5 1.21 University of Freiburg Computer Science Department Computer Graphics - 49

Outline introduction forces performance collision handling visualization University of Freiburg Computer Science Department Computer Graphics - 50

Plane Representation in 3D, a plane can be defined with a point on the plane and a normalized plane normal the plane is the set of points with for a point, the distance to the plane is University of Freiburg Computer Science Department Computer Graphics - 51

Collision Response if a collision is detected, i. e., a collision impulse is computed that prevents the interpenetration of the mass point and the plane (wall) we first consider the case of a particle-particle collision with being the normalized direction from to the response scheme is later adapted to the particle-plane case University of Freiburg Computer Science Department Computer Graphics - 52

Coordinate Systems velocities before the collision response and velocities after the collision response are considered in the coordinate system defined by collision normal and two orthogonal normalized tangent axes and e. g. the velocity after the response is transformed back University of Freiburg Computer Science Department Computer Graphics - 53

Concept conservation of momentum coefficient of restitution, elastic, inelastic friction opposes sliding motion along and University of Freiburg Computer Science Department Computer Graphics - 54

Linear System nine equations, nine unknowns University of Freiburg Computer Science Department Computer Graphics - 55

Linear System inverse University of Freiburg Computer Science Department Computer Graphics - 56

Particle-Plane plane has infinite mass and does not move: columns 2, 3, 7, 8, 9 do not contribute to the solution to solve for the particle velocity after collision response, rows 4, 5, 6 have to be considered plane has infinite mass University of Freiburg Computer Science Department Computer Graphics - 57

Implementation is difficult to handle and should be guaranteed is a useful simplification University of Freiburg Computer Science Department Computer Graphics - 58

Position Update the collision impulse updates the velocity however, the point is still in collision for low velocities, the position update in the following integration step may not be sufficient to resolve the collision therefore, the position should be updated as well, e.g. which projects the point onto the plane the position update is not physically-motivated, it just resolves problems due to discrete time steps University of Freiburg Computer Science Department Computer Graphics - 59

Outline introduction forces performance collision handling visualization University of Freiburg Computer Science Department Computer Graphics - 60

Concept geometric combination of a low-resolution tetrahedral mesh for simulation and a high-resolution triangular mesh for visualization coupling by Barycentric coordinates of a surface point with respect to a corresponding tetrahedron simulation visualization University of Freiburg Computer Science Department Computer Graphics - 61

Surface-Volume Coupling a point can be represented with the points of a tetrahedron University of Freiburg Computer Science Department Computer Graphics - 62

Barycentric Coordinates in 3D a point can be represented using are Barycentric coordinates of with respect to University of Freiburg Computer Science Department Computer Graphics - 63

Properties is inside the convex combination of, i.e. inside the tetrahedron is on the surface of the tetrahedron is outside the tetrahedron University of Freiburg Computer Science Department Computer Graphics - 64

Computation leads to the following system singular, if two edges of the tetrahedron are parallel! is computed as University of Freiburg Computer Science Department Computer Graphics - 65

Implementation data structure for each point of the surface mesh, store Barycentric coords and the corresponding tetrahedron pre-processing for each surface point, determine the closest tetrahedron of the simulation mesh (point of the surface mesh should be located inside a tetrahedron) for each surface point, compute its Barycentric coords with respect to the corresponding tetrahedron in each simulation step for each surface point, compute its position from its Barycentric coords and the positions of the mass points of the corresponding tetrahedron demo University of Freiburg Computer Science Department Computer Graphics - 66

Summary Mass-Point Systems forces, e. g. gravity, energy constraints, damping, plasticity numerical integration schemes (see particle systems) collision handling for planes visualization, combination of low-resolution simulation meshes with high-resolution visualization meshes University of Freiburg Computer Science Department Computer Graphics - 67

References Ian Millington, "Game Physics Engine Development", Elsevier Amsterdam, ISBN-13: 978-0-12-369471-3, 2007. David H. Eberly, "Game Physics", Elsevier Amsterdam, ISBN 1-55860-740-4, 2003. Murilo G. Coutinho, "Dynamic Simulations of Multibody Systems", Springer Berlin, ISBN 0-387-95192-X, 2001. Andrew Witkin, Kurt Fleischer, Alan Barr, "Energy Constraints on Parameterized Models", SIGGRAPH '87, ACM New York, pp. 225-232, 1987. M. Teschner, B. Heidelberger, M. Mueller, M. Gross, "A Versatile and Robust Model for Geometrically Complex Deformable Solids", Proc. Computer Graphics International CGI'04, Crete, Greece, pp. 312-319, June 16-19, 2004. University of Freiburg Computer Science Department Computer Graphics - 68