assign_material
Applies curated PBR materials to Rhino objects and writes material and structural metadata for downstream Unreal/Datasmith pipelines, with optional render material and metadata toggles.
Instructions
Assigns a curated PBR material to Rhino objects and stamps them with machine-readable material metadata for downstream pipelines (Unreal).
For structural members, also declare what the object IS in construction terms: structural_role (e.g. "joist", "girder", "stud", "truss_chord") and construction_system (a system_id from get_construction_guidance). These are written as almond:structural_role / almond:construction_system user text on the objects, so the stated construction intent lives on the Rhino geometry itself and survives export. If the chosen material_id is not a typical finish for the declared system, the response carries a warning (it still applies).
Two effects, independently switchable:
apply_render_material: creates/reuses a physically-based Rhino material (ALMOND::<material_id>) and assigns it per object, so GLB export (publish_to_chestnut) and Datasmith carry real PBR channels.
attach_metadata: writes almond:* user-text keys (material_id, name, category, ue_material_slot, base_color, metallic, roughness, opacity) on each object - Datasmith imports these as asset metadata in Unreal, so materials can be remapped by ue_material_slot deterministically.
Works on breps, meshes, and block instances (an instance's material applies to definition geometry set to 'by parent'; the metadata is always attached to the instance itself). Call list_materials first to discover material_ids.
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": {
"guids": "<guids>",
"material_id": "<material_id>"
},
"name": "assign_material"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| guids | Yes | ||
| material_id | Yes | ||
| attach_metadata | No | ||
| structural_role | No | ||
| construction_system | No | ||
| apply_render_material | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |