Deformable Visual Authoring (Beta)#

This section describes the visual authoring of surface and volume deformable bodies as well as attachments.

Enable Deformable Schema Beta#

By default the new deformable beta widgets are hidden in the UI, even though both the legacy and new schemas/APIs are always available under the hood. To show the beta UI (which also hides the deprecated deformable UI):

  1. Open PreferencesPhysicsGeneral

  2. Check Enable Deformable schema Beta (Requires Restart)

  3. Restart the application

../../_images/deformable_beta_ui.png

Figure 14 Enable Deformable Schema Beta#

Conversion of Deprecated Schemas#

For converting deprecated schemas:

  1. Load the stage that should be converted

  2. Open the Assets Validator

  3. Scroll down to the Omni:Physx section and enable DeformableSchemaChecker

  4. Click on Analyze

  5. Check Asset to be converted

  6. Click on Fix Selected

  7. Close Asset Validator Window, once the Asset turns gray

  8. Inspect and save the stage

../../_images/asset_validator.png

Figure 15 Conversion of Deprecated Deformable Schemas#

Note

A bug might leave visible stray meshes in the viewport. These vanish once the stage is re-loaded.

Deformable Body and Attachment Visualization#

In order to visualize deformable body meshes, rest shape and attachment points:

  1. Select Eye Icon in viewport

  2. Navigate to Show By TypePhysicsDeformables (beta) and check All

../../_images/deformable_body_viz.png

Figure 16 Deformable Body and Attachment Visualization#

Note

The following limitations apply:

  • Element collision filters are not yet visualized.

  • The visualization is not updated at simulation time, if CPU Fabric or GPU Fabric Physics output modes are enabled. The visualization reads data only from USD.

Creating a Deformable Body#

In order to create a volume deformable body from scratch, the following steps are recommended:

  1. Right click and CreateXform

  2. From main menu: CreateMeshSettings which opens the Mesh Settings dialog.

  3. Select a Primitive Type e.g.: Cube

  4. Ctrl left click on U Verts Scale, V Verts Scale, W Verts Scale to adjust the resolution

  5. Press the Create button

  6. Nest the new mesh inside the Xform

    Mesh nest in Xform
  7. Select the Xform in the stage tree, right click and CreatePhysicsDeformable (beta)Volume which opens the Create Volume Deformable Body dialog.

  8. Check the Hexahedral Simulation Mesh if separate collision and simulation meshes are desired.

  9. Press the Create button

Note

It is important to use a source mesh with sufficient resolution to capture the level of deformation expected in the resulting deformable body. Especially if the source mesh is used for rendering the deformable body, too low of a resolution will not display the deformation!

Further the simulation mesh and collision mesh should also have roughly the same resolution, to avoid convergence issues.

The generated meshes can be adjusted by inspecting the Deformable Hexahedral Mesh and Deformable Mesh Simplification sections in the Physics properties on the selected Xform. This is best done while visualizing the simulation and collision meshes in the viewport.

../../_images/mesh_gen_properties.png

Figure 17 Mesh Generation Properties#

Creating a surface deformable body works analogously by opening the Create Surface Deformable Body dialog by selecting the Xform in the stage tree, right clicking and CreatePhysicsDeformable (beta)Surface.

Note

It is sometimes desirable that the mesh (or meshes) used for rendering be different from the mesh employed to generate the simulation and collision meshes. In such cases:

  1. Every render-only mesh should be nested under the Xform (deformable body root).

  2. In the creation dialog, the Source Mesh field should be set to a mesh that is located outside the deformable-body subtree, but which spatially coincides with the render meshes.

If a mesh is available that is suitable for rendering, simulation and collision detection, the simplified Add workflow can be used.

  • For volume deformables this needs to be a UsdGeom.TetMesh.

  • For surface deformables this needs to be a UsdGeom.Mesh limited to triangle faces.

  1. Right click on the Mesh in the stage tree

  2. Select AddPhysicsVolume Deformable Body (beta) or Surface Deformable Body (beta)

Note

The meshes created through the main menu with CreateMeshSettings are built from quads and are therefore not suitable simulation meshes. They are not supported by the Add workflow.

Creating an Attachment#

As an exmple the following steps can be taken:

  1. Create a volume or surface deformable according to the previous section.

  2. Create e.g. a sphere shape: Right click, CreateShapeSphere

  3. Add a collider component to the Sphere: Right click Sphere, AddPhysicsCollider

  4. Position Xform or Sphere so that the Sphere overlaps with the simulation mesh below the Xform

  5. Select both Xform and Sphere, then right click and CreatePhysicsDeformable (beta)Attachment.

../../_images/attachment_prep1.png

Figure 18 Attachment Prerequisites#

The attachment prim with PhysxAutoDeformableAttachmentAPI is created. It’s by default placed inside the deformable body subtree. Its parameters can then be adjusted in the Deformable Attachment (beta) section of the Physics properties of the attachment prim.

../../_images/attachment_properties.png

Figure 19 Attachment Properties#

Note

Positioning the attachables after creation is supported, but requires pressing the Refresh button in the attachment property widget in order to force attachment points recreation.

The attachment properties can be adjusted in the Physics properties of the newly created attachment prim.