Motion in Real and Virtual Worlds

Slides:



Advertisements
Similar presentations
Physics: Laws of Motion Soon Tee Teoh CS 134. Newtons Laws of Motion First Law: When there is no net force on an object, its velocity would remain the.
Advertisements

Chapter 4.2 Collision Detection and Resolution. 2 Collision Detection Complicated for two reasons 1. Geometry is typically very complex, potentially requiring.
Collision Detection and Resolution Zhi Yuan Course: Introduction to Game Development 11/28/
Kinetics of Particles: Energy and Momentum Methods
2.1. C OLLISION D ETECTION Overview. Collision detection is used within many types of application, e.g. from robotics, through engineering simulations,
MAT 594CM S10Fundamentals of Spatial ComputingAngus Forbes Week 2 : Dynamics & Numerical Methods Goal : To write a simple physics simulation Topics: Intro.
Particle Systems 1 Adapted from: E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012.
Chapter 4.2 Collision Detection and Resolution. 2 Collision Detection Complicated for two reasons 1. Geometry is typically very complex, potentially requiring.
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.
1cs533d-term Notes  list Even if you’re just auditing!
Haptic Cloth Rendering 6th Dutch-Belgian Haptics Meeting TUDelft, 21 st June 2006 Lode Vanacken Expertise centre for Digital Media (EDM) Hasselt University.
Single Point of Contact Manipulation of Unknown Objects Stuart Anderson Advisor: Reid Simmons School of Computer Science Carnegie Mellon University.
Particle Systems Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts Director, Arts Technology Center University.
Physics Simple – Pong Medium – Rigid bodies F = ma Circles, spheres, rectangles for collisions Complex – Fluids, clothings, explosions, hair.
The Islamic University of Gaza Faculty of Engineering Civil Engineering Department Numerical Analysis ECIV 3306 Chapter 1 Mathematical Modeling.
Collision Detection David Johnson Cs6360 – Virtual Reality.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Mathematical Modeling and Engineering Problem solving.
Computer graphics & visualization Collision Detection – Narrow Phase.
EVERY-DAY FORCES Force of gravity Normal force Force of friction Universal force of gravity.
Spring Topic Outline for Physics 1 Spring 2011.
Lecture VII Rigid Body Dynamics CS274: Computer Animation and Simulation.
CSE 381 – Advanced Game Programming Quickhull and GJK.
Collision handling: detection and response
3D Graphics for Game Programming Chapter XII Physics-based Simulation.
Computer Animation Rick Parent Computer Animation Algorithms and Techniques Collisions & Contact.
Numerical Integration and Rigid Body Dynamics for Potential Field Planners David Johnson.
Concepts for Programming a Rigid Body Physics Engine Part 1 Presented by Scott Hawkins.
Equation of Motion for a Particle Sect nd Law (time independent mass): F = (dp/dt) = [d(mv)/dt] = m(dv/dt) = ma = m(d 2 r/dt 2 ) = m r (1) A 2.
Computer Game Design and Development Mathematics, Collision, and Physics Havok Destruction.
Chapter 4 The Laws of Motion. Classes of Forces Contact forces involve physical contact between two objects Field forces act through empty space No physical.
Calculus and Newton’s 2 nd Law Sometimes, we want to find a formula for the velocity (or position) of an object as a function of time. 公式.
1 KIPA Game Engine Seminars Jonathan Blow Ajou University December 6, 2002 Day 10.
Advanced Computer Graphics Rigid Body Simulation Spring 2002 Professor Brogan.
CSCE 552 Fall 2012 Math, Physics and Collision Detection By Jijun Tang.
University of Texas at Austin CS 378 – Game Technology Don Fussell CS 378: Computer Game Technology Physics for Games Spring 2012.
Introduction to Particle Simulations Daniel Playne.
Computer Game Design and Development
Particle Systems. Applications Particle systems are broadly defined for: Explosion Cloth Fluid And more… It is integrated into many animation software,
Chapter 5 The Laws of Motion.
CS274 Spring 01 Lecture 7 Copyright © Mark Meyer Lecture VII Rigid Body Dynamics CS274: Computer Animation and Simulation.
Game Technology Animation V Generate motion of objects using numerical simulation methods Physically Based Animation.
Advanced Games Development Game Physics CO2301 Games Development 1 Week 19.
1 Computer Game Physics The very basics. 2 The Basics Force F Mass m Acceleration a: a = F/m Velocity v: v = a*t Position s: s = v*t …if F is constant.
1 Chapter 4 The Laws of Motion Classes of Forces Contact forces involve physical contact between two objects Field forces act through empty.
Game Programming 13 Physics in Games (cont.) 2010 년 2 학기 디지털콘텐츠전공.
Dynamics. Motion with Regard to Mass Particle Dynamics Mass concentrated in point Newton’s Equation Governs Motion f = M x.
Fundamentals of Computer Animation Collision Detection and Response.
Advanced Computer Graphics Rigid Body Simulation
Particle Systems Ed Angel Professor Emeritus of Computer Science
Physically Based Simulations For Games
Objectives: Write the equation of motion for an accelerating body.
CS-378: Game Technology Lecture #15: Physically Based Simulation
EECE 478 Game Physics.
Newton’s Laws of Motion
Collision Detection Spring 2004.
3.7. Other Game Physics Approaches
2.1. Collision Detection Overview.
Parts of these slides are based on
ATOC 4720 class31 1. Coordinate systems 2. Forces.
Uniform Circular Motion
Chapter 4.2 Collision Detection and Resolution
Collision handling: detection and response
Devil physics The baddest class on campus aP Physics
Motion in Real and Virtual Worlds
Particle Systems Ed Angel
Computer Animation Algorithms and Techniques
Advanced Games Development Game Physics
David Johnson Cs6360 – Virtual Reality
GPAT – Chapter 7 Physics.
Presentation transcript:

