# llGetRenderMaterial

*LSL function*

```lsl
string string llGetRenderMaterial(integer face);
```

- `integer face`: Face number or ALL_SIDES.

- Returns: `string`
- Energy: 10

If the Material is in the prim's inventory, the return value is the inventory name, otherwise the returned value is the Material [UUID](https://wiki.secondlife.com/wiki/UUID).

Returns a [string](https://wiki.secondlife.com/wiki/string) that is the Material on **face**

```lsl title="How to use" frame="terminal"
string result = llGetRenderMaterial(0);
```

## Caveats

[NULL_KEY](/constants/NULL_KEY/)

is returned when the [owner](https://wiki.secondlife.com/wiki/Category:LSL_Owner) does not have [full permissions](https://wiki.secondlife.com/wiki/Category:LSL_Permissions/Asset) to the object and the Material is not in the prim's inventory.

## Examples

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

```lsl
//Tells (on chat) the Material keys / Material names on 6 sides
default
{
    state_entry()
    {
        integer i = 0;
        integer max = llGetNumberOfSides();
        while(i < max)
        {
            llSay(0,"Side " + (string)i + " Material is: " + (string)llGetRenderMaterial(i));
            ++i;
        }
    }
}
```

</details>

## See also

### Functions

- [PrimitiveParams](https://wiki.secondlife.com/wiki/Category:LSL_PrimitiveParams) — [PRIM_RENDER_MATERIAL](/constants/PRIM_RENDER_MATERIAL/)
- [llSetRenderMaterial](/functions/llSetRenderMaterial/)
- [llSetLinkRenderMaterial](/functions/llSetLinkRenderMaterial/) — Sets link's Material
- [llGetNumberOfSides](/functions/llGetNumberOfSides/) — Gets the number of faces on the prim

---

*Source: [LlGetRenderMaterial](https://wiki.secondlife.com/wiki/LlGetRenderMaterial) on the Second Life Wiki. Content from the Second Life Wiki articles LlGetRenderMaterial (revision 1219009, 2026-08-24), Template:LSL Constant/NULL KEY (revision 59847, 2008-03-24) and Template:LSL Function/face (revision 1175878, 2013-01-06), CC BY-SA 3.0.*

---

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