PHYSICS SIMULATION Rigid body simulator introduction Continuum - - PowerPoint PPT Presentation

physics simulation
SMART_READER_LITE
LIVE PREVIEW

PHYSICS SIMULATION Rigid body simulator introduction Continuum - - PowerPoint PPT Presentation

() PHYSICS SIMULATION Rigid body simulator introduction Continuum simulation The Documents http://haselab.net/class/vr userbasic passwdprog asela aselab Introduction for Multi-rigid body physics simulator


slide-1
SLIDE 1

asela aselab

東工大長谷川(晶)研

PHYSICS SIMULATION

Rigid body simulator introduction Continuum simulation The Documents http://haselab.net/class/vr user:basic passwd:prog

slide-2
SLIDE 2

Introduction for Multi-rigid body physics simulator

slide-3
SLIDE 3

asel aselab 東工大長谷川(晶)研 asel aselab 東工大長谷川(晶)研

3

Taxonomy of physics simulator

 Computation Methods for constraint forces are not limited to Spring and Damper.  Velocity based LCP is widely used.

Havok Novodex ODE …

reference: Kenny Erleben: Multibody Dynamics Animation Lecture 12 Department of Computer Science Copenhagen University

Multi Body Dynamics simulator Analytical method Full coordinate method penalty method Impulse method Mirtich 96 Hahn 88 LCP based formularization Moore & Williams 89

Acceleration

base Baraff 89 Velocity base Stewart 96 Jean Jacques Moreau method Reduced coordinate method Springhead1 Armstrong 79 Featherstone 83 OpenTissue ODE Springhead2

slide-4
SLIDE 4

asel aselab 東工大長谷川(晶)研 asel aselab 東工大長谷川(晶)研

4

Rigid body motion equation

 Two objects+Restraint+External Force  Many rigid bodies+constraints

+ external forces

vj j

rj ri

vi i

mj Ij mi Ii

Inertia Velocity and Angular velocity Other external force, gravity Constraint force

u M fc fe

slide-5
SLIDE 5

asel aselab 東工大長谷川(晶)研 asel aselab 東工大長谷川(晶)研

5

Constraint Examples

 Joint(Hinge) (Contacts are mentioned later)

 Only rotate the hinge axis e3 :  Rotate hinge axis e3 freely = torque not work:

w2, 2 w1 1 w3 3 w4 4 w5  5 w6  6

Constraint coordinate system

e1 e2 e3

:relative velocity/angular velocity at the joint point :constraint forces and torques on the joint point

force velocity force velocity

w 

i j

slide-6
SLIDE 6

asel aselab 東工大長谷川(晶)研 asel aselab 東工大長谷川(晶)研

6

Embed constraints into equation of motion

 Express equation of motion on the constraint coordinate.

→ use w,

express w2 w3, w5 w6, with the same way Matrix expression of cross product

vj ,j rj ri vi ,i u u

w

Jrow1 Jrow4

vi ,i: velocity or angular velocity of object i in world coordinate. w: relative velocity and angular velocity of j from i in constraint coordinate

slide-7
SLIDE 7

asel aselab 東工大長谷川(晶)研 asel aselab 東工大長谷川(晶)研

7

Embed constraints into equation of motion

fj ,j rj ri fi ,i

u velocity/angular

  • f rigid body coordinate

w velocity/angular velocity in constraint coordinate  force/torque in constraint coordinate fc force/torque in world coordinate vi ,i: velocity, angular velocity of object i vj , j: velocity, angular velocity of object j fj ,j: constraint forces given from i to j in world coordinate j : constraint forces given from i to j in constraint coordinate

vj ,j rj ri vi ,i

w

slide-8
SLIDE 8

asel aselab 東工大長谷川(晶)研 asel aselab 東工大長谷川(晶)研

8

Embed constraints

 Transform equation of motion to consider constraint easily  Ally with constraint condition (hinge’s case)

Solve the simultaneous equations Constraint: Substitute to equation of motion:

slide-9
SLIDE 9

asel aselab 東工大長谷川(晶)研 asel aselab 東工大長谷川(晶)研

9

Simulation Procedure

 Calculate constraint force   Update rigid body velocity  Update rigid body position

posture of all rigid bodies position

  • rientation

quaternion

A matrix transforming velocity into Quaternion differential

slide-10
SLIDE 10

asel aselab 東工大長谷川(晶)研 asel aselab 東工大長谷川(晶)研

10

