Physics Abstraction Layer

Last updated
Physics Abstraction Layer
Pal logo web.gif
PAL-Wallcollage-small.jpg
Developer(s) sourceforge.net/projects/pal/
Written in C, C++
Operating system Cross-platform
Type Middleware
License Three clause BSD license
Website www.adrianboeing.com/pal/index.html

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.

Open-source software software licensed to ensure source code usage rights

Open-source software (OSS) is a type of computer software in which source code is released under a license in which the copyright holder grants users the rights to study, change, and distribute the software to anyone and for any purpose. Open-source software may be developed in a collaborative public manner. Open-source software is a prominent example of open collaboration.

Physics engine 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. 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.

Contents

PAL is a high-level interface for low-level physics engines used in games, simulation systems, and other 3D applications. It supports a number of dynamic simulation methodologies, including rigid body, liquids, soft body, ragdoll, and vehicle dynamics. PAL features a simple C++ API and intuitive objects (e.g. Solids, Joints, Actuators, Sensors, and Materials). It also features COLLADA, Scythe Physics Editor, and XML-based file storage.

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.

Rigid body dynamics studies the movement of systems of interconnected bodies under the action of external forces; described by the laws of kinematics and by the application of Newtons second law (kinetics) or their derivative form Lagrangian mechanics

Rigid-body dynamics studies the movement of systems of interconnected bodies under the action of external forces. The assumption that the bodies are rigid, which means that they do not deform under the action of applied forces, simplifies the analysis by reducing the parameters that describe the configuration of the system to the translation and rotation of reference frames attached to each body. This excludes bodies that display fluid, highly elastic, and plastic behavior.

Computational fluid dynamics branch of fluid mechanics that uses numerical analysis and data structures to solve and analyze problems that involve fluid flows

Computational fluid dynamics (CFD) is a branch of fluid mechanics that uses numerical analysis and data structures to analyze and solve problems that involve fluid flows. Computers are used to perform the calculations required to simulate the free-stream flow of the fluid, and the interaction of the fluid with surfaces defined by boundary conditions. With high-speed supercomputers, better solutions can be achieved, and are often required to solve the largest and most complex problems. Ongoing research yields software that improves the accuracy and speed of complex simulation scenarios such as transonic or turbulent flows. Initial validation of such software is typically performed using experimental apparatus such as wind tunnels. In addition, previously performed analytical or empirical analysis of a particular problem can be used for comparison. A final validation is often performed using full-scale testing, such as flight tests.

The Physics Abstraction Layer provides a number of benefits over directly using a physics engine:

In software engineering, porting is the process of adapting software for the purpose of achieving some form of execution in a computing environment that is different from the one that a given program was originally designed for. The term is also used when software/hardware is changed to make them usable in different environments.

Middleware computer software that provides services to software applications

Middleware is computer software that provides services to software applications beyond those available from the operating system. It can be described as "software glue".

Scalability

Scalability is the property of a system to handle a growing amount of work by adding resources to the system.

PAL is designed with a pluggable abstract factory allowing code to be written and compiled once and allowing runtime selection of different physics engines, as well as feature upgrades.

Plug-in (computing) software component that adds a specific feature to an existing software application

In computing, a plug-in is a software component that adds a specific feature to an existing computer program. When a program supports plug-ins, it enables customization.

Supported engines

PAL supports multiple physics engines, including:

Box2D 2-dimensional physics simulator engine

Box2D is a free open source 2-dimensional physics simulator engine written in C++ by Erin Catto and published under the zlib license. It has been used in Crayon Physics Deluxe, Limbo, Rolando, Incredibots, Angry Birds, Tiny Wings, Shovel Knight, Transformice, Happy Wheels, and many online Flash games, as well as iPhone, iPad and Android games using the Cocos2d or Moscrif game engine and Corona framework.

Bullet (software) open source physics engine

Bullet is a physics engine which simulates collision detection, soft and rigid body dynamics. It has been used in video games as well as 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, and he now works for Google.

Newton Game Dynamics

Newton Game Dynamics is an open-source physics engine for realistically simulating rigid bodies in games and other real-time applications. Its solver is deterministic and not based on traditional LCP or iterative methods.

Supported file formats

PAL supports multiple file formats, including:

Benchmark

The PAL project provides a set of standard benchmarks allowing developers to directly compare the physics engines and select the engine that provides the best solution in terms of computational efficiency and physical accuracy. Care should be taken when deciding on which engine to actually use though, since engines may be tweaked in ways which PAL doesn't support.

Related Research Articles

Game engine Software-development environment designed for building video games

A game engine is a software-development environment designed for people to build video games. Developers use game engines to construct games for consoles, mobile devices, and personal computers. The core functionality typically provided by a game engine includes a rendering engine ("renderer") for 2D or 3D graphics, a physics engine or collision detection, sound, scripting, animation, artificial intelligence, networking, streaming, memory management, threading, localization support, scene graph, and may include video support for cinematics. Implementers often economize on the process of game development by reusing/adapting, in large part, the same game engine to produce different games or to aid in porting games to multiple platforms.

Hardware abstractions are sets of routines in software that emulate some platform-specific details, giving programs direct access to the hardware resources.

The High-level architecture (HLA) is a standard for distributed simulation, used when building a simulation for a larger purpose by combining (federating) several simulations. The standard was developed in the 90’s under the leadership of the US Department of Defense and was later transitioned to become an open international IEEE standard. It is a recommended standard within NATO through STANAG 4603. Today the HLA is used in a number of domains including defense and security and civilian applications. The architecture specifies the following components.

A database abstraction layer (DBAL) is an application programming interface which unifies the communication between a computer application and databases such as SQL Server, DB2, MySQL, PostgreSQL, Oracle or SQLite. Traditionally, all database vendors provide their own interface tailored to their products, which leaves it to the application programmer to implement code for all database interfaces he or she would like to support. Database abstraction layers reduce the amount of work by providing a consistent API to the developer and hide the database specifics behind this interface as much as possible. There exist many abstraction layers with different interfaces in numerous programming languages. If an application has such a layer built in, it is called database-agnostic.

COLLADA is an interchange file format for interactive 3D applications. It is managed by the nonprofit technology consortium, the Khronos Group, and has been adopted by ISO as a publicly available specification, ISO/PAS 17506.

A user interface markup language is a markup language that renders and describes graphical user interfaces and controls. Many of these markup languages are dialects of XML and are dependent upon a pre-existing scripting language engine, usually a JavaScript engine, for rendering of controls and extra scriptability.

PhysX 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.

Blender Game Engine

The Blender Game Engine is a component of Blender, a free and open-source 3D production suite, used for making real-time interactive content. The game engine was written from scratch in C++ as a mostly independent component, and includes support for features such as Python scripting and OpenAL 3D sound.

An operating system abstraction layer (OSAL) provides an application programming interface (API) to an abstract operating system making it easier and quicker to develop code for multiple software or hardware platforms.

Delta3D

Delta3d is an open source software gaming/simulation engine API. Delta3d is managed and supported by Caper Holdings LLC. Previously the Modeling, Virtual Environments, and Simulation (MOVES) Institute at the Naval Postgraduate School in Monterey, California managed and supported delta3d.[1] Alion Science has also been a major contributor to enhancements and features.

The Speech Application Programming Interface or SAPI is an API developed by Microsoft to allow the use of speech recognition and speech synthesis within Windows applications. To date, a number of versions of the API have been released, which have shipped either as part of a Speech SDK or as part of the Windows OS itself. Applications that use SAPI include Microsoft Office, Microsoft Agent and Microsoft Speech Server.

The Open Physics Abstraction Layer (OPAL) is an open source realtime physics engine API similar to PAL. It is currently supported only by ODE, but can be extended to run off of other engines. OPAL is free software, released under both the LGPL and the BSD license. It was originally designed and written by Tyler Streeter, Andres Reinot, and Alan Fischer while working at Iowa State University's Virtual Reality Applications Center (VRAC).

CEGUI graphical user interface software library for the C++ programming language

Crazy Eddie's GUI (CEGUI) is a graphical user interface (GUI) library for the programming language C++. It was designed for the needs of video games, but is usable for non-game tasks, such as applications and tools. It is designed for user flexibility in look-and-feel, and to be adaptable to the user's choice in tools and operating systems.

Scythe is a free software physics modeling program. It allows the merging of physics and graphics content in one package. It provides native support for modeling the rigid body physics for the Newton Game Dynamics, the Open Dynamics Engine and PhysX engine. The Physics Abstraction Layer also provides support for the Scythe format.

Robotics simulator

A robotics simulator is used to create application for a physical robot without depending on the actual machine, thus saving cost and time. In some case, these applications can be transferred onto the physical robot without modifications.

Java view technologies and frameworks are web-based software libraries that provide the user interface, or "view-layer", of Java web applications. Such application frameworks are used for defining web pages and handling the HTTP requests (clicks) generated by those web pages. As a sub-category of web frameworks, view-layer frameworks often overlap to varying degrees with web frameworks that provide other functionality for Java web applications.

Oak3D

Oak3D is a free JavaScript library for 3D graphics development based on the HTML5 WebGL standard, dedicated in realizing the Web3D applications with GPU acceleration for all the front-end developers in an easy and efficient way.

Advanced Simulation Library hardware accelerated multiphysics simulation platform

Advanced Simulation Library (ASL) is free and open-source hardware-accelerated multiphysics simulation platform. It enables users to write customized numerical solvers in C++ and deploy them on a variety of massively parallel architectures, ranging from inexpensive FPGAs, DSPs and GPUs up to heterogeneous clusters and supercomputers. Its internal computational engine is written in OpenCL and utilizes matrix-free solution techniques. ASL implements variety of modern numerical methods, i.a. level-set method, lattice Boltzmann, immersed Boundary. Mesh-free, immersed boundary approach allows users to move from CAD directly to simulation, reducing pre-processing efforts and amount of potential errors. ASL can be used to model various coupled physical and chemical phenomena, especially in the field of computational fluid dynamics. It is distributed under the free GNU Affero General Public License with an optional commercial license.

SceneKit, sometimes rendered Scene Kit, is a 3D graphics application programming interface (API) for Apple Inc. platforms written in Objective-C. It is a high-level framework designed to provide an easy-to-use layer over the lower level APIs like OpenGL and Metal. SceneKit maintains an object based scene graph, along with a physics engine, particle system, and links to Core Animation and other frameworks to easily animate that display. SceneKit views can be mixed with other views, for instance, allowing a SpriteKit 2D display to be mapped onto the surface of an object in SceneKit, or a UIBezierPath from Core Graphics to define the geometry of a SceneKit object. SceneKit also supports import and export of 3D scenes using the COLLADA format. SceneKit was first released for macOS in 2012, and iOS in 2014.

NativeScript

NativeScript is an open-source framework to develop apps on the Apple iOS and Android platforms. It was originally conceived and developed by Progress. NativeScript apps are built using JavaScript, or by using any language that transpiles to JavaScript, such as TypeScript. NativeScript supports the Angular and Vue JavaScript frameworks. Mobile applications built with NativeScript result in fully native apps, which use the same APIs as if they were developed in Xcode or Android Studio. Additionally, software developers can re-purpose third-party libraries from CocoaPods, Android Arsenal, Maven, and npm.js in their mobile applications without the need for wrappers.

References