73
New simulation algorithm New simulation algorithm and architecture for Game and architecture for Game Physics Physics Michael Lin Michael Lin President & CEO President & CEO Reality Matrix Inc. Reality Matrix Inc. [email protected]

New simulation algorithm and architecture for Game Physics

Embed Size (px)

DESCRIPTION

New simulation algorithm and architecture for Game Physics. Michael Lin President & CEO Reality Matrix Inc. [email protected]. What we will be going through?. Algorithm Combine the rigid-body and deformable body dynamics all together. Parallel able and distributable algorithm - PowerPoint PPT Presentation

Citation preview

Page 1: New simulation algorithm and architecture for Game Physics

New simulation algorithm New simulation algorithm and architecture for Game and architecture for Game PhysicsPhysics

Michael LinMichael Lin

President & CEOPresident & CEOReality Matrix Inc.Reality Matrix Inc.

[email protected]

Page 2: New simulation algorithm and architecture for Game Physics

What we will be going What we will be going through?through?• AlgorithmAlgorithm

– Combine the rigid-body and deformable Combine the rigid-body and deformable body dynamics all together. body dynamics all together.

– Parallel able and distributable algorithmParallel able and distributable algorithm– Industry level computational continuum Industry level computational continuum

algorithmalgorithm– Compare to FEM, traditional explicit FEMCompare to FEM, traditional explicit FEM– Simple, Fast, and AccuracySimple, Fast, and Accuracy

• ArchitectureArchitecture– Vector form of physics architecture, from Vector form of physics architecture, from

concept to modelingconcept to modeling– Extensible architectureExtensible architecture

• How we can do that?How we can do that?– Using the new algorithm from new concept!Using the new algorithm from new concept!

Page 3: New simulation algorithm and architecture for Game Physics

Targets on this Targets on this presentationpresentation• Rigid body V.S. Deformable bodyRigid body V.S. Deformable body• Major applications for Game or 3D VRMajor applications for Game or 3D VR

– Cloth Simulation, Deformable Body Simulation…Cloth Simulation, Deformable Body Simulation…etcetc

– Behavior of Collided Bodies, Impacted EffectsBehavior of Collided Bodies, Impacted Effects

• Major points of considerationsMajor points of considerations– Material properties introduce the difference of Material properties introduce the difference of

deformationdeformation– Object colliding behavior influenced by impact Object colliding behavior influenced by impact

factors, e.g. high-speed or the shape of factors, e.g. high-speed or the shape of penetrationpenetration

• No real rigid body in the world!No real rigid body in the world!– It’s only the thing that has high stiffness It’s only the thing that has high stiffness

material properties!material properties!

Page 4: New simulation algorithm and architecture for Game Physics

Algorithm and Algorithm and ArchitectureArchitecture• Concept -> Mathematical Modeling -> Algorithm -> Concept -> Mathematical Modeling -> Algorithm ->

Programming architectureProgramming architecture

• ConceptConcept– Newtonian, Objects forms from particlesNewtonian, Objects forms from particles– Deformation caused by rigid body motionDeformation caused by rigid body motion

• Mathematical ModelingMathematical Modeling– Only consider the numerical modeling, no exact solution Only consider the numerical modeling, no exact solution

included!included!

• Algorithm Algorithm – Explicit integration causes the simple computational Explicit integration causes the simple computational

architecturearchitecture

• Programming ArchitectureProgramming Architecture– Based on simple architecture to the parallable and Based on simple architecture to the parallable and

extensible programming architectureextensible programming architecture

Page 5: New simulation algorithm and architecture for Game Physics

Review on traditional Review on traditional methodsmethods• The particle-spring modelingThe particle-spring modeling

– The simplest, widely used in the game industryThe simplest, widely used in the game industry– The spring or spring-damper modeling that can not fully described The spring or spring-damper modeling that can not fully described

the material internal forces. the material internal forces.

• FEM, The Finite Element MethodFEM, The Finite Element Method– It is based on small deformation assumption and variational It is based on small deformation assumption and variational

method.method.– It costs time to days and large memory requirement by its matrix It costs time to days and large memory requirement by its matrix

solving process. High programming complexities. solving process. High programming complexities. – It may not convergence and cause errors. It may not convergence and cause errors.

• BEM, The Boundary Element MethodBEM, The Boundary Element Method– By using the Green’s function, it’s faster then FEM.By using the Green’s function, it’s faster then FEM.– It’s difficult to prepare the preprocessing data and not easy to It’s difficult to prepare the preprocessing data and not easy to

apply.apply.

• DEM, The Discrete Element MethodDEM, The Discrete Element Method– It change the particle-spring model to use the rigid-body-spring It change the particle-spring model to use the rigid-body-spring

model.model.– It also can not fully described the internal force of material in the It also can not fully described the internal force of material in the

deformation process. deformation process.

Page 6: New simulation algorithm and architecture for Game Physics

Key ConceptsKey Concepts

• No nonlinearity at all, we solve the No nonlinearity at all, we solve the nonlinear of material and nonlinear of nonlinear of material and nonlinear of geometry in a linear way! geometry in a linear way!

• Newtonian, Balancing forces, and Principle Newtonian, Balancing forces, and Principle of Virtual Workof Virtual Work

• How we can convert the deformations to How we can convert the deformations to rigid-body kinematics modeling?rigid-body kinematics modeling?

• Large deformation = Rigid-Body Motion + Large deformation = Rigid-Body Motion + Small DeformationSmall Deformation

• Object comes from particles, and Object comes from particles, and deformation of body comes from particle deformation of body comes from particle movements.movements.

• Internal forces of the body comes from Internal forces of the body comes from small deformation, not related to the rigid small deformation, not related to the rigid motion.motion.

Page 7: New simulation algorithm and architecture for Game Physics

Mathematics ModelingMathematics Modeling

• Explicit time integration causes the simple, Explicit time integration causes the simple, time stepping and real-time architecture.time stepping and real-time architecture.

