CS4455 Physics Engines Maribeth Gandy Jeff Wilson Clint Doriot

Slides:



Advertisements
Similar presentations
Real-Time Game Physics
Advertisements

Chapter 4.2 Collision Detection and Resolution. 2 Collision Detection Complicated for two reasons 1. Geometry is typically very complex, potentially requiring.
1 Computer Graphics Physical simulation for animation Case study: The jello cube The Jello Cube Mass-Spring System Collision Detection Integrators.
Learning Goals 1.The conditions that must be satisfied for a body or structure to be in equilibrium. 2.What is meant by the center of gravity of a body,
Color Problem Have a black-box function that returns a bright color in 24-bit RGB Want a paler version of the output What to do?
Chapter 5 Rotation of a Rigid Body. §5-5 Angular Momentum of a rigid Body Conservation of Angular Momentum §5-1 Motion of a Rigid body §5-2 Torque The.
Mechanical Engineering Dept.
Particle Systems 1 Adapted from: E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012.
Course Outline 1.MATLAB tutorial 2.Motion of systems that can be idealized as particles Description of motion; Newton’s laws; Calculating forces required.
1 CS 599 Physically Based Modeling for Interactive Simulation and Games Case Study: Havok Engine for Game Physics Jernej Barbic University of Southern.
1 7M836 Animation & Rendering Animation Jakob Beetz Joran Jessurun
Game Physics Chris Miles. The Goal To learn how to create game objects with realistic physics models To learn how to simulate aspects of reality in order.
1 Geometry A line in 3D space is represented by  S is a point on the line, and V is the direction along which the line runs  Any point P on the line.
Computer graphics & visualization Rigid Body Simulation.
Computer graphics & visualization Collision Detection – Narrow Phase.
3.7. O THER G AME P HYSICS A PPROACHES Overview of other game engine physics approaches.
CS 4730 Physical Simulation CS 4730 – Computer Game Design.
Feature-length films: Games: Desktop Animations: Computer Animation.
Computer Animation Rick Parent Computer Animation Algorithms and Techniques Physically Based Animation.
Physically Based Animation and Modeling
Animation and Games Development
Lecture VII Rigid Body Dynamics CS274: Computer Animation and Simulation.
Game Physics – Part IV Moving to 3D
DYNAMICS Part I Physics Engine By Willis (The Magnificent) Louie Fei (The Coyote) Liao.
Chapters 10, 11 Rotation and angular momentum. Rotation of a rigid body We consider rotational motion of a rigid body about a fixed axis Rigid body rotates.
CSE 380 – Computer Game Programming Box2D Box2D TestBed.
Spring Rigid Body Simulation. Spring Contents Unconstrained Collision Contact Resting Contact.
Computer Animation Rick Parent Computer Animation Algorithms and Techniques Collisions & Contact.
Math / Physics 101 GAM 376 Robin Burke Fall 2006.
Computer Game Design and Development Mathematics, Collision, and Physics Havok Destruction.
Two-Dimensional Rotational Kinematics 8.01 W09D1 Young and Freedman: 1.10 (Vector Products) , 10.5.
NVIDIA PhysX: 物理引擎 (Physics Engine) V-lab Talk 2010/12/03 洪偉瀚.
Advanced Computer Graphics Rigid Body Simulation Spring 2002 Professor Brogan.
COSMOSMotion Slides.
University of Texas at Austin CS 378 – Game Technology Don Fussell CS 378: Computer Game Technology Physics for Games Spring 2012.
Spring Rigid Body Simulation. Spring Contents Unconstrained Collision Contact Resting Contact.
Unity3D Physics April 3, 2015 Comp Game Design Michael Shah.
Computer Game Design and Development
Computer Animation Real-Time Animation and Physics.
Static Equilibrium Physics 150/250 Center of Mass Types of Motion
CS274 Spring 01 Lecture 7 Copyright © Mark Meyer Lecture VII Rigid Body Dynamics CS274: Computer Animation and Simulation.
Framsticks physics © Szymon Ulatowski. Simulation goals Physics-based: create real-world feeling to intuitively understand behaviors Not necessarily very.
Advanced Games Development Game Physics CO2301 Games Development 1 Week 19.
Rick Parent - CIS682 Rigid Body Dynamics simulate basic physics of an object subject to forces Keyframing can be tedious - especially to get ‘realism’
Physics Michael Vernier Robert Weekley Michael Ford.
Havok Xtra Training
Dynamics. Motion with Regard to Mass Particle Dynamics Mass concentrated in point Newton’s Equation Governs Motion f = M x.
Computer Graphics Imaging Ying Zhu Georgia State University Lecture 29 Soft Bodies and Rigid Bodies.
Concepts for Programming a Rigid Body Physics Engine Part 2 Presented by Scott Hawkins.
Advanced Games Development Physics Engines 2 CO2301 Games Development 1 Week 21.
Feature-length films: Games: Desktop Animations:.
Research and Development of a Physics Engine by Timmy Loffredo.
Advanced Computer Graphics Rigid Body Simulation
Physically Based Simulations For Games
Physically-Based Motion Synthesis in Computer Graphics
Course Outline Course Outline Exam topics MATLAB tutorial
Done already for your convenience!
Forces - basic physics Springs (Hooke’s law) Damping Gravity
Game Design, Development, and Technology
CS-378: Game Technology Lecture #15: Physically Based Simulation
Computer Animation Ying Zhu Georgia State University
EECE 478 Game Physics.
3.7. Other Game Physics Approaches
Physics in Games David: Overview of Physics in Games
Physics in Games David: Achieving Fun with Physics
Motion in Real and Virtual Worlds
Computer Animation Algorithms and Techniques
Advanced Games Development Game Physics
GPAT – Chapter 7 Physics.
Presentation transcript:

CS4455 Physics Engines Maribeth Gandy Jeff Wilson Clint Doriot

CS 4455 What is a Physics Engine? Provides physics simulation in a virtual environment High Precision vs. Real Time Real Time requires a lot of approximations Can be used in creative ways

CS 4455 Real Time Physic Engines Havok (commercial), Newton (closed source), Open Dynamics Engine (ODE) (open source), Aegia PhysX (accelerator board available) Unity o PhysX integration  Rigidbodies  Soft Bodies  Joints  Ragdoll Physics  Cloth  Cars /Manual/Physics.html

CS 4455 Concepts Forces Rigid Bodies o Box, sphere, capsule, character mesh etc. Constraints Collision Detection o Can be used by itself with no dynamics

CS 4455 Bodies Rigid Movable (Dynamic) o Kinematic o Unity’s IsKinematic = false  You are not controlling the velocity & position, Unity is doing that Unmovable (Static) o Infinite mass Properties o Mass, dynamic/static friction, restitution (bounciness), softness  Anisotropic friction (skateboard) o Mesh shapes with per triangle materials (terrain)

CS 4455 Bodies Position Orientation Velocity Angular Velocity These values are a result of forces

CS 4455 Collisions Bounding boxes (collision hulls) reduce complexity of collision calculation o Made from the primitives mentioned before  Boxes, capsules etc. How your model is encapsulated determines accuracy, and computational requirements Collision groups o Tweak simulation, game play, path planning

CS 4455 Forces Force o constant Impulse o Instantaneous Vector and magnitude Acceleration and smooth options available Torque (spin)

CS 4455 Connectors Joints o Restrict motion between actors, rotation and translation o Constraints o Projection mode (amount of joint separation allowed) o Actors collidable or not (bendable) o Restitution o Revolute (hinge) o Spherical (three degrees of freedom) o Prismatic (shock absorber), cylindrical joints o Point on line (shower curtain) o Pulley

CS 4455 Connectors Spring o Joint with natural resting angle o Force o Damping Joint Motor (apply relative torque) Breakable joints (max force, max torque)

CS 4455 Constraints Hard o Never violated o In reality will be violated by errors in simulation Soft o Designed to be violated Joint constraints o Degrees of freedom, linear/angular amounts Freeze flags (position and rotation) Linear and angular damping o In absence of friction and collision (wind resistance)

CS 4455 Deactivation Limit actors awake in simulation Sleep linear and angular velocity Bounce threshold (stops vibration)

CS 4455 Ragdoll Physics Create human and other figures that move realistically Simplified skeleton o Collection of rigid bodies (bones) o Connected by hinges or springs (joints) o Joints have no stiffness  Hence “ragdoll” o kinematic objects useful “Trespasser” first game to use Complex to combine this with animations o Blended ragdoll o Other complex constructions made from components o Rope, grass, cloth, particles systems, vehicles /wizard-RagdollWizard.html

CS 4455 Putting it all in motion Set gravity vector Apply forces to bodies Adjust joint parameters as necessary Call collision detection Step the simulation based on time o Tradeoff of speed and accuracy o Substeps o Fixed update Keep the graphics object and physics object in synch Deactivate objects (manually or automatically)

CS 4455 Why does my simulation look wrong? Scale of your objects and world o May look wrong o May cause anomalies in simulation Disconnect between graphics and physics world Slow downs due to number of active objects Properties and their interactions also may result in strange results o Mass, Friction, magnitude of forces etc. o Velocities too fast for timestep o Whips Collision detection may break down o interpenetration Must move objects using the functionality of the physics engine. No “hand of god” behavior

CS 4455 Things you can do with a Physics Engine Detect collisions Simulate rigid bodies under the influence of forces Spring-mass systems Destructible buildings and structures Ray / Shape casting Trigger Volumes Complex machines (cranes, moving platforms, pulleys, etc) Traps (avalanche of boulders) Drivable vehicles Rag doll characters Powered rag dolls Dangling props Cloth Fluid Simulations Water surface simulations and buoyancy Audio propagation

CS 4455 Making it fun Factors o Quality of the simulation o Integration with other systems o Selection of physics driven gameplay elements Genres o Simulations o Physics Puzzle Game o Sandbox Games o Goal-based or Story-driven games?  Trade off in control and realism Design Impacts o Predictability o Turning and control o Emergent behaviors o Non-static game environments