Motion in Real and Virtual Worlds CS 498VR: Virtual Reality UNIVERSITY OF ILLINOIS AT URBANA-CHAMPAIGN Eric Shaffer

Mathematical Modeling of Motion The physics of both real and virtual worlds impact VR experiences. We will look at How phsyics engines model motion in VR How motion tracking methods rely on accelerations and velocities How human vestibular organs rely on accelerations and velocities

1D Motion Suppose y(t) gives a position at a given time How do you compute y(t) if you can measure velocity Numerically we have since Sensor for v(t) is odometer For constant v(t), y(t) = ? y(t) = y0 + vt For unconstant v(t), y(t) = ? numerical solution only

Acceleration Acceleration is the rate of change of the velocity We can approximate this numerically as before

Error Numerically we have We are approximating an integral by stepping in the direction of the velocity This is called Euler Integration Error is proportional to the size of the timestep O(Δt)…which is not good Using a higher order method like 4th order Runge-Kutta (RK4) would be better Sensor for v(t) is odometer For constant v(t), y(t) = ? y(t) = y0 + vt For unconstant v(t), y(t) = ? numerical solution only

A Simple Newtonian Physics Engine We will animate particles (aka point masses) Position is changed by velocity Velocity is changed by acceleration Forces alter acceleration Our physics engine will integrate to compute Position Velocity We set the acceleration by applying forces

Mass and Acceleration To find the acceleration due to a force we have So we need to know the inverse mass of the particle You can model infinite mass objects by setting this value to 0 𝑝 is the second derivative of some function 𝑝

Force: Gravity Law of Universal Gravitation G is a universal constant mi is the mass of object I r is the distance between object centers we care only about gravity of the Earth m1 and r are constants r is about 6400 km on Earth We simplify to f = mg g is about 10ms-2 For gaming, 10ms-2 tends to look boring Shooters often use 15ms-2 Driving games often use 20ms-2 Some tune g object-by-object

Force: Gravity If we consider acceleration due to gravity we have So acceleration due to gravity is independent of mass

Force: Drag Drag dampens velocity Caused by friction with the medium the object moves through Even neglecting, you need to dampen velocity Otherwise numerical errors likely drive it higher than it should be A velocity update with drag can be implemented as important to incorporate time so drag changes if the frame rate varies

The Integrator The position update can found using Euler’s Method: 𝐏 𝐧𝐞𝐰 = 𝐏 𝐨𝐥𝐝 + 𝐏 𝐭 Note that is inaccurate, though good enough for simple things Euler’s error is O(t) Why is the error worse when acceleration is large? The velocity update is

Collision Detection Often requires use of bounding volumes or spatial data structures Broad Phase: Uses bounding volumes to quickly determine which objects need to be checked closely for collision Narrow Phase: Perform careful, expensive collision checks, such as triangle-triangle intersection for meshes

Bounding Volumes Sphere AABB OOBB Convex Hull Hierarchical (BVH) AABB=Axis Aligned Bounding Box OOBB = Object-Oriented Bounding Box BVH = Bounding Volume Hierarchy

Collision Detection Surprisingly complex topic Even a high-quality engine like Unity has issues We will discuss how to simulate only two types of collision Sphere-Wall Sphere-Sphere We check for a collision when updating position If a collision occurs the velocity vector is altered Position is determined by the contact Position and velocity update are completed with new values over the remaining time

Dynamic Collision Detection Dynamic collision tests an exhibit tunneling if only the final positions of the objects are tested (a) Or even if the paths of the objects are sampled (c) A sweep test assures detection but may not be computationally feasible.

Sphere-Plane Collision Can make it even simpler for the box walls in MP. How?

Sphere-Sphere Collision

Collision Resolution First, find closing (aka separating) velocity Component of velocity of two objects in direction from one to another Collisions that preserve momentum are perfectly elastic We will use vs_after = -cvs c is the coefficient of restitution…a material property that you choose