set_material
Create or update an OmniPBR material, set color, opacity, roughness, and metallic values, then bind it to a USD prim to control its appearance.
Instructions
Colour a prim with an OmniPBR material: make the material, or update the one at its path, set its colour and surface values, and bind it to the prim in place of its binding.
opacity, roughness and metallic are set on every call, each to its default when left out, so a call without opacity makes the material opaque. Without material_path the material is /World/Looks/_Mat, so prims of the same name share one and colouring one recolours the rest: give material_path to keep them apart, or to share one on purpose. The binding reaches the prim's children unless they have bindings of their own. For friction and bounce, use set_physics_properties; to repoint bindings after materials move, update_material_paths.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"prim_path": "<prim_path>",
"color": "<color>"
},
"name": "set_material"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| color | Yes | [r, g, b] diffuse colour: 0-1 floats (e.g. [1, 0, 0] for red) or 0-255 ints | |
| opacity | No | 0 transparent to 1 opaque | |
| metallic | No | 0 plastic (dielectric) to 1 metal | |
| prim_path | Yes | Full USD path of the prim, e.g. "/World/Robot" | |
| roughness | No | 0 glossy (mirror) to 1 rough (matte) | |
| material_path | No | The material prim's path; made under /World/Looks/ when empty |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |