10/1/2009
John Dingliana
• Graphics Vision Visualization Group • Computer Science Department CS7057 Real-time Physics • Lloyd 041 ::: [email protected] Course Overview • My areas of interest: – Level-of-detail in real-time Physically Based Animation – Visualization – Interaction – Non-photorealistic Animation and Rendering
Graphics Vision and Visualisation (gv2) GV2 Graphics Lab
• GV2 research group: • Some Research Areas of – Image synthesis group relevance to this 1993 (graphics) course: – Computer vision and – Physically based robotics group 1983 animation – Crowd animation – Perception of graphics and animation – Urban simulation
– Fluid animation Sensics Pi- Sight HMD – Motion capture
Course Pre-requisites Assessment
• CS7033 Real-time Animation • 100% by coursework • Recommended: • Aggregate mark of 40% is required to pass – C++, C# or equivalent • – Computer Graphics (3D Graphics) Coursework: – Regular small lab assignments • Some experience in OpenGL or 3D Graphics Library • Bi-weekly • Undergraduate maths (some basics reviewed) – One major assignment (linked with CS7033) • Both parts of the course
• Supplemental is by EXAM (for PGDip only)
1 10/1/2009
MODULE Web Page Aims
• Course Notes + Updates • Outline and describe the architecture and components of a motion pipeline that would be employed in a typical game. – http://www.scss.tcd.ie/John.Dingliana/cs7057/ • Explain basic rigid body dynamics and the mechanics of – Access to notes will requires log in with Compsci deformable systems. username + password • Analyze and compare different approaches for collision detection and collision response of rigid and deformable objects. • Employ existing Physics libraries to create real-time physics based simulations of rigid and deformable bodies • Be able to build a real-time rigid body simulation system for convex polyhedra.
Specific Themes Relevant References
• Topics chosen from but not limited to: • Baraff, Witkin and Kass “Physically based Animation Course notes” – Siggraph 2001 – Particle System Dynamics – http://www.pixar.com/companyinfo/research/pbm2001/ – 3D Rigid Body Dynamics • Mueller, James, Theurey, Stam “Real-time Physics” – – Collision detection for polyhedral objects Siggraph 2008 • Multi-phase collision detection – http://www.matthiasmueller.info/realtimephysics/index.html • Bounding Volume Hierarchies • Narrow Phase Collision Detection » Kenny Erleben - “Physics based animation” – Multiple Contact resolution » David H.Eberley“Game Physics Engine – Deformable objects + Cloth simulation Development” – Fluid simulation (overview)
Real-time Physics Physically Based Modelling
• Increasingly important topic in past decade • A form of Procedural Modelling, • Behavioral animation -> • Popular Physics Engines: animate behaviour • Physics -> inanimate motions due to external forces • Also common in 3D modelling/animation tools: MAX(havok reactor), Blender(bullet) • Motivations: Realism / plausibility, Useful Automation , Interaction
2 10/1/2009
State of the Art Physics
• Havok • Natural Motion - Euphoria • Pixelux - DMM
(c) Irving, Shroeder and Fedkiw 2007
Concerns Application Areas
• Efficiency • Virtual reality • Interactive computer • Fidelity or complexity animation • Surgical simulation; • Realism or plausibility preoperative planning • Robustness • Computational robotics; manipulation • Video games • Assembly planning • Scientific visualization • Education
Physically Based Animation Collision Handling
• Kinematics • The basis for interaction – The study of motion without considering mass or – Object – object interaction forces – • Dynamics User – object interaction – The study of motion taking into account mass and • Three phases: forces – Collision detection – Inverse Dynamics: the study of motion given the start – Contact modelling and end points – Forward Dynamics: the study of motion given only the – Collision response, contact resolution start points – most important for interactive apps
3 10/1/2009
Collision Detection Collision Detection
Sphere-sphere
Sphere-plane
Polygon-polygon Triangle-Triangle
Lots of Intersection Source Code Available Here: Intersection testing and collision detection http://www.geometrictools.com/LibFoundation/Intersection/Intersection.html
Problem Over-approximation Problems
Display Meshes are generally Possible solution: Use a simplified more detailed than we wish to representation. (Even this is deal with for collision detection. generally overkill for a game)
Hit Boxes Collision Proxies
Rag-doll collision proxy for character.
http://www.havok.com/misc/physicsEfficiency-2007.pdf
4 10/1/2009
Bounding Volumes Bounding Volume Hierarchies
Levels of AABB Tree Hierarchy
Two Phase Collision Detection Collision Response
• Broad phase • Collision Response Concerns: – Impulses: instantaneous change in velocity – Per-object : coarse culling of non-colliding cases – Resting contact – Constraints • Narrow phase – Friction • Key Concerns in Interactive Physics: – Pair-wise between objects – Robustness: response must assure system remains – Per-feature stable in all possible states – Narrow-in on collision – calculate finer features – Plausibility: response to collision must be believable e.g. collision manifold, penetration depth – Efficiency: physics processing must be fast enough to enable real-time frame rates
Deformable Objects Upcoming topics in this module
• Problems: • Overview of Physics in Computer Animation • Particle Simulation – How should objects deform: • Numerical Integration of ODE's for Simulation • Realism • • Robustness/stability Rigid Body Dynamics – Collision Detection (several lectures) • Efficiency – Contact Modelling – Collision detection – Collision Response • Bounding volumes no longer valid • Multi-body Simulation Issues • Pre-processing short cuts no longer possible • Deformable Objects and Cloth • Collision proxies need to be updated – Cartoon Physics – Behaviours: • Bullet Physics Engine • Moments of inertia • Fluid Simulation
5