Contact Constraint

 Contact

 Do not penetrate each other =

 is not zero when w is zero or is zero when w is not zero:

 Static friction or kinetic friction:  Torque is 0:

relative velocity at joint point contact force on contact point

velocity force velocity force velocity force

slide-11
SLIDE 11

asel aselab 東工大長谷川(晶)研 asel aselab 東工大長谷川(晶)研

11

Embed Constraint (for contact)

 Transform motion equation to consider restraint easily  Ally with constraint condition

There are two variables in an equation at a glance, but actually solve one variable with consider the other variable as a constant.

velocity force velocity force

At first, solve this case and find i. If i does not satisfy wi = 0 then fix i to a constant and solve wi

slide-12
SLIDE 12

asel aselab 東工大長谷川(晶)研 asel aselab 東工大長谷川(晶)研

12

Summary

 Velocity based LCP is widely used.

 Formulate constraints into velocity based LCP and find

constraint force. Then do the stepping of the simulation

 Transform equation of motion of solids with Jacobian J

→ Equation of motion by  and .

 Formulate constraints by equations of  and and substitute it into

equation of motion. → The equations come to LCP

 Solve LCP and find  update velocity and position.

 Constraints

 Joints are lines, contacts are polylines.  It looks there are two variables.

But one of the variables comes to constant.

slide-13
SLIDE 13

asel aselab 東工大長谷川(晶)研

13

Computation

Simultaneous equations solution

Approximate solution for LCP

Error-correction method

slide-14
SLIDE 14

asel aselab 東工大長谷川(晶)研 asel aselab 東工大長谷川(晶)研

14

How to Solve Simultaneous Equation

 Restraint included motion equation

LCP : Linear Complementary Problem

 Solve LCP

 Pivoting method

・・・strict slow speed

 Iterative method

・・・high speed, precision depends on iteration number of times

 Matrix-splitting method

 Jacobi method  Gauss–Seidel method, SOR method

 Newton's method

two variable in one equation

+complementary condition of i and i (one is a variable and the other is a constant )

slide-15
SLIDE 15

asel aselab 東工大長谷川(晶)研 asel aselab 東工大長谷川(晶)研

 Matrix-splitting method

 A method to solve large simultaneous equations

approximately with small computation amount.

 Choose D as a simple matrix such as diagonal matrix  Jacobi method choose D as diagonal entries of A and choose F as the rest.

Gauss-Seidel method is improved version of Jacobi method.

15

Gauss‒Seidel method / SOR method

If recurrence relation is converged, So This recurrence relation converge if A is positive symmetry matrix. Long narrow objects or objects with small inertia converge slow.

slide-16
SLIDE 16

asel aselab 東工大長谷川(晶)研 asel aselab 東工大長谷川(晶)研

16

Gauss‒Seidel method / SOR method

 Gauss–Seidel method  SOR method

 Just accelerate Gauss–Seidel method slightly  Converge quickly

Jacobi method:update at once Gauss–Seidel method :update one row at one time

renewed under renewing not-renewed 1.6times acceleration Gauss–Seidel method

slide-17
SLIDE 17

asel aselab 東工大長谷川(晶)研 asel aselab 東工大長谷川(晶)研

17

LCP and Gauss‒Seidel method

 Gauss–Seidel method renew one row at one time  Can Calculate Contact force perfectly

renewed under renewing not-renewed

 Do not invade each other= is not zero when ω is zero or  is zero

when ω is not zero:

 Static friction or kinetic friction:

if 1 is renewed to a negative number, then let 1 Use renewed 1 to check “1 21”,if protrude, clip with 11

slide-18
SLIDE 18

asel aselab 東工大長谷川(晶)研 asel aselab 東工大長谷川(晶)研

18

Simulation examples

slide-19
SLIDE 19

Continuum simulation

slide-20
SLIDE 20

asel aselab 東工大長谷川(晶)研 asel aselab 東工大長谷川(晶)研

Continuum simulation

 Mass point  Continuum

Simulation is needed not only in time but also in space dimension.

 wave  solid  fluid

2 2 2 2 2

) , ( ) , ( t t x h c x t x h      dt t dv m t f ) ( ) (  dt t di L t V ) ( ) ( 

 Coil voltage                 z y x

t v t V x t

Discretize Hooke‘s law and equation of motion

) , , , , , ( z y x l k j i E

kl ijkl ij

    Ku f  u B Ku u M      

slide-21
SLIDE 21

asel aselab 東工大長谷川(晶)研 asel aselab 東工大長谷川(晶)研

Continuum simulation

 Continuum simulation

 continuous →deal with limited representative points not infinity  many methods for taking representative points

 Grid points in Euler coordinate system are

representative points

 Common for fluid and wave surface simulation  Grid do not move  Mass come from surroundings and go out

 Grid points in Lagrange coordinate system

are representative points

 Finite element method  Grids move with mass  Grids collapse or turn over under large deformation

 Particle method: representative points are particles

 Express mass with freely moving particles  Large deformation is ok because of no assumption at beginnings  Collision detection is important

slide-22
SLIDE 22

asel aselab 東工大長谷川(晶)研 asel aselab 東工大長谷川(晶)研

Finite Element Method

Soft objects(meat, jelly, human body)

slide-23
SLIDE 23

asel aselab 東工大長谷川(晶)研 asel aselab 東工大長谷川(晶)研

Soft objects

cloth

Mass point+ Spring-damper model Omit parts of stress

slide-24
SLIDE 24

asel aselab 東工大長谷川(晶)研 asel aselab 東工大長谷川(晶)研

Fluid

Liquid Gas

slide-25
SLIDE 25

asel aselab 東工大長谷川(晶)研 asel aselab 東工大長谷川(晶)研

Model what?

 Wave Particles

slide-26
SLIDE 26

asel aselab 東工大長谷川(晶)研 asel aselab 東工大長谷川(晶)研

Model what?

 Vortex field of fluid

slide-27
SLIDE 27

asel aselab 東工大長谷川(晶)研 asel aselab 東工大長谷川(晶)研

27

Speed and stability

 Rigid body stability is more important than speed

 The number of rigid bodies is

almost enough

 Any simulation oscillates  Guarantee control stability

Havok FX example PD control oscillation example Wrotek et al. 2006

slide-28
SLIDE 28

asel aselab 東工大長谷川(晶)研 asel aselab 東工大長谷川(晶)研

28

Speed and stability

 The speed of fluid is not fast enough

2D wave front → sufficient real-time

 3D mesh

→ more difficult

 3D particles

→ can not deal with many

 Combination is needed possibly

A Fluid Resistance Map Method for Real-time Haptic Interaction with Fluids [Y. Dobashi et al. 2006]

Efficient Simulation of Large Bodies of Water by Coupling Two- and Three-Dimensional Techniques [G. Irving et al. 2006]

R Force feedback 圧力場・流速 (FRM :Fluid Resistance Map) 3D-fluid simulation Water speed Real-time Prior calculation Paddle speed Real-time wave simulation

slide-29
SLIDE 29

asel aselab 東工大長谷川(晶)研 asel aselab 東工大長谷川(晶)研

High speed

 Soft objects which can be simulated are numerous

 Record and reproduce the deformation caused by impulse

force

 Modal analysis based object deformation

slide-30
SLIDE 30

asel aselab 東工大長谷川(晶)研 asel aselab 東工大長谷川(晶)研

30

Physics simulation applications

 Generate real motion

 Game physics  Character motion  Body simulation

 Connect real world and virtual world

 Aid recognition of real world  Establish a virtual world which is able to be reproduced in

the real world

slide-31
SLIDE 31

asel aselab 東工大長谷川(晶)研 asel aselab 東工大長谷川(晶)研

31

Character motion

 Oshita 2001  Liu et al.2005

Optimize the overall trajectory ○ Advanced optimization △ Real-time generation is difficult

 Zordan et al. 2005,

Zordan and Hodgins 2002, Natural Motion Endorphin

controller+simulation. PD control the joint angles ○ Real-time generation △ controller generation

acceleration, not torque

Decide acceleration with PD control ← torque/ZMP limitation ○ PD adjustment is easy. △motion based on external force

slide-32
SLIDE 32

asel aselab 東工大長谷川(晶)研 asel aselab 東工大長谷川(晶)研

32

Character motion

 Transform motion-capture data

 PD control marker position of body

model to captured-data position

 Record joint angles

 Joint torque and floor

reaction force calculation

 PD control joints and reproduce

motions

 Calculate active force came from

joints and floor

slide-33
SLIDE 33

asel aselab 東工大長谷川(晶)研 asel aselab 東工大長谷川(晶)研

33

Character motion

 Hasegawa et.al 2005

PD control the positions of joints and fingertips

The World Force feedback Position

  • f hands

Physics simulator

Virtual human’s mind action rule Motion Controller

Reaching motion Default posture

Simulator for prediction State transition Wait Guard Attack Force interface