# How to add layers to a dynamic material instance?

**URL:** <https://forums.unrealengine.com/t/how-to-add-layers-to-a-dynamic-material-instance/695615>\
**Category:** FX\
**Tags:** unreal-engine, UE5-0, question\
**Created:** [November 21, 2022, 8:00am UTC](https://forums.unrealengine.com/t/how-to-add-layers-to-a-dynamic-material-instance/695615 "2022-11-21T08:00:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ivan3z](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ivan3z](https://forums.unrealengine.com/u/Ivan3z)\
**Post date:** [November 21, 2022, 8:00am UTC](https://forums.unrealengine.com/t/how-to-add-layers-to-a-dynamic-material-instance/695615/1 "2022-11-21T08:00:14Z")

</div>

I would like to dynamically add and delete layers to my materials.

At the moment I know how to create it, and I know how to access its parameters.

 ![0](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/2/f/22febcebfd3dacf87fff3d846a26a26d17f8549e.png)

But how to add and remove?

I was looking in the documentation, in the forum, in google, in Youtube and I did not find the information that I want…

> **[Layered Materials](https://docs.unrealengine.com/4.26/en-US/RenderingAndGraphics/Materials/LayeredMaterials/)**
>
> An introductory document on the Layered Materials technique in UE4.

> **[Instanced Materials](https://docs.unrealengine.com/5.1/en-US/instanced-materials-in-unreal-engine/)**
>
> Hierarchical Material relationships that you to alter behavior and appearance of child Materials without shader recompilation.

> **[Creating and Using Material Instances](https://docs.unrealengine.com/5.1/en-US/creating-and-using-material-instances-in-unreal-engine/)**
>
> Guide for setting up and using Material Instances.

> **[Create Dynamic Material Instance](https://docs.unrealengine.com/5.1/en-US/BlueprintAPI/Rendering/Components/Decal/CreateDynamicMaterialInstance/)**
>
> Create Dynamic Material Instance

> **[Create Dynamic Material Instance](https://docs.unrealengine.com/4.27/en-US/BlueprintAPI/Rendering/Material/CreateDynamicMaterialInstance/)**
>
> Create Dynamic Material Instance

> **[Creating Layered Materials](https://docs.unrealengine.com/4.26/en-US/RenderingAndGraphics/Materials/HowTo/CreatingLayeredMaterials/)**
>
> An introductory document on the Layered Materials technique in UE4.

> **[Using Material Layers](https://docs.unrealengine.com/5.0/en-US/using-material-layers-in-unreal-engine/)**
>
> Build complex layered and blended Materials that take advantage of Material instancing.

Can someone show a short example of how to add and remove layers please?

Thank you very much!!

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [November 21, 2022, 9:07am UTC](https://forums.unrealengine.com/t/how-to-add-layers-to-a-dynamic-material-instance/695615/2 "2022-11-21T09:07:41Z")

</div>

I highly doubt that’s possible.

I can imagine being able to change the layers at runtime, but not add / remove.

PS: I can’t find anything about change the layers at runtime… ( params yes, but not the layer functions ).

I would be interested if anyone else can shed some light.

---

<div class="post-metadata">

**Author:** ![Ivan3z](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ivan3z](https://forums.unrealengine.com/u/Ivan3z)\
**Post date:** [November 21, 2022, 9:22am UTC](https://forums.unrealengine.com/t/how-to-add-layers-to-a-dynamic-material-instance/695615/3 "2022-11-21T09:22:23Z")

</div>

For me it would be enough to have two layers in most cases in which I plan to use it.

I would use a static background. And the foreground would use it to apply some other effect.

So if I could add/remove the foreground layer everything would be much easier and cleaner.

Thank you very much for your comment ClockworkOcean!! 💖

---

<div class="post-metadata">

**Author:** ![AndreiKushner](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AndreiKushner](https://forums.unrealengine.com/u/AndreiKushner)\
**Post date:** [September 17, 2024, 3:45pm UTC](https://forums.unrealengine.com/t/how-to-add-layers-to-a-dynamic-material-instance/695615/4 "2024-09-17T15:45:25Z")

</div>

It’s unfortunate that Unreal doesn’t allow switching material layer instances at runtime. I understand why switching entire material layers is restricted (different shaders), but allowing layer instance swaps would simplify customization. Without this, layered materials feel less useful, and it becomes easier to manage materials through organized parameter groups in blueprints. This design could definitely be improved.
