Physics#

The Omniverse Unity Connector allows Physics data to be exported to USD.

Physics export is supported in the following areas:

Note

The ability to import USD Physics data into Unity has yet to be implemented.

Rigidbodies and Colliders#

Rigidbodies and Colliders are available as essential functions of Physics.

Specifying only the Collider as a component results in an immovable collision.
Collider.
Rigidbody was added to the component to make it subject to external forces, including gravity.
Rigidbody.
Play in the Unity Editor to see the physics in action.
Play physics animation.

Export#

Select [Omniverse]-[Settings] in the menu and check the “Export Physics” checkbox to export physics information when exporting USD. Physics Export are enabled by default.

Export Physics in Settings.
Select [Omniverse]-Export from the menu to export the USD file.

Rigidbody Kinematics#

Check the “Is Kinematic” checkbox for the Rigidbody component to make it a rigid body that can be manipulated.
Is Kinematic.
* Rigidbodies using Kinematics are unaffected by gravity or external forces.
* This can be animated or programmatically controlled to give force to other shapes that have colliders.
* This Kinematic specification is also reflected in the USD export.

Rigidbody nesting is not supported#

Rigidbody usage in USD Physics does not allow hierarchical assignment of the Rigidbody. In the following hierarchy, Rigidbody is nested, showing the unsupported setup.

Nested Rigidbodies.
In this case, playing with USD Composer will result in an incorrect simulation.

The hierarchy of GameObjects with Rigidbody should be replaced so they are not nested. This is the supported and correct way to set up RigidBody Physics.

Place Rigidbodies flat.

Note

The same rules for this Rigidbody specification are used for Physics Joint and ArticulationBody.

About Exporting Colliders#

Unity Collider types are translated into USD types as follows:

Collider Type in Unity

Collider Approximation in USD

SphereCollider

Bounding Sphere

BoxCollider

Convex Decomposition

CapsuleCollider

Convex Decomposition

MeshCollider (Do not use convex)

Triangle Mesh

MeshCollider (Use convex)

Convex Hull

Others

Convex Hull

BoxCollider and CapsuleCollider in Unity can be resized. When resized, there is no corresponding option in USD. As a substitute, Convex Decomposition is specified for USD at export time. If you want to explicitly give it a Convex Hull, use the Mesh Collider in Unity.