• By using balancing (Virtual works, variation) By using balancing (Virtual works, variation) method, we can solve the distribution of method, we can solve the distribution of internal forces.internal forces.

• Simple equilibrium math, causes the Simple equilibrium math, causes the fundamental of soluble numerical model.fundamental of soluble numerical model.

• We can solve the small deformation of object We can solve the small deformation of object by the rigid motions.by the rigid motions.

Page 8: New simulation algorithm and architecture for Game Physics

AlgorithmAlgorithm

• Causing the simplicity of mathematical modeling, Causing the simplicity of mathematical modeling, we can describe versatile of systems, including we can describe versatile of systems, including rigid-bodies, deformable bodies; there're solid and rigid-bodies, deformable bodies; there're solid and fluid simulation.fluid simulation.

• Causing the simplicity of mathematical modeling, Causing the simplicity of mathematical modeling, we can integrate it into other algorithms. we can integrate it into other algorithms.

• The new algorithm is not including traditional The new algorithm is not including traditional abilities, also support the advanced simulation abilities, also support the advanced simulation ability.ability.

• Parallel algorithm based on the simplicity. Parallel algorithm based on the simplicity.

• The algorithm combines the different stages of The algorithm combines the different stages of rigid-body motion, deformation process and rigid-body motion, deformation process and fracture simulation.fracture simulation.

Page 9: New simulation algorithm and architecture for Game Physics

Our knowledge baseOur knowledge base

• Rigid-Body Kinematics and DynamicsRigid-Body Kinematics and Dynamics– To compute the particle movementTo compute the particle movement

• The Finite Element MethodThe Finite Element Method– To compute the piece of body’s internal forces To compute the piece of body’s internal forces

(cohesion forces)(cohesion forces)

• Numerical Integration MethodNumerical Integration Method– To compute the stepping of displacement, to form the To compute the stepping of displacement, to form the

trend of body movements.trend of body movements.– We can use implicit or explicit integration method. But We can use implicit or explicit integration method. But

the explicit method causes the simple programming the explicit method causes the simple programming architecture.architecture.

– Explicit algorithm causes the vector form of Explicit algorithm causes the vector form of programming architecture.programming architecture.

Page 10: New simulation algorithm and architecture for Game Physics

Our key technology – Our key technology – Zigma Zigma • Modeling of algorithm and mechanical math Modeling of algorithm and mechanical math

modeling.modeling.

• The estimate method of the rigid-body The estimate method of the rigid-body movement.movement.

• Estimate the internal forces in the body more Estimate the internal forces in the body more accuracy. accuracy.

• We use the incorrect explicit integration method We use the incorrect explicit integration method to become the self-equilibrium system.to become the self-equilibrium system.

• The vector architecture forms the foundation of The vector architecture forms the foundation of parallelism. parallelism.

Page 11: New simulation algorithm and architecture for Game Physics

A Review on Game Physics A Review on Game Physics ApproachesApproaches

• A rigid body type descriptionA rigid body type description– Matrix form, describe the Matrix form, describe the

whole objectwhole object– Using 3x4 float pointsUsing 3x4 float points

• A mesh type descriptionA mesh type description– Vertex type description, for Vertex type description, for

each vertexeach vertex– For deformable body For deformable body

Page 12: New simulation algorithm and architecture for Game Physics

Rigid BodyRigid Body

• A rigid body – by NewtonA rigid body – by Newton• ““A continuum can be defined A continuum can be defined

by a group of particles, they by a group of particles, they connected to each other.”connected to each other.”

• the rigid-body type the rigid-body type description, cannot to describe description, cannot to describe the deformable body the deformable body movement. movement.

Page 13: New simulation algorithm and architecture for Game Physics

Deformable bodyDeformable body

• why do we need a “deformable body”?why do we need a “deformable body”?• In the latest game, the existence of In the latest game, the existence of

deformable body is everywhere. Just like deformable body is everywhere. Just like the real world we lived, that’s only the the real world we lived, that’s only the “deformable” body. The rigid-body “deformable” body. The rigid-body actually does not really exist in the world. actually does not really exist in the world.

• All about the cloth system, wave and All about the cloth system, wave and water effects, they’re everywhere. Even water effects, they’re everywhere. Even we can use the vertex shader technology, we can use the vertex shader technology, it is an operation about the mesh level or it is an operation about the mesh level or using the particle method. That’s using the particle method. That’s different from rigid body descriptions. different from rigid body descriptions.

Page 14: New simulation algorithm and architecture for Game Physics

The finite element The finite element methodmethod• In fact, in the engineering field, let In fact, in the engineering field, let

go back 1970, people develop the go back 1970, people develop the finite element method to solve the finite element method to solve the deformable body simulations, in deformable body simulations, in actually words we say, structure actually words we say, structure analysis.analysis.

• From now, we have saw many faces From now, we have saw many faces and keywords, continuity, non-and keywords, continuity, non-continuity, rigid-body, deformable continuity, rigid-body, deformable body, they seems troublesome. body, they seems troublesome. Actually, we will put all together in Actually, we will put all together in our algorithm in below.our algorithm in below.

Page 15: New simulation algorithm and architecture for Game Physics

What’s the difficulty about the What’s the difficulty about the FEM in game industry?FEM in game industry?

• A problem about the consuming of A problem about the consuming of the computational powerthe computational power

• A problem about the memory A problem about the memory consumingconsuming

• Finite element method is based on Finite element method is based on small deformation assumption.small deformation assumption.– In the small deformation assumptions, In the small deformation assumptions,

the finite element method has its the finite element method has its difficulties on analysis the large difficulties on analysis the large deformation about bodies, including deformation about bodies, including cloth or fracture phenomenon. cloth or fracture phenomenon.

Page 16: New simulation algorithm and architecture for Game Physics

DeformationDeformation

• Deformation, in mechanics analysis, we Deformation, in mechanics analysis, we usually separate it into large deformation usually separate it into large deformation and small deformation analysis. and small deformation analysis.

• In the small deformation assumptions, the In the small deformation assumptions, the finite element method has its difficulties on finite element method has its difficulties on analysis the large deformation about analysis the large deformation about bodies, including cloth or fracture bodies, including cloth or fracture phenomenon. phenomenon.

• Because the clothing problem, itself a large Because the clothing problem, itself a large deformation process. In mechanics, it’s a deformation process. In mechanics, it’s a nonlinear problem. The nonlinearity will be nonlinear problem. The nonlinearity will be included geometry and material included geometry and material nonlinearity.nonlinearity.

Page 17: New simulation algorithm and architecture for Game Physics

Material ModelingMaterial Modeling

• Hook’s law:Hook’s law:– (dF) = (k)(dX)(dF) = (k)(dX)– it is the basic concept of the constitutive it is the basic concept of the constitutive

law in material mechanics. That law in material mechanics. That describes the stress-strain relationships. describes the stress-strain relationships.

• The material will cause the The material will cause the permanent deformation and fluid permanent deformation and fluid type; it will need the complex type; it will need the complex mathematics and physics modeling. mathematics and physics modeling. They are usual described of partial They are usual described of partial differential equations. differential equations.

Page 18: New simulation algorithm and architecture for Game Physics

An introduction to a game An introduction to a game physics algorithmphysics algorithm

• The modeling is similar to the The modeling is similar to the classical approaches used in classical approaches used in structures and mechanical structures and mechanical vibrations. The physical concept vibrations. The physical concept is easy to incorporate with other is easy to incorporate with other physical phenomena. physical phenomena.

• The computer codes are small The computer codes are small and simple. and simple.

• The algorithm is straightforward. The algorithm is straightforward. Special numerical techniques are Special numerical techniques are not required.not required.

Page 19: New simulation algorithm and architecture for Game Physics

Why we don’t use Why we don’t use traditional FEM?traditional FEM?

• The computing power of finite element is too huge, The computing power of finite element is too huge, it’s unable to use in the real time gaming purpose. it’s unable to use in the real time gaming purpose.

• The finite element is using the matrix solving The finite element is using the matrix solving techniques to expand its domain; it can not be techniques to expand its domain; it can not be applied on limited memory storage console platforms. applied on limited memory storage console platforms.

• The basic is that the finite element is based on The basic is that the finite element is based on SMALL-DEFORMATION. So it naturally can not be SMALL-DEFORMATION. So it naturally can not be applied to large deformation calculations. We’ll applied to large deformation calculations. We’ll describe that below. describe that below.

• The finite element method is can not to handle the The finite element method is can not to handle the fracture problem in nature, because it needs the fracture problem in nature, because it needs the continuity about an element. continuity about an element.

• Of course, most of the finite element codes have been Of course, most of the finite element codes have been adopted into parallel forms on super computers. But adopted into parallel forms on super computers. But naturally it is a matrix form solving problem, if we can naturally it is a matrix form solving problem, if we can use the vector type algorithm, then it will take the use the vector type algorithm, then it will take the most advantage in modern vector accelerated chips. most advantage in modern vector accelerated chips.

Page 20: New simulation algorithm and architecture for Game Physics

Explicit finite element Explicit finite element methodmethod• The explicit finite element method its The explicit finite element method its

since 1970, from the national since 1970, from the national laboratory in Livermore and Argon. It laboratory in Livermore and Argon. It is widely used on nuclear simulation is widely used on nuclear simulation and reactor safety simulations. It is and reactor safety simulations. It is most widely used on explosion and most widely used on explosion and penetration topics. It is so-called penetration topics. It is so-called “transient finite element analysis” or “transient finite element analysis” or “explicit finite element analysis”. “explicit finite element analysis”.

• We adopted it into the game industry We adopted it into the game industry for several years’ research. for several years’ research.

• Something was wrong in traditional Something was wrong in traditional explicit finite element method, we will explicit finite element method, we will prove that in below.prove that in below.

Page 21: New simulation algorithm and architecture for Game Physics

Our approach – Intrinsic Our approach – Intrinsic Vector form FEMVector form FEM• Compute the motion and deformation due to Compute the motion and deformation due to

the application of non-equilibrium external the application of non-equilibrium external forces. Mathematically, it can solve forces. Mathematically, it can solve displacement, force or mixed boundary value displacement, force or mixed boundary value problems. The essential boundary conditions problems. The essential boundary conditions do not have to be prescribed. do not have to be prescribed.

• Handle multiple continuous bodies and their Handle multiple continuous bodies and their interactions. interactions.

• Handle body fragmentation or merger based Handle body fragmentation or merger based on prescribed failure criteria. on prescribed failure criteria.

• Compute crack initiation, and crack Compute crack initiation, and crack propagation in a continuous body.propagation in a continuous body.

• Compute very large deformation.Compute very large deformation.• Handle complicated, inelastic, or Handle complicated, inelastic, or

discontinuous material properties.discontinuous material properties.• Compute transient response. With a slowly Compute transient response. With a slowly

applied force or a dynamic relaxation applied force or a dynamic relaxation process, obtain quasi-static responseprocess, obtain quasi-static response. .

Page 22: New simulation algorithm and architecture for Game Physics

Matrix form and Vector Matrix form and Vector formform• Matrix form is highly coupled. That means it Matrix form is highly coupled. That means it

is a sequence about the row and column is a sequence about the row and column operations. Instead of the matrix operations. Instead of the matrix architecture, purely vector form is very architecture, purely vector form is very easy to use the hardware and software easy to use the hardware and software acceleration features to improve the acceleration features to improve the solving speed.solving speed.

• The matrix method widely knows is related The matrix method widely knows is related to the level of square. In the common to the level of square. In the common language in physics, that is dependent on language in physics, that is dependent on the degree of freedom. the degree of freedom.

• The vector form solving architecture, it just The vector form solving architecture, it just grows in linear with the degree of freedom. grows in linear with the degree of freedom. This is benefit for memory consuming issue.This is benefit for memory consuming issue.

