Physics engine:
Introduction:
A physics engine is a piece of computer software used in the fields of computer graphics, video games, and movies that approximates the simulation of specific physical systems, including rigid body dynamics (including collision detection), soft body dynamics, and fluid dynamics (CGI). Their primary applications are in video games, where the simulations take place in real time (usually as middleware). Sometimes the phrase is used in a broader sense to refer to any software program that simulates physical phenomena, including high-performance scientific simulation.
Description:
a. Scientific engines:
ENIAC, one of the original general-purpose computers, served as a very basic physics engine. The United States military utilized it to create ballistics tables to estimate where artillery shells of various masses would land when fired at various angles and gunpowder charges, taking wind drift into consideration. The artillery commanders received printed tables with the results that were tallied once and only then.
Computational fluid dynamics modeling, in which particles are assigned force vectors that are coupled to illustrate circulation, has been a widespread practice on supercomputers since the 1980s. Calculations are accelerated by special computer processors called vector processors since they must be quick and precise. The methods can be applied to the modeling of weather patterns for weather forecasting, the design of racecars and other motor vehicles using wind tunnel data, and the thermal cooling of computer processors to enhance heat sinks.The resolution of the simulation and the accuracy of the calculations are related to the accuracy of the simulation, as is the case with many calculation-intensive computing processes; tiny variations that are not captured in the simulation can significantly alter the anticipated results.
The performance of new tire tread types under dry and wet conditions, with new tire materials of varying flexibility, and under various weight loading levels are investigated by tire makers using physics models.
b. Game engines:
The majority of computer games prioritize playability and processor performance over simulation accuracy. This results in ideas for physics engines that produce results in real-time but only roughly approximate real-world physics in simple circumstances. Instead of being a true simulation, the simulation is frequently designed to deliver a "perceptually correct" approximation. However, other game engines, like Source, include physics into puzzles and combat. This calls for more precise physics so that, for instance, the momentum of an object can topple an obstruction or lift an object that is sinking.
Since rigid body dynamics are quicker and simpler to calculate, physically based character animation has historically only employed them; however, more recent video games and motion pictures are beginning to incorporate soft body physics. Particle effects, liquids, and clothing all make advantage of soft body physics. It is occasionally possible to model water and other liquids, as well as the movement of fire and explosions in the air, using a rudimentary sort of fluid dynamics simulation.
In video games, objects communicate with the player, their surroundings, and other objects. The majority of 3D objects in video games are often represented by two distinct meshes or forms. One of these meshes is the intricately detailed shape that the player sees while playing the game, such as a vase with tasteful curving and looped handles. The physics engine is given the representation of the object by a second, faster invisible mesh, which treats the example vase as a straightforward cylinder. Therefore, since the physics engine model is built on the cylinder and is blind to the handles, it would be impossible to insert a rod or discharge a projectile via the handle holes on the vase.The collision geometry is a common name for the condensed mesh that is utilized for physics processing. This could be a convex hull, sphere, or bounding box. The most basic collision detection engines are those that use bounding spheres or boxes as the final shape. Before expensive mesh on mesh collision detection is performed in the narrow phase of collision detection, a bounding box is typically employed in the broad phase of collision detection to reduce the number of potential collisions.
The framerate, or the number of times per second when physics is calculated, is another factor in discrete collision detection precision. The distance between frames is not determined; instead, each frame is processed independently from every other frame. A small fast-moving object with a low framerate result in a situation where the object does not move through space smoothly but instead appears to teleport from one position in space to another as each frame is computed. If the target is tiny enough to fit in the space between the fast traveling projectile's computed frames, projectiles moving at sufficiently high speeds will miss the target.A number of methods are employed to get around this problem, such as Second Life's implementation of projectiles as arrows with invisible tails that are longer than the predicted frame gap and can collide with any item that might fit in between them. Continuous collision detection, like that found in Bullet or Havok, does not have this issue.
c. Dynamics of soft bodies:
Use of a finite element-based rigid body physics system is an alternative to bounding box-based rigid body physics systems. A 3-dimensional, volumetric tessellation of the 3-dimensional object is produced in such a system. Numerous finite elements that reflect various facets of the object's physical characteristics, such as toughness, plasticity, and volume preservation, are produced as a result of the tessellation. After being built, a solver applies the finite elements to model the tension within the 3D object. With a high level of uniqueness and realism, the stress can be employed to generate fracture, deformation, and other physical effects.The engine becomes more capable of simulating physical behavior as the number of modeled elements rises. A deformation shader running on the CPU or GPU is used by the finite element system to change the visual representation of the 3D object. Due to the performance overhead and the absence of tools to construct finite element representations out of 3D art assets, finite element-based solutions had previously been impracticable for use in video games.Real-time finite element systems first appeared in Star Wars: The Force Unleashed, which used Digital Molecular Matter to simulate the deformation and annihilation of wood, steel, flesh, and plants using an algorithm created by Dr. James O'Brien as part of his PhD thesis. As faster processors and tools for creating volumetric tessellations became available, real-time finite element systems started to be used in games.
d. Brownian movement:
Real-world physics is constantly in play. All particles in our cosmos experience a constant Brownian motion jitter as a result of the forces pushing back and forth against one another. Such continuous active precision is a waste of CPU power for a game's physics engine, which can result in issues like slowed framerate. Thus, by turning off the physics computation for objects that haven't travelled a given distance in a predetermined amount of time, games can put things to "sleep."For instance, in the 3D virtual world Second Life, the physics calculations are turned off for an object that is laying on the floor and does not move more than a minimal distance in around two seconds. As a result, the object is frozen in place. After colliding with another active physical object, the object remains frozen until physics processing is reactivated for it.
e. Paradigms:
A collision detection/collision response system and a dynamics simulation component that resolves the forces impacting the simulated objects are the two main parts of physics engines used in video games. Additionally, contemporary physics engines could include tools for asset integration, fluid simulations, and animation control systems. Three main paradigms are used to physically simulate solids:
ü Penalties involve interactions that are frequently represented by mass-spring systems. Popular for deformable or soft-body physics, this kind of engine.
ü Constraint-based techniques, in which physical laws are estimated by solving constraint equations.
ü Methods based on impulses that use impulses to drive object interactions.
Finally, hybrid approaches that incorporate elements of the aforementioned paradigms are conceivable.
Comments
Post a Comment