-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
A number of people and companies have expressed an interest in having a GLTF extension which can describe rigid body physics.
A number of popular physics engines are widely used, each with a differing API and data serialization format. While many concepts between them are the same, there also tends to be significant differences between them as well.
Past efforts to create a standardized physics data definition have ended up with something so watered down that it was of questionable value, or so highly specific to one physics engine, that it could not be easily used by others.
I see the goal of this effort to create a data spec which represents a 'union' of the features of a number of popular physics engines; such that those things which are in common between them use a shared DOM (data object model) and those properties which are unique to each can still be specified and, conceivably, ignored by other physics engines which do not need them.
Even just the concept of a 'physics engine' can be challenging, as the definition can be wide ranging in scope. Some physics engines support soft bodies, particle systems, fluid dynamics, complex machines, and more.
While it would be desirable to support all features for all physics engines, that is probably unrealistic as an initial goal.
I would like to set the phase one goal to simply defining the basic components shared by any rigid body dynamics system; which is largely collision geometries, physical material properties, simulation settings, rigid body settings, collision filtering, and joints.
We should probably identify features that go beyond this, but leave them for future extensions efforts. Future work should also address the specific needs of robots which include cameras, sensors, grippers, transmissions, and a lot complex machine data.
Typically a DOM for a physics engine is similar to the scene graph you would see for rendering data; there are meshes and geometries which can be instanced at different locations and scale and they can be linked together with joints. There may need to be a way to specify a named binding between a physics representation and the visual representation it is associated with. Likely a parallel scene graph which simply describes those bindings will be needed.
The basic components of any rigid body system can be described in the following outline:
- Simulation properties
- Each physics engine defines certain global properties which control how that system performs. Many of these properties tend to be unique for each different physics engine supported. Includes things like gravity, solver iteration count, and other global settings.
- Data Resources (objects with large amounts of binary data)
- Triangle meshes
- Convex Hulls
- Heightfields
- Physics Materials
- Defines physical properties of a material surface, friction, etc.
- Geometries (physical geometric representations for rigid bodies or parts of a compound rigid body)
- Plane
- Box
- Sphere
- Capsule
- Cylinder
- Triangle Mesh
- Convex Hull
- Heightfield
- Rigid Body (can be static, dynamic, or kinematic)
- Each rigid body has one, or more, geometries and their associated unique properties; such as what material to use, what scale, etc.
- A large array of physical properties are associated with each rigid body (mass, inertia tensor etc.)
- Aggregates
- A collection of rigid bodies which can be treated as a single group.
- Joints (a joint is a type of constraint which joins two rigid bodies together)
- Fixed
- Spherical
- Revolute
- Prismatic
- Distance
- D6
- Body Pair Filters
- Defines a sequence of object pairs which should or should not interact in the physics simulation.
- Collision filter logic
- Describes the code/logic for how collision filtering between two rigid bodies should be interpreted.
The initial phase of this project will simply be requirements gathering. We have some graduated students who will be evaluating a number of well known physics engines to understand the data object model requirements for each. Once those are gathered we can try to create a 'union' of these specifications as well as identify engine specific properties. The last phase will be to actually create the schema itself and submit it for review. This process could take weeks to months to complete, and is only starting today.
Physics engines under consideration are:
- PhysX SDK : from NVIDIA
- FLEX SDK : from NVIDIA
- Bullet SDK : (open source by Erwin Coumans)
- Newton physics engine : (open source by Julio Jerez)
- Havok : from Microsoft
- Mujoco : Commercial physics engine, popular within the robotics community