Page 23: New simulation algorithm and architecture for Game Physics

Zigma TechnologyZigma Technology

• The Zigma technology, or by its The Zigma technology, or by its neutrality, we call it “vector form neutrality, we call it “vector form intrinsic finite element analysis. intrinsic finite element analysis.

• Our demandsOur demands– First, it deals with a lot of continuous First, it deals with a lot of continuous

body combine with rigid body body combine with rigid body movements and they can interact with movements and they can interact with each other. each other.

– Second, it deals with the non-linearity Second, it deals with the non-linearity and discontinuous material effectively. and discontinuous material effectively.

– Third, it deals with the geometry Third, it deals with the geometry deformation about the continuum.deformation about the continuum.

Page 24: New simulation algorithm and architecture for Game Physics

TargetTarget• This approach can be stable to handling This approach can be stable to handling

the basic problem from one continuum the basic problem from one continuum into multiple continua. into multiple continua.

– Handling the large rigid-body motion and Handling the large rigid-body motion and deformation at the same timedeformation at the same time

– Handling the unbalance forces work Handling the unbalance forces work corresponding to the rigid body motioncorresponding to the rigid body motion

– Handling the complex material properties Handling the complex material properties modelingmodeling

– Handling single continua into multiple bodiesHandling single continua into multiple bodies– Handling the single continuum interact to other Handling the single continuum interact to other

bodiesbodies– Handling the unbalance forcesHandling the unbalance forces– Calculating the deformation precisely, that means Calculating the deformation precisely, that means

handle the deformation in large rotation handle the deformation in large rotation – Avoiding the iterationsAvoiding the iterations

Page 25: New simulation algorithm and architecture for Game Physics

Nonlinear continuum Nonlinear continuum mechanicsmechanics• The real object has obviously The real object has obviously

geometric deformation while destroy geometric deformation while destroy and cracking. and cracking.

• Nonlinear continuum mechanics once Nonlinear continuum mechanics once have deeper discussion to the large have deeper discussion to the large deformation theory such as Malvern. deformation theory such as Malvern.

• To apply the nonlinear continuum To apply the nonlinear continuum mechanics to the large deformation mechanics to the large deformation process, it brings a lot of restriction process, it brings a lot of restriction from the initial shape definition. from the initial shape definition.

Page 26: New simulation algorithm and architecture for Game Physics

Current form and Init Current form and Init formform• Because in practices problems, the real Because in practices problems, the real

time shape and the initial shape usually time shape and the initial shape usually has great difference. At the same time, has great difference. At the same time, some mathematics requirements may some mathematics requirements may not be satisfied, something like the not be satisfied, something like the positive defines about the matrix.positive defines about the matrix.

• We noticed that in some literatures We noticed that in some literatures about the large deformation analysis, about the large deformation analysis, like the elastica problems and rubber like the elastica problems and rubber elasticity problems, they most add the elasticity problems, they most add the moderately large deformation moderately large deformation assumptions. assumptions.

Page 27: New simulation algorithm and architecture for Game Physics

Large displacement & Large displacement & deformationdeformation• In finite element analysis, large In finite element analysis, large

displacement and large deformation displacement and large deformation is a subject paid attention. is a subject paid attention.

• When the practical problems When the practical problems involving the complicated object involving the complicated object geometry and changes about the geometry and changes about the material properties, the algorithms material properties, the algorithms mostly use the iterative method to mostly use the iterative method to solve such problems. solve such problems.

Page 28: New simulation algorithm and architecture for Game Physics

Our idea Our idea

• To set up a practically algorithm that can To set up a practically algorithm that can predict the object is destroyed and predict the object is destroyed and cracking, it should not be limited with the cracking, it should not be limited with the amount of the deformation and amount of the deformation and displacement. displacement.

• Meanwhile, it should be stable and Meanwhile, it should be stable and precisely to obtain the results. On such precisely to obtain the results. On such basis, we adopted some explicit basis, we adopted some explicit algorithms to a new simulation algorithm algorithms to a new simulation algorithm and concepts. and concepts.

• Use the current form as the basic frame Use the current form as the basic frame to define the incremental stress and to define the incremental stress and incremental strain. We also use the incremental strain. We also use the incremental constitutive law. incremental constitutive law.

Page 29: New simulation algorithm and architecture for Game Physics

accuracyaccuracy

• For an elastic body is passing For an elastic body is passing through the moderate or similar through the moderate or similar to the initial form deformation to the initial form deformation process, it might not be so process, it might not be so complete and accuracy as the complete and accuracy as the total analysis. total analysis.

• Because the error occurs in each Because the error occurs in each incremental calculation, and its incremental calculation, and its accumulated. accumulated.

Page 30: New simulation algorithm and architecture for Game Physics

Our approachOur approach

• the vector form of equation of motion the vector form of equation of motion • explicit time integration explicit time integration • the co-rotational coordinate method to the co-rotational coordinate method to

separate the rigid body motion and separate the rigid body motion and deformation deformation

• the moving convected coordinate the moving convected coordinate method to handling the large method to handling the large deformation and large displacement deformation and large displacement parts. parts.

• We don’t have the variational form in We don’t have the variational form in our approach and also don’t use the our approach and also don’t use the partial differential equation by the partial differential equation by the expression about the stress. expression about the stress.

Page 31: New simulation algorithm and architecture for Game Physics

Our approachOur approach

• It deal with a lot of continua and It deal with a lot of continua and combine with rigid body and combine with rigid body and they interact with each other.they interact with each other.

• It deal with the nonlinearity and It deal with the nonlinearity and discontinuous material discontinuous material effectively.effectively.

• It deal with the geometry It deal with the geometry deformation of the continuum.deformation of the continuum.

Page 32: New simulation algorithm and architecture for Game Physics

Displacement and Displacement and DeformationDeformation

• Since the continuum is Since the continuum is deformable, the procedure deformable, the procedure needs to handle the rigid needs to handle the rigid body movement and body movement and deformation at the same time. deformation at the same time.

• The rigid body displacement The rigid body displacement can be far greater than can be far greater than deformation. deformation.

Page 33: New simulation algorithm and architecture for Game Physics

The moving convected The moving convected coordinate architecture coordinate architecture

• definition about the strain, definition about the strain, stress and virtual works stress and virtual works

• It derives an incremental It derives an incremental process to calculate the process to calculate the large displace and large large displace and large deformation movement. deformation movement.

Page 34: New simulation algorithm and architecture for Game Physics

Our ideaOur idea

• Adopt the incremental calculation: Adopt the incremental calculation: to setup an explicit deformation to setup an explicit deformation procedure. In this procedure, procedure. In this procedure, avoid to use the iterations.avoid to use the iterations.

• Use the current form as the basic Use the current form as the basic frame to define the incremental frame to define the incremental stress and incremental strain. We stress and incremental strain. We will also use the incremental will also use the incremental constitutive law.constitutive law.

Page 35: New simulation algorithm and architecture for Game Physics

Co-rotational coordinate Co-rotational coordinate approachapproach

• We assumed that there’s We assumed that there’s fixed global frame and a co-fixed global frame and a co-rotational frame fowling the rotational frame fowling the element rotated and element rotated and translated. translated.

• We can describe any We can describe any displacement of a point within displacement of a point within the element as two parts: the element as two parts:

Page 36: New simulation algorithm and architecture for Game Physics

Large displacementLarge displacement

• However, we can prove that, when the large However, we can prove that, when the large displacement causes the object with large displacement causes the object with large rotations, the traditional co-rotation method rotations, the traditional co-rotation method is lake of the accuracy. So if it does not add is lake of the accuracy. So if it does not add the improvement, it is only suitable for the improvement, it is only suitable for limited large displacement motions. limited large displacement motions.

• Second, the co-rotational method seems Second, the co-rotational method seems unsuitable for two or three dimensional unsuitable for two or three dimensional problems. problems.

• This is because the large displacement and This is because the large displacement and large deformation usually happens large deformation usually happens simultaneously in a continuum. The simplify simultaneously in a continuum. The simplify modeling is not suitable for small modeling is not suitable for small deformation adding on large rigid body deformation adding on large rigid body movements.movements.

Page 37: New simulation algorithm and architecture for Game Physics

The basic assumptions and The basic assumptions and discretizationdiscretization

• We consider a body: It is composed by We consider a body: It is composed by multiple rigid bodies and deformable multiple rigid bodies and deformable continua. continua.

• When the body is applied by external When the body is applied by external forces, each body will change their forces, each body will change their direction and position, and might direction and position, and might change their geometry shape. change their geometry shape.

• Some of them will collide each other or Some of them will collide each other or assemble to a new continuum. For any assemble to a new continuum. For any one of them, it might be separated one of them, it might be separated into more individuals too. into more individuals too.

Page 38: New simulation algorithm and architecture for Game Physics

Equations of motionEquations of motion

• Equations of motionEquations of motion

• is the reaction force vector is the reaction force vector that is the external force. that is the external force.

• is the resistance force vector is the resistance force vector comes from the a continuum comes from the a continuum media around α particle, that media around α particle, that is global internal force vector. is global internal force vector.

Page 39: New simulation algorithm and architecture for Game Physics

• The commonly used method of The commonly used method of discretization is that we divide a discretization is that we divide a continuum in to several proper continuum in to several proper sub-regions that is also sub-regions that is also elements. elements.

• However, the rule of division is However, the rule of division is arbitrary in theoretically. So the arbitrary in theoretically. So the particle and the node should not particle and the node should not be in the same place. be in the same place.

Page 40: New simulation algorithm and architecture for Game Physics

Element analysisElement analysis

• For each element, they don’t have For each element, they don’t have mass property so itself satisfy the mass property so itself satisfy the static equilibrium. static equilibrium.

• are the internal forces acting on are the internal forces acting on elements or nodes that are the elements or nodes that are the element internal nodal forces.element internal nodal forces.

• In traditional finite element In traditional finite element analysis, we can define the nodal analysis, we can define the nodal forces by the virtual work forces by the virtual work principle. That is principle. That is

Page 41: New simulation algorithm and architecture for Game Physics

• The summation about the global nodal The summation about the global nodal internal forces acting on each node is internal forces acting on each node is sum of element nodal internal forces.sum of element nodal internal forces.

• In the same way, we can process the In the same way, we can process the definition about the element external definition about the element external forces in the same way as follows: forces in the same way as follows:

• is the external force vector on alpha is the external force vector on alpha node of k element. node of k element.

Page 42: New simulation algorithm and architecture for Game Physics

FEM Shape functionFEM Shape function

• When we calculate the virtual When we calculate the virtual work δ, we can use the work δ, we can use the traditional finite element traditional finite element method. method.

• The function N satisfy the basic The function N satisfy the basic continuity requirement and on continuity requirement and on the boundary of element. the boundary of element.

Page 43: New simulation algorithm and architecture for Game Physics

the virtual external the virtual external work work • According to d'Alembert theory, According to d'Alembert theory,

we consider the virtual external we consider the virtual external work for each element by the work for each element by the inertia forces, inertia forces,

• is the nodal mass for alpha is the nodal mass for alpha element.element.

Page 44: New simulation algorithm and architecture for Game Physics

Summarize Summarize • On the node, the motion of the particle On the node, the motion of the particle

satisfy:satisfy:• • Within the element, the internal nodal Within the element, the internal nodal

forces satisfy: forces satisfy:

– And the displacement vector satisfy the Cn-And the displacement vector satisfy the Cn-continuity. continuity.

• On the boundary surfaces, force and On the boundary surfaces, force and displacement satisfy the boundary displacement satisfy the boundary conditions. conditions.

• On the contact surfaces, force and On the contact surfaces, force and displacement satisfy the collision displacement satisfy the collision conditions or the continuity condition. conditions or the continuity condition.

Page 45: New simulation algorithm and architecture for Game Physics

