› cavi-ai/
GitHub ↗

Materials and UVs

assign_material binds a PBR material to exact mesh slots and packs bounded workspace PNG or JPEG maps.

Inputs

ParameterPurpose
names1–32 unique mesh names
material_nameNew or existing material name
base_color_texture, base_colorsRGB base color map or scalar RGBA
normal_texture, normal_strengthNon-Color normal map and strength
roughness_texture, roughnessNon-Color map or scalar
metallic_texture, metallicNon-Color map or scalar
emission_texture, emission_strengthsRGB emission map and strength
alpha_texture, alpha_modeNon-Color alpha map and opaque, clip or blend mode
uv_scale, uv_offset, uv_rotation_degreesOne Mapping node for all maps
update_existingEdit a material created by this tool and bound to the slot
slotMaterial slot 0–31

Base color and emission use sRGB. Normal, roughness, metallic and alpha use Non-Color.

Requirements

  • Meshes need single-user data.
  • Textured assignment needs an existing UV layer.
  • Each image is at most 16 MiB and 4096². The combined budget is 32 million

pixels.

  • The requested slot must exist, unless it is slot 0 on a mesh with no slots.

Updating

update_existing=true preserves unspecified settings and replaces supplied maps. The material must carry this tool's configuration tag and must be bound to the requested slot. Untagged materials are refused, and maps cannot be removed.

Verification

Run inspect_mesh_quality with checks=["materials"]. It reports PBR bindings, expected color spaces, packed state, resolution consistency, unsupported graph state and UV transforms.

Run review_sheet with mode="uv_checker" to inspect UV layout visually, or mode="texel_heatmap" to see faces below, on and above a target density.