Skip to content

[Proposal] Support Kit-less Deformable USD #6142

Closed

Description

@YizeWang

Proposal

Make scripts/demos/deformables.py --visualizer newton work with the default PhysX deformable scene by fixing the Newton shadow-model import path for PhysX-authored deformable USD.

Motivation

The command:

./isaaclab.sh -p scripts/demos/deformables.py --visualizer newton

uses PhysX physics by default and requests the Newton visualizer. PhysX deformables initialize, but the Newton visualizer then asks NewtonManager to build a shadow Newton model from the USD stage.

That shadow-model build fails in ModelBuilder.add_usd() while parsing a UsdGeom.TetMesh. Isaac Lab authors deformable pose metadata in source/isaaclab/isaaclab/sim/schemas/schemas.py:

deformablePose:default:omniphysics:purposes = ["bindPose"]

Newton's USD importer reads non-schema TetMesh attributes into custom_attributes. deformablePose:default:omniphysics:purposes is metadata, not simulation mesh data, but Newton currently treats it as a generic TetMesh custom attribute. Its length is 1, which is not per-vertex, per-tetrahedron, or per-triangle, so Newton raises:

ValueError: Cannot infer frequency for custom attribute 'deformablePose:default:omniphysics:purposes'

NewtonManager._ensure_visualization_model() logs the failure and leaves the model unset. The Newton viewer then calls set_visible_worlds() without a model and raises:

RuntimeError: Model must be set before calling set_visible_worlds()

The texture download errors and PhysX surface deformable warnings appear earlier but are not the root cause of this crash.

Root Cause

Newton visualizer support for a PhysX-backed scene depends on a shadow Newton model. For deformables, that shadow model is rebuilt from USD:

NewtonVisualizer.initialize()
  -> NewtonManager.get_model()
  -> NewtonManager._ensure_visualization_model()
  -> NewtonManager._build_visualization_model_from_stage()
  -> ModelBuilder.add_usd()
  -> newton usd.get_tetmesh()
  -> TetMesh(custom_attributes=...)

The failure happens before the viewer has a model. The final set_visible_worlds() exception is secondary; it only appears because NewtonManager._ensure_visualization_model() logged the import exception and returned with NewtonManager._model still unset.

Alternatives

  • Teach Newton USD import to ignore OmniPhysics deformable metadata such as deformablePose:* when building TetMesh custom attributes.
  • Import metadata-like TetMesh attributes with an explicit non-geometry frequency or side-channel if Newton wants to preserve them.
  • Add a defensive visualizer error path so shadow-model build failures report the real USD import error instead of later failing in set_visible_worlds().

Build Info

Additional context

Failure path:

sim.reset()
  -> SimulationContext.initialize_visualizers()
  -> NewtonVisualizer.initialize()
  -> NewtonManager.get_model()
  -> _build_visualization_model_from_stage()
  -> ModelBuilder.add_usd()
  -> newton usd.get_tetmesh()
  -> TetMesh._infer_frequency()

Observed root exception:

ValueError: Cannot infer frequency for custom attribute 'deformablePose:default:omniphysics:purposes': array length 1 matches none of vertex_count (...), tet_count (...), tri_count (...).

Checklist

  • I have checked that there is no similar issue in the repo (required)

Acceptance Criteria

  • deformables.py --visualizer newton initializes the Newton visualizer for the default PhysX deformable scene.
  • Newton USD import handles deformablePose:default:omniphysics:purposes without treating it as per-vertex, per-tet, or per-triangle TetMesh data.
  • Shadow-model build failures, if any remain, report the original import failure and do not cascade into Model must be set before calling set_visible_worlds().

Activity

  1. AntoineRichard commented on Jun 12, 2026

    @AntoineRichard
    Collaborator

    @mmichelis if you have some time, could you give your opinion on this?

  2. mmichelis commented on Jun 12, 2026

    @mmichelis
    Contributor

    Yes this is is planned to be fixed once we have Newton parsing deformables from USD (newton-physics/newton#3038). The same issue exists for cloths. Our current workaround is through the deformable registry, but physx does not use this to create a Newton shadow-model since the ideal scenario is to create USD stages and both Newton and Kit can read these. I think raising an error in the demo when an invalid backend-visualizer combination is picked is the best we can do for now.

  3. added
    enhancement
    on Jun 15, 2026
  4. hujc7 commented on Nov 2, 2026

    @hujc7
    Collaborator

    Thanks @YizeWang for the precise trace through the TetMesh import.

    On current main, examples/deformables.py --physics isaacsim_physx --visualizer newton_gl initializes the Newton viewer and runs with PhysX deformables: Newton's USD importer now skips TetMesh custom attributes whose frequency it cannot infer instead of raising, so the shadow-model build no longer fails. Please reopen if it still fails for you on a current release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions