19
DYNAMICS DYNAMICS Part I Part I Physics Engine Physics Engine By By Willis (The Magnificent) Willis (The Magnificent) Louie Louie Fei (The Coyote) Liao Fei (The Coyote) Liao

DYNAMICS Part I Physics Engine By Willis (The Magnificent) Louie Fei (The Coyote) Liao

Embed Size (px)

Citation preview

Page 1: DYNAMICS Part I Physics Engine By Willis (The Magnificent) Louie Fei (The Coyote) Liao

DYNAMICSDYNAMICS Part IPart I

Physics EnginePhysics Engine

ByBy

Willis (The Magnificent) LouieWillis (The Magnificent) Louie

Fei (The Coyote) LiaoFei (The Coyote) Liao

Page 2: DYNAMICS Part I Physics Engine By Willis (The Magnificent) Louie Fei (The Coyote) Liao

Flight Simulator RPGFlight Simulator RPG

Page 3: DYNAMICS Part I Physics Engine By Willis (The Magnificent) Louie Fei (The Coyote) Liao

Table of ContentsTable of Contents

1) Introduction physics engine1) Introduction physics engine

What is a “physics engine”?What is a “physics engine”?

2) Advantage of physics engine2) Advantage of physics engine

Why we want a physics engine?Why we want a physics engine?

3)3) Advantages and Disadvantages Advantages and Disadvantages of different physics enginesof different physics engines

4) Our PICK – we like it hot4) Our PICK – we like it hot

Page 4: DYNAMICS Part I Physics Engine By Willis (The Magnificent) Louie Fei (The Coyote) Liao

What is a physics What is a physics engine?engine?

Page 5: DYNAMICS Part I Physics Engine By Willis (The Magnificent) Louie Fei (The Coyote) Liao

What is a PHYSICS ENGINE?What is a PHYSICS ENGINE?

Pre-designed to do physics Pre-designed to do physics calculations.calculations.

It uses physical variables such as It uses physical variables such as MASS, FRICTION, VELOCITY, etc., to MASS, FRICTION, VELOCITY, etc., to simulate the objects movements.simulate the objects movements.

Page 6: DYNAMICS Part I Physics Engine By Willis (The Magnificent) Louie Fei (The Coyote) Liao

What is a PHYSICS ENGINE?What is a PHYSICS ENGINE?

Real-time vs high precisionReal-time vs high precision Scientist and animated graphicsScientist and animated graphics Video game use real-time for time Video game use real-time for time

sensitivesensitive Rigid body dynamics VS soft body Rigid body dynamics VS soft body

dynamicsdynamics Liquid, clothes, etcLiquid, clothes, etc

Page 7: DYNAMICS Part I Physics Engine By Willis (The Magnificent) Louie Fei (The Coyote) Liao

Table of ContentsTable of Contents

1) Introduction physics engine1) Introduction physics engine

What is a “physics engine”?What is a “physics engine”?

2) Advantage of physics engine2) Advantage of physics engine

Why we want a physics engine?Why we want a physics engine?

3)3) Advantages and Disadvantages Advantages and Disadvantages of different physics enginesof different physics engines

4) Our PICK – we like it hot4) Our PICK – we like it hot

Page 8: DYNAMICS Part I Physics Engine By Willis (The Magnificent) Louie Fei (The Coyote) Liao

Why do we want a Why do we want a physics engine?physics engine?

Page 9: DYNAMICS Part I Physics Engine By Willis (The Magnificent) Louie Fei (The Coyote) Liao

Advantages of Physics EngineAdvantages of Physics Engine

Manual labor sucksManual labor sucks It does most of the work for us It does most of the work for us

Error prone Error prone doing calculations most humans make doing calculations most humans make

errorserrors Cost efficientCost efficient

Wouldn’t make a whole lot of money Wouldn’t make a whole lot of money working on that engine all day long.working on that engine all day long.

Page 10: DYNAMICS Part I Physics Engine By Willis (The Magnificent) Louie Fei (The Coyote) Liao

Table of ContentsTable of Contents

1) Introduction physics engine1) Introduction physics engine

What is a “physics engine”?What is a “physics engine”?

2) Advantage of physics engine2) Advantage of physics engine

Why we want a physics engine?Why we want a physics engine?