Some conclusionsSome conclusions

• This algorithm about the bodies basically This algorithm about the bodies basically simulates a limited number of particles. simulates a limited number of particles. This is different from traditional finite This is different from traditional finite element method that needs the system element method that needs the system equilibrium. equilibrium.

• The absolute displacement of the objects The absolute displacement of the objects nodes comes from the equations of motion. nodes comes from the equations of motion. The displacement on each object’s The displacement on each object’s displacement is the same so the continuity displacement is the same so the continuity condition is satisfied between the elements. condition is satisfied between the elements.

• This approach we purposed introduces the This approach we purposed introduces the co-rotational method to separate the rigid co-rotational method to separate the rigid body displacement by deformation body displacement by deformation displacement. displacement.

Page 46: New simulation algorithm and architecture for Game Physics

Time integration – Explicit Time integration – Explicit or Implicit methodsor Implicit methods

• We use explicit time integration, that is We use explicit time integration, that is convenient for handling the non-elastic convenient for handling the non-elastic and non-continues material properties.and non-continues material properties.

• It is avoid the iterations in solving the It is avoid the iterations in solving the equations of motion. equations of motion.

• However, the basic theory on finite However, the basic theory on finite element is not limit to explicit time element is not limit to explicit time integration methods. Other time integration methods. Other time integration methods, like Newmark-integration methods, like Newmark-beta implicit time integration method, beta implicit time integration method, is suitable to solve the equations of is suitable to solve the equations of motion. motion.

Page 47: New simulation algorithm and architecture for Game Physics

Vector form FEMVector form FEM

• According the Newton’s basic According the Newton’s basic assumption, we define a continuum as a assumption, we define a continuum as a group of particle mass assemblage. So group of particle mass assemblage. So the finite element calculation is to the finite element calculation is to formulate a set of vector equation.formulate a set of vector equation.– Adopting the explicit time integration method Adopting the explicit time integration method

to solve the particle motion.to solve the particle motion.– Adopting the co-rotational frame architecture Adopting the co-rotational frame architecture

to resolute the rigid body displacement and to resolute the rigid body displacement and deformable displacement.deformable displacement.

– We purpose a moving convected material We purpose a moving convected material reference frame approach to formulate the reference frame approach to formulate the large deformation and large displacement large deformation and large displacement approach. approach.

Page 48: New simulation algorithm and architecture for Game Physics

Traditional Explicit Finite Traditional Explicit Finite ElementElement• X is the global X is the global

position vector on position vector on time 0 of a particle time 0 of a particle within the within the continuum continuum

• when time = t, it’s when time = t, it’s global position is x-global position is x-head head

• the deformation the deformation gradient is Fd gradient is Fd

Page 49: New simulation algorithm and architecture for Game Physics

Traditional Co-rotational Traditional Co-rotational coordinatecoordinate• If we set a co-rotation coordinate If we set a co-rotation coordinate

fixed on a particle and assume that fixed on a particle and assume that the Fd has no rotational deformation, the Fd has no rotational deformation, then dX and dX-head can be treated then dX and dX-head can be treated as the relative position by the co-as the relative position by the co-rotational coordinate.rotational coordinate.

• Let the particle doing the rigid body Let the particle doing the rigid body rotation R, then rotation R, then

• If thenIf then

Page 50: New simulation algorithm and architecture for Game Physics

Lagrangian strain & Lagrangian strain & Cauchy Stress Cauchy Stress

• Lagrangian strainLagrangian strain

• The Cauchy stress from X to The Cauchy stress from X to x x

Page 51: New simulation algorithm and architecture for Game Physics

• If we define the Cauchy stress is sigma-If we define the Cauchy stress is sigma-head from X to x-head, then sigma-head head from X to x-head, then sigma-head is also the Cauchy stress within the co-is also the Cauchy stress within the co-rotational coordinate. rotational coordinate.

• We can compare the two equations We can compare the two equations listed above,listed above,

• So the Piola stress function S and the So the Piola stress function S and the strain function E, does not change with strain function E, does not change with the rotation.the rotation.

Page 52: New simulation algorithm and architecture for Game Physics

• To simplify the fem analysis and To simplify the fem analysis and make the shape function to make the shape function to satisfy the boundary condition of satisfy the boundary condition of continuity, we set another co-continuity, we set another co-rotation frame. rotation frame.

• So we change the position vector So we change the position vector X , x and x prime to transform as X , x and x prime to transform as X-head, Q is the transformation X-head, Q is the transformation matrixmatrix

Page 53: New simulation algorithm and architecture for Game Physics

• Although the constitutive equation Although the constitutive equation has to satisfy the principle of has to satisfy the principle of objectivity, or the principle of objectivity, or the principle of material frame indifference, material frame indifference, [Malvern]. [Malvern].

• According to this principle , the form According to this principle , the form of S has to satisfy of S has to satisfy

• So S and S-head comes from the So S and S-head comes from the same type. This conclusion is the same type. This conclusion is the same with traditional co-rotational same with traditional co-rotational coordinate. coordinate.

Page 54: New simulation algorithm and architecture for Game Physics

Some conclusionSome conclusion

• In our approach, the co-rotational In our approach, the co-rotational coordinate definition seems different form coordinate definition seems different form traditional. We not limited to small traditional. We not limited to small deformation and principle of superposition. deformation and principle of superposition.

• The transformation matrix and rotational The transformation matrix and rotational matrix can be different, so the co-matrix can be different, so the co-rotational coordinate can be set in another rotational coordinate can be set in another way. way.

• But the definition of strain, E-prime, or the But the definition of strain, E-prime, or the constitutive equation S, and the form of constitutive equation S, and the form of calculation about the virtual internal work calculation about the virtual internal work is the same with traditional co-rotational is the same with traditional co-rotational method.method.

Page 55: New simulation algorithm and architecture for Game Physics

• the Piola stress seems the same in the Piola stress seems the same in our approach by global coordinate our approach by global coordinate and co-rotational coordinate, the and co-rotational coordinate, the Cauchy stress is not the same.Cauchy stress is not the same.

• If the rotational matrix and If the rotational matrix and transformation matrix comes the transformation matrix comes the same, thensame, then

Page 56: New simulation algorithm and architecture for Game Physics

What’s going wrong?What’s going wrong?

• When large deformation come with When large deformation come with large rotation, the deformation and large rotation, the deformation and rigid body motion can not be rigid body motion can not be defined separately. defined separately.

• When particle mass was moving by When particle mass was moving by external force, the transformation external force, the transformation matrix is including deformation matrix is including deformation and rotation: the superposition is and rotation: the superposition is no longer exist!no longer exist!

Page 57: New simulation algorithm and architecture for Game Physics

• we use the vector form finite we use the vector form finite element method to handling element method to handling the large displacement and the large displacement and large deformation. large deformation.

• the Piola stress seems the the Piola stress seems the same in our approach by same in our approach by global coordinate and co-global coordinate and co-rotational coordinate, the rotational coordinate, the Cauchy stress is not the same. Cauchy stress is not the same.

Page 58: New simulation algorithm and architecture for Game Physics

• When the current form of object is When the current form of object is obviously different from the initial obviously different from the initial form, some mathematics condition form, some mathematics condition may not be satisfied. may not be satisfied.

• For example the deformation gradient, For example the deformation gradient, we often assume it as the positive we often assume it as the positive definite, when the large strain comes, definite, when the large strain comes, Jacobian may be positive. Jacobian may be positive.

• So in planning the computing process, So in planning the computing process, it seems to be suitable by using the it seems to be suitable by using the incremental of deformation. incremental of deformation.

Page 59: New simulation algorithm and architecture for Game Physics

Nonlinear Material Nonlinear Material ModelingModeling• To handle the large deformation To handle the large deformation

material properties, in the past we material properties, in the past we usually use the total-stress-strain usually use the total-stress-strain relationship. For example for the relationship. For example for the rubber elasticity proposed: neo-rubber elasticity proposed: neo-Kookea material and Moony-Rivlin Kookea material and Moony-Rivlin material, Green and Adkins, material, Green and Adkins, Murnaghan and so on. Murnaghan and so on.

• We thought that they are because the We thought that they are because the traditional mechanics of large traditional mechanics of large deformation approach to formulate the deformation approach to formulate the simple geometry model, to make a simple geometry model, to make a assumption to be corresponding the assumption to be corresponding the equilibrium equations and analytic equilibrium equations and analytic solutions. solutions.

Page 60: New simulation algorithm and architecture for Game Physics

Some benefitsSome benefits• Fist, if we reduce the increment of force, Fist, if we reduce the increment of force,

the total stress-strain relationship, the total stress-strain relationship, according to the differential and mean-according to the differential and mean-value theory, we can express them using value theory, we can express them using the linear incremental relationship. We the linear incremental relationship. We compare the total stress model and compare the total stress model and plastic flow theory about the elastic-plastic flow theory about the elastic-plastic materials; we might see the plastic materials; we might see the advantage of the incremental model. advantage of the incremental model.

• Second, when an object is going through Second, when an object is going through the large deformation, it can not maintain the large deformation, it can not maintain the homogenous deformation state. That the homogenous deformation state. That means, the history of large deformation is means, the history of large deformation is no longer a proportional loading process. no longer a proportional loading process. It should be use the incremental form of It should be use the incremental form of constitutive equation.So using the constitutive equation.So using the incremental constitutive law is reasonable incremental constitutive law is reasonable and simple. and simple.

Page 61: New simulation algorithm and architecture for Game Physics

Incremental stress and Incremental stress and strainstrain• The incremental stress, incremental The incremental stress, incremental

strain and the virtual work can be strain and the virtual work can be expressed as follows:expressed as follows:

• Where,Where,

Page 62: New simulation algorithm and architecture for Game Physics

Incremental Constitutive Incremental Constitutive LawLaw• If large deformation process can be If large deformation process can be

expressed by incremental stress and expressed by incremental stress and incremental displacement as a basis, incremental displacement as a basis, then the material model can be then the material model can be expressed be incremental method. expressed be incremental method.

• When an object is going through the When an object is going through the large deformation, it can not maintain large deformation, it can not maintain the homogenous deformation state.the homogenous deformation state.

• That means, the history of large That means, the history of large deformation is no longer a deformation is no longer a proportional loading process. It should proportional loading process. It should be use the incremental form of be use the incremental form of constitutive equation. constitutive equation.

Page 63: New simulation algorithm and architecture for Game Physics

Some considerations about Some considerations about the fracture algorithmthe fracture algorithm• If the material model is non continuous, If the material model is non continuous,

something like traditional elastic-plastic something like traditional elastic-plastic material model or viscous elastic material material model or viscous elastic material type, it should be added in the iteration type, it should be added in the iteration process in formulating the equation sets. process in formulating the equation sets.

• After the object is cracked, the geometry After the object is cracked, the geometry form of the body will have great changes. form of the body will have great changes. For a small individual, it will face to large For a small individual, it will face to large displacement and rigid body motion on it. displacement and rigid body motion on it.

• Our approach mainly focus on a new Our approach mainly focus on a new vector form algorithm about continuum vector form algorithm about continuum and naturally support fracture simulation, and naturally support fracture simulation, nonlinear material models, large nonlinear material models, large deformation and the core support the deformation and the core support the parallel and distributed computing from parallel and distributed computing from mathematically to code architecture. mathematically to code architecture.

Page 64: New simulation algorithm and architecture for Game Physics

The real-time The real-time fragmentation methodfragmentation method

• The judgment of nodal The judgment of nodal failure criterion failure criterion

• The failure processThe failure process

• This is a general algorithm This is a general algorithm can be adapted to any kind can be adapted to any kind of mesh types. of mesh types.

Page 65: New simulation algorithm and architecture for Game Physics

