Game physics

Last updated

Computer animation physics or game physics are laws of physics as they are defined within a simulation or video game, and the programming logic used to implement these laws. Game physics vary greatly in their degree of similarity to real-world physics. Sometimes, the physics of a game may be designed to mimic the physics of the real world as accurately as is feasible, in order to appear realistic to the player or observer. In other cases, games may intentionally deviate from actual physics for gameplay purposes. Common examples in platform games include the ability to start moving horizontally or change direction in mid-air and the double jump ability found in some games. Setting the values of physical parameters, such as the amount of gravity present, is also a part of defining the game physics of a particular game.

Contents

There are several elements that form components of simulation physics including the physics engine, program code that is used to simulate Newtonian physics within the environment, and collision detection, used to solve the problem of determining when any two or more physical objects in the environment cross each other's path.

Physics simulations

There are two central types of physics simulations: rigid body and soft-body simulators. In a rigid body simulation objects are grouped into categories based on how they should interact and are less performance intensive. Soft-body physics involves simulating individual sections of each object such that it behaves in a more realistic way. [1]

Particle systems

A common aspect of computer games that model some type of conflict is the explosion. Early computer games used the simple expedient of repeating the same explosion in each circumstance. However, in the real world an explosion can vary depending on the terrain, altitude of the explosion, and the type of solid bodies being impacted. Depending on the processing power available, the effects of the explosion can be modeled as the split and shattered components propelled by the expanding gas. This is modelled by means of a particle system simulation. A particle system model allows a variety of other physical phenomena to be simulated, including smoke, moving water, precipitation, and so forth. The individual particles within the system are modelled using the other elements of the physics simulation rules, with the limitation that the number of particles that can be simulated is restricted by the computing power of the hardware. Thus explosions may need to be modelled as a small set of large particles, rather than the more accurate huge number of fine particles. [2]

Ragdoll physics

This is a procedural animation and simulation technique to display the movement of a character when killed. It treats the character's body as a series of rigid bones connected together with hinges at the joints. The simulation models what happens to the body as it collapses to the ground. More sophisticated physics models of creature movement and collision interactions require greater level of computing power and a more accurate simulation of solids, liquids, and hydrodynamics. The modelled articulated systems can then reproduce the effects of skeleton, muscles, tendons, and other physiological components. [3] Some games, such as Boneworks and Half-Life 2, apply forces to individual joints that allow ragdolls to move and behave like humanoids with fully procedural animations. This allows to, for example, knock an enemy down or grab each individual joint and move it around and the physics-based animation would adapt accordingly, which wouldn't be possible with conventional means. This method is called active ragdolls and is often used in combination with inverse kinematics.

Projectiles

Projectiles, such as arrows or bullets, often travel at very high speeds. This creates problems with collisions - sometimes the projectile travels so fast that it simply goes past a thin object without ever detecting that it has collided with it. Before, this was solved with ray-casting, which does not require the creation of a physical projectile. However, simply shooting a ray in the direction that the weapon is aiming at is not particularly realistic, which is why modern games often create a physical projectile that can be affected by gravity and other forces. This projectile uses a form of continuous collision detection to make sure that the above-stated problem will not occur (at the cost of inferior performance), since more complex calculations are required to perform such a task.

Games such as FIFA 14 require accurate projectile physics for objects such as the soccer ball. In FIFA 14, developers were required to fix code related to the drag coefficient which was inaccurate in previous games, leading to a much more realistic simulation of a real ball. [4]

Books

See also

Related Research Articles

Collision detection is the computational problem of detecting the intersection of two or more objects. Collision detection is a classic issue of computational geometry and has applications in various computing fields, primarily in computer graphics, computer games, computer simulations, robotics and computational physics. Collision detection algorithms can be divided into operating on 2D and 3D objects.

<span class="mw-page-title-main">Particle system</span> Technique in game physics, motion graphics and computer graphics

A particle system is a technique in game physics, motion graphics, and computer graphics that uses many minute sprites, 3D models, or other graphic objects to simulate certain kinds of "fuzzy" phenomena, which are otherwise very hard to reproduce with conventional rendering techniques – usually highly chaotic systems, natural phenomena, or processes caused by chemical reactions.