3)3) Advantages and Advantages and DisadvantagesDisadvantages of different physics of different physics enginesengines

4) Our PICK – we like it hot4) Our PICK – we like it hot

Page 11: DYNAMICS Part I Physics Engine By Willis (The Magnificent) Louie Fei (The Coyote) Liao

Physics Engine ComparisonPhysics Engine Comparison

User Base - popularityUser Base - popularity Reliability - well testedReliability - well tested Documentation - run into problems, Documentation - run into problems,

look it uplook it up

Page 12: DYNAMICS Part I Physics Engine By Willis (The Magnificent) Louie Fei (The Coyote) Liao

Physics Engine ComparisonPhysics Engine Comparison

ODEODE BulletBullet PAL/OPALPAL/OPAL

Popular, more Popular, more activityactivity

Fresh projectFresh project APIAPI

Used with Used with Ogre 3D, well Ogre 3D, well testedtested

Not as Not as establishedestablished

High level vs High level vs low levellow level

Well Well DocumentedDocumented

Not well Not well documenteddocumented

More than we More than we needneed

Page 13: DYNAMICS Part I Physics Engine By Willis (The Magnificent) Louie Fei (The Coyote) Liao

Table of ContentsTable of Contents

1) Introduction physics engine1) Introduction physics engine

What is a “physics engine”?What is a “physics engine”?

2) Advantage of physics engine2) Advantage of physics engine

Why we want a physics engine?Why we want a physics engine?

3)3) Advantages and Disadvantages Advantages and Disadvantages of different physics enginesof different physics engines

4) Our PICK4) Our PICK – we like it hot – we like it hot

Page 14: DYNAMICS Part I Physics Engine By Willis (The Magnificent) Louie Fei (The Coyote) Liao

OUR PICKOUR PICK

Most popularMost popular Well testedWell tested Well documentedWell documented

Page 15: DYNAMICS Part I Physics Engine By Willis (The Magnificent) Louie Fei (The Coyote) Liao

Why Do We Choose ODE?Why Do We Choose ODE?

Good for simulating articulated rigid Good for simulating articulated rigid body structure.body structure. An articulated structure is created when An articulated structure is created when

rigid bodies of various shapes are rigid bodies of various shapes are connected together with joints of connected together with joints of various kinds.various kinds.

Example:Example: Ground vehiclesGround vehicles AirplaneAirplane RobotsRobots

Page 16: DYNAMICS Part I Physics Engine By Willis (The Magnificent) Louie Fei (The Coyote) Liao

Why Do We Choose ODE?Why Do We Choose ODE?

Designed to be used in the Designed to be used in the interactive or real-time simulation.interactive or real-time simulation. The user is able to change the structure The user is able to change the structure

of the system while the simulation is of the system while the simulation is running.running.

More accurate adjustments are More accurate adjustments are available.available.

Page 17: DYNAMICS Part I Physics Engine By Willis (The Magnificent) Louie Fei (The Coyote) Liao

Why Do We Choose ODE?Why Do We Choose ODE?

Built-in collision detection system.Built-in collision detection system. Supports various primitives: Supports various primitives:

Sphere, box, cylinder, plane, triangular mesh, etc.Sphere, box, cylinder, plane, triangular mesh, etc. Every collision has Every collision has hard contacthard contact..

ODE: use a special non-penetration ODE: use a special non-penetration constraint whenever two bodies collide.constraint whenever two bodies collide.

More realistic. More realistic. Other engines: use virtual springs to Other engines: use virtual springs to

represent contacts.represent contacts. Extremely error-prone & Difficult to do it correctly Extremely error-prone & Difficult to do it correctly

..

Page 18: DYNAMICS Part I Physics Engine By Willis (The Magnificent) Louie Fei (The Coyote) Liao

Why Do We Choose ODE?Why Do We Choose ODE?

Has a native C interface.Has a native C interface. Has a C++ interface built on top of Has a C++ interface built on top of

the C one.the C one. Platform specific optimization is Platform specific optimization is

available.available. Detailed tutorials and Detailed tutorials and

documentation.documentation. Beginner-friendly engine.Beginner-friendly engine.

Page 19: DYNAMICS Part I Physics Engine By Willis (The Magnificent) Louie Fei (The Coyote) Liao

A Simple Car DemoA Simple Car Demo