Skip to content

llSetRenderMaterial

void llSetRenderMaterial(string Material, integer Face)

Applies Render Material to Face of prim.

Render Material may be a UUID or name of a material in prim inventory.

If Face is ALL_SIDES, set the render material on all faces.

Parameters
Material (string)
Face (integer)
default
{
state_entry()
{
// the first material alphabetically inside the same prim's inventory
string material = llGetInventoryName(INVENTORY_MATERIAL, 0);
// set it on all sides of the prim containing the script
llSetRenderMaterial(material, ALL_SIDES);
}
}
  • If material is provided as NULL_KEY, the glTF Material is removed from the face, reverting back to any underlying Blinn-Phong materials.
  • This function will clear most PRIM_GLTF_* properties on the face, with the exceptions of repeats, offsets, and rotation_in_radians.