<span class="mw-page-title-main">LS-DYNA</span>

LS-DYNA is an advanced general-purpose multiphysics simulation software package developed by the former Livermore Software Technology Corporation (LSTC), which was acquired by Ansys in 2019. While the package continues to contain more and more possibilities for the calculation of many complex, real world problems, its origins and core-competency lie in highly nonlinear transient dynamic finite element analysis (FEA) using explicit time integration. LS-DYNA is used by the automobile, aerospace, construction and civil engineering, military, manufacturing, and bioengineering industries.

Dynamical simulation, in computational physics, is the simulation of systems of objects that are free to move, usually in three dimensions according to Newton's laws of dynamics, or approximations thereof. Dynamical simulation is used in computer animation to assist animators to produce realistic motion, in industrial design, and in video games. Body movement is calculated using time integration methods.

<span class="mw-page-title-main">Ragdoll physics</span> Type of procedural animation used by physics engines

Ragdoll physics is a type of procedural animation used by physics engines, which is often used as a replacement for traditional static death animations in video games and animated films. As computers increased in power, it became possible to do limited real-time physical simulations, which made death animations more realistic.

<span class="mw-page-title-main">Havok (software)</span> Video game middleware

Havok is a middleware software suite developed by the Irish company Havok. Havok provides a physics engine component and related functions to video games.

<span class="mw-page-title-main">Crowd simulation</span> Model of movement

Crowd simulation is the process of simulating the movement of a large number of entities or characters. It is commonly used to create virtual scenes for visual media like films and video games, and is also used in crisis training, architecture and urban planning, and evacuation simulation.

<span class="mw-page-title-main">Physics engine</span> Software for approximate simulation of physical systems

A physics engine is computer software that provides an approximate simulation of certain physical systems, such as rigid body dynamics, soft body dynamics, and fluid dynamics, of use in the domains of computer graphics, video games and film (CGI). Their main uses are in video games, in which case the simulations are in real-time. The term is sometimes used more generally to describe any software system for simulating physical phenomena, such as high-performance scientific simulation.

A physics processing unit (PPU) is a dedicated microprocessor designed to handle the calculations of physics, especially in the physics engine of video games. It is an example of hardware acceleration.

<span class="mw-page-title-main">PhysX</span> Realtime physics engine software

PhysX is an open-source realtime physics engine middleware SDK developed by Nvidia as a part of Nvidia GameWorks software suite.

<span class="mw-page-title-main">Procedural animation</span> Type of computer animation

A procedural animation is a type of computer animation used to automatically generate animation in real-time to allow for a more diverse series of actions than would otherwise be tedious using predefined animations.

Reactor is a physics engine developed by the Irish software company Havok for use in Autodesk 3ds Max. Reactor was fully integrated with 3ds Max from versions 5 to 2011. In 3ds Max 2012, Reactor was replaced by a PhysX-based engine called MassFX. Reactor was often used for realistic physics simulation that would be difficult or time-consuming to animate by hand.

<span class="mw-page-title-main">Bullet (software)</span>

Bullet is a physics engine which simulates collision detection as well as soft and rigid body dynamics. It has been used in video games and for visual effects in movies. Erwin Coumans, its main author, won a Scientific and Technical Academy Award for his work on Bullet. He worked for Sony Computer Entertainment US R&D from 2003 until 2010, for AMD until 2014, for Google until 2022 and he now works for Nvidia.

<span class="mw-page-title-main">Soft-body dynamics</span> Computer graphics simulation of deformable objects

Soft-body dynamics is a field of computer graphics that focuses on visually realistic physical simulations of the motion and properties of deformable objects. The applications are mostly in video games and films. Unlike in simulation of rigid bodies, the shape of soft bodies can change, meaning that the relative distance of two points on the object is not fixed. While the relative distances of points are not fixed, the body is expected to retain its shape to some degree. The scope of soft body dynamics is quite broad, including simulation of soft organic materials such as muscle, fat, hair and vegetation, as well as other deformable materials such as clothing and fabric. Generally, these methods only provide visually plausible emulations rather than accurate scientific/engineering simulations, though there is some crossover with scientific methods, particularly in the case of finite element simulations. Several physics engines currently provide software for soft-body simulation.

<span class="mw-page-title-main">Tokamak (software)</span> Open-source physics engine

The Tokamak Game Physics SDK is an open-source physics engine.

<span class="mw-page-title-main">Physics Abstraction Layer</span>

The Physics Abstraction Layer (PAL) is an open-source cross-platform physical simulation API abstraction system. It is similar to a physics engine wrapper, however it is far more flexible providing extended abilities. PAL is free software, released under the BSD license.

Euphoria is a game animation middleware created by NaturalMotion based on Dynamic Motion Synthesis, NaturalMotion's proprietary technology for animating 3D characters on-the-fly "based on a full simulation of the 3D character, including body, muscles and motor nervous system". Instead of using predefined animations, the characters' actions and reactions are synthesized in real-time; they are different every time, even when replaying the same scene. While it is common for current video games to use limp "ragdolls" for animations generated on the fly, Euphoria employed a more complex method to animate the entirety of physically bound objects within the game environment. The engine was to be used in an Indiana Jones game that was later cancelled. According to its web site, Euphoria ran on the Microsoft Windows, OS X, Linux, PlayStation 3, PlayStation 4, Xbox 360, Xbox One, iOS and Android platforms and was compatible with all commercial physics engines.

<span class="mw-page-title-main">Phyz</span>

Phyz is a public domain, 2.5D physics engine with built-in editor and DirectX graphics and sound. In contrast to most other real-time physics engines, it is vertex based and stochastic. Its integrator is based on a SIMD-enabled assembly version of the Mersenne Twister random number generator, instead of traditional LCP or iterative methods, allowing simulation of large numbers of micro objects with Brownian motion and macro effects such as object resonance and deformation.

Vortex Studio is a simulation software platform that is developed by CM Labs Simulations. It features a real-time physics engine that simulates rigid body dynamics, collision detection, contact determination, and dynamic reactions. It also contains model import and preparation tools, an image generator, and networking tools for distributed simulation, accessed through a desktop editor via a GUI. Vortex adds accurate physical motion and interactions to objects in visual-simulation applications for operator training, mission planning, product concept validation, heavy machinery and robotics design and testing, haptics devices, immersive and virtual reality (VR) environments.

Physically based animation is an area of interest within computer graphics concerned with the simulation of physically plausible behaviors at interactive rates. Advances in physically based animation are often motivated by the need to include complex, physically inspired behaviors in video games, interactive simulations, and movies. Although off-line simulation methods exist to solve most all of the problems studied in physically-based animation, these methods are intended for applications that necessitate physical accuracy and slow, detailed computations. In contrast to methods common in offline simulation, techniques in physically based animation are concerned with physical plausibility, numerical stability, and visual appeal over physical accuracy. Physically based animation is often limited to loose approximations of physical behaviors because of the strict time constraints imposed by interactive applications. The target frame rate for interactive applications such as games and simulations is often 25-60 hertz, with only a small fraction of the time allotted to an individual frame remaining for physical simulation. Simplified models of physical behaviors are generally preferred if they are more efficient, easier to accelerate, or satisfy desirable mathematical properties. Fine details are not important when the overriding goal of a visualization is aesthetic appeal or the maintenance of player immersion since these details are often difficult for humans to notice or are otherwise impossible to distinguish at human scales.

References

  1. Reilly, Luke (30 September 2013). "The Most Impressive Physics Engine You've Never Seen". IGN . Retrieved 1 December 2013.
  2. van der Burg, John (23 June 2000). "Building an Advanced Particle System". Gamasutra. Retrieved 1 December 2013.
  3. Brown, Eric (29 January 2009). "Ragdoll Physics On The DS". Gamasutra. Retrieved 1 December 2013.
  4. Chiaet, Julianne (27 September 2013). "Getting on the Ball: How the FIFA 14 Soccer Video Game Finally Got Its Physics Right". Scientific American. Retrieved 6 March 2018.