Download presentation
Presentation is loading. Please wait.
Published byMilo Watson Modified over 6 years ago
1
Physics in Games David: Overview of Physics in Games
Steven: Character Animation Ryan: Effects Dan: Development Applications Lowell: How physics engines work, future of physics *
2
Tennis for Two (1958) First video game to incorporate physics
Used ballistic missile calculations to simulate a tennis ball
3
Spacewar! (1962) Used velocity calculations for ship movement
First use of gravity simulation in a gravity well
4
Pong (1972) First commercially successful video game
Used basic calculations for deflection and collision
5
Super Mario Bros. (1985) Incorporated acceleration, friction, and momentum into player movement
6
Jurassic Park: Trespasser (1998)
First game world completely controlled by classical mechanics First game to use ragdoll physics
7
Havok Physics (2000) Commercial physics engine Collision detection
Rigid bodies Multibody systems Ragdoll physics Animation Inverse kinematics
8
PhysX (2004) Developed by Ageia Acquired by Nvidia in 2009
Collison detection Joints Materials Ragdoll Volumetric fluid Cloth
9
Most Popular Physics Engines of 2009
10
Red Faction (2001) Features Geo Mod engine
Allowed for destructible environments
11
Half Life 2 (2004) Uses Havok Physics Made use of gravity gun
12
Assassin’s Creed (2007) Features heavy use of inverse kinematics
Allows for Parkour / Freerunning
13
Arkham Asylum (2009) Hardware-accelerated PhysX support
Dynamic fog and steam Cloth physics Spark effects
14
From Dust (2011) Use of fluid dynamics to model sand, dust, lava, and water
15
Crysis 3 (2013) Soft particle system Parametric skeletal animation
Multi-threaded physics engine Soft body physics Destructible environments Rope physics
16
Character Animation Forward Kinematics Inverse Kinematics
Ragdoll Physics
17
Forward Kinematics An Example Rotation of base: Rb
Apply M = Rb to base Translate lower arm relative to base: Tla Rotate lower arm around joint: Rla Apply M = Rb Tla Rla to lower arm Translate upper arm relative to upper arm: Tua Rotate upper arm around joint: Rua Apply M = Rb Tla Rla Tua Rua to upper arm
18
Forward Kinematics The Problem
Moving something high in hierarchy moves its children
19
Inverse Kinematics Bottom-up approach More fluid and realistic motion
More intuitive Higher computation cost
20
Inverse Kinematics Implementations Jacobian Solutions
Jacobian Transpose, Jacobian Pseudoinverse, Damped Least Square Rely on Jacobian Matrix Sometimes unstable and fail to converge Cyclic-Coordinate Descent Optimization Solution Simpler to understand and easy to process Loop joints from tip to root trying to get them as close to target as possible
21
Ragdoll Physics Problem:
Canned death animations repetitive, boring, and unrealistic Solution: Ragdoll Physics
22
Ragdoll Physics Implementations Verlet Integration
Series of bones connected at points with simple constraints Inverse Kinematics Post-Processing Play an animation; use IK thereafter Blended Ragdoll Play an animation, but constrain during playback Procedural Animation Agents make decisions that translate to unique movements in real time
23
Ragdoll Physics
24
Particle Systems A technique that uses many small sprites or objects to simulate "fuzzy" phenomena, such as fire, smoke, moving water, etc. Two main types of particle systems Animated Particle Systems Static Particle Systems
25
Animated Particle Systems
Specific points in each particle's life cycle are rendered each frame. Particles may have a fade out time or limited life span. This type of particle system is used to animate effects like fire and precipitation.
26
Static Particle Systems
The entire life cycle of each particle is rendered simultaneously in each frame. Rather that point particles, we have the particle's overall trajectory. This type of particle system is used to animate effects like hair and grass.
27
How Particle Systems Work
A particle system is usually controlled by an emitter. The emitter acts as the source of the particles, i.e. where the particles are generated and where they go. Each emitter has a set of parameters that can be adjusted to change the behaviour and rendering of the particles. Particle life span Particle color / texture Forces acting upon the particles
28
How Particle Systems Work (cont.)
Animation is done in two stages: Simulation Stage Here, new particles that need to be created are calculated based on spawn rates, time intervals, etc. Existing particles have their positions updated or are removed if the end of their life span has been reached. Rendering Stage Here, each particle is rendered according to the calculations done in the previous stage.
29
Particle Systems Next Time
Look at some algorithms used in particle systems Show a few demos
30
Physics in Development Applications -Dan
*
31
Unity Primarily uses PhysX, engine developed by Nvidia.
Effects include: Cloth: Interactive Skinned *
32
Unity Soft Bodies Rigid Bodies
Deformable objects, distances between vertices are not fixed. Limited documentation. Rigid Bodies Objects can receive force, torque, gravity, etc. Main way to apply collisions Supports special colliders such as the “Wheel Collider” *
33
Unity Character rigging:
Supports hinge joints, ball-sockets, character limbs. Ragdoll physics can be enabled through Unity’s premade wizard and applied to Skinned Meshes. *
34
Blender Open-source 3D graphics software. Supports modeling, animation, rendering, and some game- engine functions. Supports a plethora of physics engines. *
35
Blender Bullet Physics:
Directly integrated into Blender. Allows for rigid body simulations. Scripts usually controlled through Python Simulations are typically baked *
36
Blender Phymec: Built off of Bullet engine.
UI tools for Blender still in development. Example of Voronoi Shattering *
37
XNA JellyPhysics by Walaber 2D soft-bodied physics system.
Follows collision of vertices, changes between concave and convex forms. JelloCar! *
38
Next Week How 3rd party engines such as Farseer Physics can work in Unity and XNA Go through brief demo of KEVA engine in Blender *
39
How Physics Engines Work
Simulate Physics Calculations Position, velocity, acceleration, rotation, etc. Real-Time Computed every frame in real time Used in games Low precision, only computes what is necessary High-Precision Not real time Typically used by scientists, animators
40
Optimizing Physics for Games
Rigid Body Dynamics Faster, easier to calculate Brownian Motion Objects outside of scope or at rest on a surface are put to sleep
41
Collision Detection/Response System
Detect collisions and send trigger to system Volumetric Tessellation Simplify 3D meshes by surrounding them with more simple tessellated meshes
42
Collision Detection Works by detecting the moment two or more bodies collide and then applies the correct respective forces
43
Discrete Collision Detection
Predicts the trajectory of the body after the actual collision when meshes are intertwined Causes problems in “fixing step”, bodies may pass through another Continuous Collision Detection Predicts the trajectory of the body before the actual collision
44
Bounding Box Approximation
An enlarged box surrounding current and last position When these boxes collide, the engine will have an approximation for a collision Cheaper than mesh collision
45
Where are Physics engines headed now?
The main limiting factor is the precision and complexity of calculations Faster computer and graphics processors allow games to push the engines further and do more complex simulations Balance precision of calculations with a “perceptually correct” approximation
46
New Physics Effects Soft Body Dynamics Complex Particle Effects
Realistic Fluid Dynamics Real Time Fracturing
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.