1/18/2011
Course Materials
Course webpage: http://www.scss.tcd.ie/John.Dingliana/cs7055 Lecture Slides Labs Readings from the course
Submission and feedback through WebCT
CS7057 – Real-time Physics 01 - Introduction
Relevant References Learning Outcomes
Outline and describe the architecture and components Baraff, Witkin and Kass “Physically based Animation Course notes” – Siggraph 2001 of a physics-based motion pipeline that would be Most of the Labs are http://www.pixar.com/companyinfo/research/pbm2001/ based on these notes employed in a typical game. Mueller, James, Theurey, Stam “Real-time Physics” – Siggraph Explain basic rigid body dynamics and the mechanics of 2008 deformable systems. http://www.matthiasmueller.info/realtimephysics/index.html Analyze and compare different approaches for collision • Ian Millington – “Game Physics Engine Development” detection and collision response of rigid and deformable • Kenny Erleben - “Physics based objects. animation” • David H.Eberley“Game Physics Engine Build a real-time rigid body simulation system for Development” convex polyhedra.
Assessment Physically Based Modelling
100% based on coursework Cs7057 Final A form of Procedural ~60% labs and ~40% final assignment Mark [100%] Modelling, Lab assessment: Synthesize motions of Weekly demos 60% Labs Final Project Final Cumulative submission 40% [~60%] [~40%] inanimate objects due to Youtube Video external forces Approx. 4 page written report Cumulative Weekly Mark Source code Submission Motivations: Realism / (60% of labs) (40% of labs) Details of final project will be provided plausibility, Useful later in the year Automation, Interaction
Supplemental [if required] will be by exam
All work is expected to be done individually, where other help or sources are used these Jenga App © 2010, NaturalMotion should be duly referenced. Students are expected to familiarise with college’s Image From: http://appadvice.com/appnn/2010/12/review-jenga/ regulations on plagiarism
1 1/18/2011
State of the Art (commercial) DMM
LucasArts’ Star Wars – The Force Unleashed [2008] featured 3 different state-of-the art technologies in Physics in industry
Havok Physics : for gameplay rigid body dynamics physics NaturalMotion Euphoria for physically responsive non-player character behaviour Pixelux DMM for deformable and destructable effects physics
Tech Trailer: http://www.gametrailers.com/video/unleashing-the-star-wars/29964
Real-time Physics State of the Art
Some well known physics Engines There is a vast amount of research literature in Physically Based Animation that deals with highly complex effects that is not yet fully exploited in commercial applications
Also common in 3D modelling/animation tools: 3DS Deformable Objects © Ron Fedkiw Fluid animaton © Cem Yuksel Character Physics ©Michael Neff MAX (havok reactor), Blender (bullet) and simulation
Application Areas Classes of Game Physics
Interactive Surgical simulation; Virtual reality; Assembly planning computer preoperative design prototyping animation planning
Computational Effects Physics Gameplay Physics Scientific robotics; Video games Education • Live Secondary Animations • Fully interactive visualization manipulation • One-way Interaction • Affects the user • e.g. Particle effects, cloth
Pre-computed Physics Off-line Physics • Canned Physics • e.g. Cinematics / • Secondary Animations e.g. cutscenes Cloth, water, some • Pre-calculated character animations Game • Pre-rendered Physics
2 1/18/2011
Effects Physics Basic Physics Stages
Collision Response: Collision apply forces Detection: and impulses check for intersections l Equations of Motion: model the motion of the object Havok FX Demo © 2005 Havok
Physics State Variables and Constants Collision Detection
Position Mass m v Velocity Acceleration / Forces p F
Orientation Moments of Inertia Spatial Centre of Mass Occupancy Angular Velocity Torque M v Plasticity Elasticity p Density Viscosity F Opacity Texture Friction ... Collision Detection and Intersection testing check if an object intersects another – a common operation in computer graphics
Collision Detection Problem: Complexity
Sphere-sphere
Sphere-plane
Polygon-polygon Triangle-Triangle
A diverse problem (lots of special cases) but not extremely difficult to solve e.g. Lots of Intersection Source Code Available Here: http://www.geometrictools.com/LibFoundation/Intersection/Intersection.html Current graphical data sets are generally more detailed Possible solution: Use a simplified than we wish to deal with for collision detection. representation. (Even this is generally overkill for game physics)
3 1/18/2011
Collision Proxies Collision Proxies
Havok Example: Finer Rag-doll collision proxy for character used in effects physics interactions with objects in scene... All physics objects are approximations of the display mesh A much coarser bounding ellipsoid proxy used for navigation (yellow blob below)
Halflife (Mod), 1998 Counterstrike (Mod), 1999 e.g. Hit boxes commonly used in games (left, middle) ... sometimes they do (right) approximate the actual mesh. Hopefully people don’t http://www.havok.com/misc/physicsEfficiency-2007.pdf notice the approximation....
Dynamics Proxies Two Phase Collision Detection
Quite often no amount of simplification is enough – scenes require more and more objects, users more demanding of accuracy. Solution: cull some trivial cases (how we do this will be discussed in more detail later in the module)
Narrow phase •Per-object : coarse culling of non-colliding cases •Pair-wise between objects •Per-feature •Narrow-in on collision – calculate finer features e.g. collision manifold, penetration depth Broad phase
Bounding Volumes Bounding Volume Hierarchies
Use a coarse over approximation of the object i.e. A bounding volume (conservative Hierarchical, multi-resolution reps of objects. This enables Progressive Culling: overestimate) that is geometrically much simpler than the object. Only do more detailed Check coarsest level and only check children if this collides.... Repeat until we intersection tests if bounding volume intersects. get to finest level then do triangle checks
Levels of an AABB Tree Hierarchy
Image used without permission from Real-time Collision Detection – by Christer Ericson
4 1/18/2011
Collision Response Deformable Objects
Once objects are found to be colliding collision process applies forces/impulses to stop them intersecting to create plausible physically based reactions.
Key Concerns in Interactive Physics: Robustness: response must assure system remains stable in all possible states Plausibility: response to collision must be believable Efficiency: physics processing must be fast enough to enable real-time
Resting frame rates Impulses Constraints Friction contact
Fluid Dynamics Tentative Lecture Plan
Intro Rigid Body - Unconstrained Motion Lab 1: Rigid Body State & Unconstrained motion Collision Detection Broad-phase Lab1 marking & Lab 2: Broadphase Collision Detection Narrow-phase: BVH Narrow-phase: Feature Based Lab2 marking & Lab 3: Narrow Phase & Contact Modelling Narrow-phase: Simplex Based Contact Modelling Extra Lab3b Collision response Multiple-contact resolution Lab 3 Marking and Lab 4: Collision Response Timewarp, Conservative Friction and Constraints Lab 4 Marking Advancement, Back-tracking Reading Week Lab: Final Project Specs Deformable Bodies - 1 Deformable Bodies - 2
Fluid simulation Position-based Dynamics Faux physics
Lab: Final Project Update Lab: Final Project Update Physics Engine Reviews
Carol: Physically based character Carol: Physically based character Carol: Physically based character animation animation animation Lab: Final Project Demos Lab: Final Project Demos Physics Roundup
Planned Assessment
Weekly Labs 1. Rigid-body state: ~10%, ~5hrs 2. Broad-phase Collision Detection: ~15%, ~5hrs 3. Narrow-phase Collision Detection: ~20%, ~10hrs 4. Collision Response: ~15%, 5hrs Marking scheme:
Weekly marking – minimum goals
Cumulative submission – rigid body engine
Youtube Video
Report
Source code (not marked) Final Project: ~40%, 30hrs
5