# llSetRenderMaterial

*LSL function*

```lsl
void llSetRenderMaterial(string material, integer face);
```

- `string material`: Name of a material in the prim's inventory, or a UUID.
- `integer face`: Face number or ALL_SIDES.

- Delay: 0.2 s
- Energy: 10

Sets the **material** of this prim's **face**. This function will clear most [PRIM_GLTF\_\*](https://wiki.secondlife.com/wiki/LlSetPrimitiveParams) properties on the face, with the exceptions of repeats, offsets, and rotation_in_radians.

```lsl title="How to use" frame="terminal"
llSetRenderMaterial("", 0);
```

## Caveats

- If **material** is provided as [NULL_KEY](/constants/NULL_KEY/), the [glTF Material](https://wiki.secondlife.com/wiki/PBR_Materials) is removed from **face**, reverting back to any underlying [Blinn-Phong](https://wiki.secondlife.com/wiki/PBR_Materials#nomenclature-changes) materials.

## Examples

<details open>
<summary>Example 1</summary>

```lsl
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);
    }
}
```

</details>

## See also

### Functions

- [llSetLinkRenderMaterial](/functions/llSetLinkRenderMaterial/) — [PRIM_RENDER_MATERIAL](/constants/PRIM_RENDER_MATERIAL/)
- [llGetRenderMaterial](/functions/llGetRenderMaterial/)

---

*Source: [LlSetRenderMaterial](https://wiki.secondlife.com/wiki/LlSetRenderMaterial) on the Second Life Wiki. Content from the Second Life Wiki articles LlSetRenderMaterial (revision 1218987, 2026-08-24), Template:LSL Function/face (revision 1175878, 2013-01-06) and Template:LSL Function/inventory (revision 1191151, 2014-06-07), CC BY-SA 3.0.*

---

From lsl.dev: https://lsl.dev/functions/llSetRenderMaterial/
