Binding materials

From NVIDIA-Omniverse/ovrtx · View interactive version

Binding materials is an AI agent skill from the GitHub repository NVIDIA-Omniverse/ovrtx. Binding materials to prims at runtime. Use when user asks to assign a material, change a material, set material binding, or swap materials on a prim.

How to use this skill

Skill file

Binding Materials

When to Use

Use this skill when the user asks to assign a material, change a material, set material binding, or swap materials on a prim.

Inputs

Resolve inputs in this order: existing repository files and referenced snippets, explicit user request, then broader agent context.

Prerequisites

Instructions

  1. Identify the geometry prims, target material prim, target language, and whether the bind happens in USD or through runtime APIs.
  2. Read the matching Python or C/C++ source snippet before writing API usage.
  3. Write the standard USD material:binding relationship on the geometry prim, using path-array helpers where required.
  4. Keep material binding separate from sensor label authoring; combine with nonvisual-materials only when the request includes sensor material semantics.
  5. When changing code, run the narrow docs test or example that owns the snippet whenever practical.

Output Format

Scripts

This skill has no scripts.

Limitations

Overview

To change which material is applied to a prim at runtime, write the material:binding attribute as a path string pointing to the target material prim. In USD, material:binding is a relationship (array of paths), so use write_array_attribute() in Python or ovrtx_set_path_attributes() in C.

The material prim must already exist in the stage (e.g., loaded from USD). You write the absolute prim path of the material to the geometry prim that should receive it.

Python

Bind a material to a prim

Source: tests/docs/python/test_base.py snippet doc-bind-material

C

Bind a material to a prim

Source: tests/docs/c/test_base.cpp snippet doc-bind-material-c

Key Types / Functions

| Python | C |

|--------|---|

| renderer.write_array_attribute(prim_paths, "material:binding", [["/path/to/material"]]) | ovrtx_set_path_attributes(renderer, &prim_path, 1, "material:binding", &material_path) |

Troubleshooting

References

ParticleField authoring

Source: tests/docs/usd/test_gaussian_splats_usda.py snippet doc-gaussian-sh-diffuse-python

See docs/geometry/gaussian_splats.rst for mode restrictions and material behavior.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.