• Basically, we just Basically, we just use the maximum use the maximum principle stress principle stress direction to judge direction to judge the direction about the direction about the failure. When the failure. When the internal tensile the internal tensile strength in exceed strength in exceed the material tensile the material tensile strength, of course, strength, of course, that’s why the that’s why the object will be break. object will be break.

C r i t e r i o n o f N o d a l F a i l u r e M o d e s

i Pi X4 3

i Z 4 8 i P

> 0.9 Y a x i s o p e n i n g

X a x i s o p e n i n g

Z a x i s o p e n i n g

i Y4 1 i P

4

1 2

3

8

i P

i Z 4 8

i X4 3

i Y4 1 i u n i t v e c to r

M a x P r i n c ip le S tre ss D i re c ti o n

N o d a l C o o rd in a te D i re c t i o n

Page 66: New simulation algorithm and architecture for Game Physics

• First, we should set up the unit vector for First, we should set up the unit vector for each element and nodes. In co-rotational each element and nodes. In co-rotational coordinate, this unit vector will rotate by coordinate, this unit vector will rotate by time and geometry changes. So it should time and geometry changes. So it should be updated on each time step will be the be updated on each time step will be the correct boundary position of the element.correct boundary position of the element.

• When the system is receiving the permit When the system is receiving the permit about the failure along the element about the failure along the element boundary, we start the failure boundary, we start the failure procedures. In element-based method, procedures. In element-based method, we are happy to use the nodal connect we are happy to use the nodal connect table because it is simple. table because it is simple.

Page 67: New simulation algorithm and architecture for Game Physics

FragmentationFragmentation

i P

( 1 )

( 2 )

( 3 )( 4 )

( 5 ) ( 6 )

( 7 )

( 8 )i P

i P

48,(4)i Y

48,(3)i Y

84,(5)i Y

84,(6)i Y

84,(1)i Y

84,(2)i Y

48,(7)i Y

48,(8)i Y

i Y i P> 0 , Group [1]

< 0 , Group [2]

F ra gm en t S u r fa ce

2

1

3

2

1

3

2

1

32

1 3

4

4

4

4

4 3

1

2

i P

i Yi Yi Yi Y i Y

i Y

i Y

i Y

Fragment Line

Page 68: New simulation algorithm and architecture for Game Physics

Issues about the Issues about the synchronization synchronization • In parallel computing for large In parallel computing for large

computational project, the computational project, the synchronization is a very important synchronization is a very important issue. issue.

• Too much or under considerations will Too much or under considerations will cause the system performance down cause the system performance down or loss control of each CPU. That will or loss control of each CPU. That will cause the whole system crash and give cause the whole system crash and give us the wrong answer.us the wrong answer.

• That’s we should notice about parallel That’s we should notice about parallel and nonparallel part in the algorithm and nonparallel part in the algorithm and codes.and codes.

Page 69: New simulation algorithm and architecture for Game Physics

GeneralizationGeneralization

• Our approach has introduced Our approach has introduced a general description of a general description of particle motion. The particle motion. The handling of finite element handling of finite element rigid body motion with rigid body motion with deformation is different from deformation is different from the classical continuum the classical continuum mechanics. mechanics.

Page 70: New simulation algorithm and architecture for Game Physics

ProgressProgress• We may assume that mass points are inside the We may assume that mass points are inside the

element, and the total number varies according element, and the total number varies according to the stress or deformation intensity. Their to the stress or deformation intensity. Their positions may also be adjusted, and thus give a positions may also be adjusted, and thus give a more accurate stress distribution. more accurate stress distribution.

• To satisfy continuity requirements of a To satisfy continuity requirements of a continuum, we choose to use the standard continuum, we choose to use the standard element shape functions to calculate internal element shape functions to calculate internal forces acting on the mass particle. Our forces acting on the mass particle. Our approach is not limited to that. For specific approach is not limited to that. For specific physical problems, we may choose to use a physical problems, we may choose to use a mixture of different models for the calculation. mixture of different models for the calculation. They include finite difference procedures with They include finite difference procedures with differential equations, formulas deduced from differential equations, formulas deduced from test data and mathematical analyses. test data and mathematical analyses.

• Since our approach assumes that the body is a Since our approach assumes that the body is a collection of particles, different models can be collection of particles, different models can be calculated independently and then assembled calculated independently and then assembled for each particle. for each particle.

Page 71: New simulation algorithm and architecture for Game Physics

OutlookOutlook

• Failure analysis Failure analysis – Program based on our approach can be Program based on our approach can be

developed to provide quantitative developed to provide quantitative predictions of the initiation of failure, predictions of the initiation of failure, subsequent failure sequence and a total subsequent failure sequence and a total collapse or disintegration of the structure. collapse or disintegration of the structure.

• Penetration mechanicsPenetration mechanics– Our approach is able to model moving Our approach is able to model moving

projectiles, multiple continuous media, and projectiles, multiple continuous media, and fragmentation. Thus, it is possible to study fragmentation. Thus, it is possible to study the time history of entire penetration the time history of entire penetration process as a function of projectile geometry, process as a function of projectile geometry, traveling speed, impact angle and material traveling speed, impact angle and material properties. properties.

Page 72: New simulation algorithm and architecture for Game Physics

• Impact and collision Impact and collision – Explicit finite elements have Explicit finite elements have

been effectively implemented been effectively implemented to conduct safety analyses of to conduct safety analyses of reactor structures, to evaluate reactor structures, to evaluate crash-worthiness of trucks and crash-worthiness of trucks and automobiles, and to model automobiles, and to model explosion and demolition. explosion and demolition.

Page 73: New simulation algorithm and architecture for Game Physics

• Thank you ~ Thank you ~

• We’re happy to cooperate with anyone We’re happy to cooperate with anyone who loves game physics and interest who loves game physics and interest about more advanced algorithm.about more advanced algorithm.

• Reality Matrix Inc. Reality Matrix Inc. • Zigma Technology.Zigma Technology.

[email protected]• I am welcome for your email~