# \[SHELVED\] Material Layering Feedback for 4.19

**URL:** <https://forums.unrealengine.com/t/shelved-material-layering-feedback-for-4-19/105106>\
**Category:** FX\
**Tags:** unreal-engine\
**Created:** [January 16, 2018, 4:37pm UTC](https://forums.unrealengine.com/t/shelved-material-layering-feedback-for-4-19/105106 "2018-01-16T16:37:23Z")\
**Posts on this page:** 20\
**Page:** 6

<div class="post-metadata">

**Author:** ![SmartPolygon](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SmartPolygon](https://forums.unrealengine.com/u/SmartPolygon)\
**Post date:** [March 21, 2018, 3:25pm UTC](https://forums.unrealengine.com/t/shelved-material-layering-feedback-for-4-19/105106/101 "2018-03-21T15:25:18Z")

</div>

By the way, would be there any possibility in the future to make “set material attributes” as a parameter?  
That would give extreme flexibility to reduce unneeded nodes in layer instances.  
I’m talking about this one:

---

<div class="post-metadata">

**Author:** ![SmartPolygon](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SmartPolygon](https://forums.unrealengine.com/u/SmartPolygon)\
**Post date:** [March 21, 2018, 3:39pm UTC](https://forums.unrealengine.com/t/shelved-material-layering-feedback-for-4-19/105106/102 "2018-03-21T15:39:52Z")

</div>

For example, if I would want to at some point disable one of the elements, like roughness or metallicness in one of the instances of the layer, but without touching the parent layer.  
I would just un-tick a checkbox and the whole node wouldn’t have to pass through the blending process when I decide to disable it in a specific material instance.  
Right now I’ve come up with switches in blend function, but it’s not the ideal solution since instructions are still growing with each layer.  
I hope I explained myself…  
Here is what i mean:

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_5f225f0d](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_5f225f0d](https://forums.unrealengine.com/u/anonymous_user_5f225f0d)\
**Post date:** [March 23, 2018, 6:21pm UTC](https://forums.unrealengine.com/t/shelved-material-layering-feedback-for-4-19/105106/103 "2018-03-23T18:21:31Z")

</div>

Why isn’t it possible to use material instance Constants or Dynamics as Layers? I have tons of Material Instance Constants wich I would like to tweak with each other. If that is not possible for any reason, than I would like any option to change Master Materials + their instances into Layers and Layer Instances, but the best would be what i mentioned first.

---

<div class="post-metadata">

**Author:** ![trentpolack](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/trentpolack/32/1173069_2.png) [@trentpolack](https://forums.unrealengine.com/u/trentpolack)\
**Post date:** [March 25, 2018, 9:15pm UTC](https://forums.unrealengine.com/t/shelved-material-layering-feedback-for-4-19/105106/104 "2018-03-25T21:15:48Z")

</div>

I’m still working on these as we speak as they’re giving me somewhat inconsistent results, but here are some really simple layer definitions as well as a handful of additional blend operations (I’ll check in fixes/updates as I make them); I have things working, but it’s strangely unintuitive, despite being the same kind of stuff I’ve been doing ad hoc for years. Compile times seem to be kind of rough at times as well.

Mostly, though, being able to hide unused/unreferenced parameters would be _lovely_.

Anyway: [joymachine-public/ue4/material\_shaders/layers at main · trentpolack/joymachine-public · GitHub\</titl](https://github.com/joymachinegames/joymachine-public/tree/master/ue4/material_shaders/layers)

---

<div class="post-metadata">

**Author:** ![trentpolack](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/trentpolack/32/1173069_2.png) [@trentpolack](https://forums.unrealengine.com/u/trentpolack)\
**Post date:** [March 26, 2018, 1:50pm UTC](https://forums.unrealengine.com/t/shelved-material-layering-feedback-for-4-19/105106/105 "2018-03-26T13:50:51Z")

</div>

Additional notes after some more work: something seems off about the layer authoring process; I don’t really know if I’m just not properly setting up a material at the very start to give the following materials something to work off of, it’d be nice (and maybe this is possible and I just didn’t test it) to toss in a material layer to use as a preview while authoring another layer.

The blends that exist seem… Non-ideal. I’ve had to create a handful already and they’re about as fun to make as something not fun to make. I often just want to ignore a blend entirely and just handle a layer blending entirely in a layer itself (also: probably possible already).

The shader compile time seems to be both longer than that of non-layered materials, as well as just the hiding/unhiding of material layers in a stack for quick looks. I’m not sure how this would work, exactly, but the blend used for a bottom/top material seems to result in some non-obvious results and it’d be handy to have a better idea of what/why is getting lost in the mix in a layer chain.

I’m likely just approaching this from the wrong mindset, but the process seems unwieldy and time-consuming at the moment.

---

<div class="post-metadata">

**Author:** ![SmartPolygon](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SmartPolygon](https://forums.unrealengine.com/u/SmartPolygon)\
**Post date:** [March 27, 2018, 7:06am UTC](https://forums.unrealengine.com/t/shelved-material-layering-feedback-for-4-19/105106/106 "2018-03-27T07:06:36Z")

</div>

Not a half bad idea to have the blend function inside of a layer… 😃 By the way, I noticed it doesn’t work well with baked lighting. The model becomes very dark, or most likely it looks like it has something to do with reflections, perhaps?

---

<div class="post-metadata">

**Author:** ![SmartPolygon](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SmartPolygon](https://forums.unrealengine.com/u/SmartPolygon)\
**Post date:** [March 27, 2018, 7:15am UTC](https://forums.unrealengine.com/t/shelved-material-layering-feedback-for-4-19/105106/107 "2018-03-27T07:15:56Z")

</div>

Another thing we need is a drop down menu with ‘move up/down’ layers, since right now we don’t have the possibility to change layers order. Not a big deal if you didn’t tweak any layer parameters, you can always just re-drag from content browser to another slots, but once you tweaked some parameters, you will lose them.

---

<div class="post-metadata">

**Author:** ![trungswat](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@trungswat](https://forums.unrealengine.com/u/trungswat)\
**Post date:** [March 27, 2018, 9:46am UTC](https://forums.unrealengine.com/t/shelved-material-layering-feedback-for-4-19/105106/108 "2018-03-27T09:46:08Z")

</div>

Hi,

I just played around with material layers and thought if BlendAsset could received parameters directly from master material, it would be nicer. Because right now, for each LayerAsset I have to assign the same blended texure, it’s quite annoying for repetitive task.

I might think it could be improved in next release of Unreal or you guys have any ideas to set blended texture as a parameter of master material which is the same thing with Tinted\_Tex.

Thanks

---

<div class="post-metadata">

**Author:** ![rosenand](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rosenand/32/1141324_2.png) [@rosenand](https://forums.unrealengine.com/u/rosenand)\
**Post date:** [March 27, 2018, 3:01pm UTC](https://forums.unrealengine.com/t/shelved-material-layering-feedback-for-4-19/105106/109 "2018-03-27T15:01:27Z")

</div>

> [@NR6](#):
>
> Why isn’t it possible to use material instance Constants or Dynamics as Layers? I have tons of Material Instance Constants wich I would like to tweak with each other. If that is not possible for any reason, than I would like any option to change Master Materials + their instances into Layers and Layer Instances, but the best would be what i mentioned first.

This. I’m aware that this wasn’t possible before either, but I was kind of hoping that it would be now. Create a library of material instances (grass, wood, stone, dirt, metal etc.) and sometimes blend them in different combinations, but sometimes just drag & drop one of them directly onto a mesh.Right now you can’t drag & drop a layer onto a mesh, because it’s a material function, not a material.

So you’d have to have each of your materials twice in the project: once as a layer, and once as a material instance. Any possibility that it will change?

---

<div class="post-metadata">

**Author:** ![Grimmsorg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Grimmsorg](https://forums.unrealengine.com/u/Grimmsorg)\
**Post date:** [March 27, 2018, 4:47pm UTC](https://forums.unrealengine.com/t/shelved-material-layering-feedback-for-4-19/105106/110 "2018-03-27T16:47:57Z")

</div>

How do I get this feature working?

I thought it was part of the 4.19 release but I’m missing the option in the experimental options window that everyone has highlighted

---

<div class="post-metadata">

**Author:** ![Mahmood215](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Mahmood215](https://forums.unrealengine.com/u/Mahmood215)\
**Post date:** [March 28, 2018, 3:30am UTC](https://forums.unrealengine.com/t/shelved-material-layering-feedback-for-4-19/105106/111 "2018-03-28T03:30:30Z")

</div>

Hi Guys. for some reason i can’t enable material layers in 4.19, i downloaded the engine with launcher and in the experimental tab i can’t find option name “Material Layering Enabled” in material section…  
here is my screen shot, can some know whats going wrong ☹

---

<div class="post-metadata">

**Author:** ![Miroac](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Miroac](https://forums.unrealengine.com/u/Miroac)\
**Post date:** [March 28, 2018, 6:49am UTC](https://forums.unrealengine.com/t/shelved-material-layering-feedback-for-4-19/105106/112 "2018-03-28T06:49:57Z")

</div>

Is there any information on how we will be able to update material layer parameters through blueprint yet?

---

<div class="post-metadata">

**Author:** ![SmartPolygon](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SmartPolygon](https://forums.unrealengine.com/u/SmartPolygon)\
**Post date:** [March 28, 2018, 3:02pm UTC](https://forums.unrealengine.com/t/shelved-material-layering-feedback-for-4-19/105106/113 "2018-03-28T15:02:00Z")

</div>

> [@Mahmood215](#):
>
> Hi Guys. for some reason i can’t enable material layers in 4.19, i downloaded the engine with launcher and in the experimental tab i can’t find option name “Material Layering Enabled” in material section…  
> here is my screen shot, can some know whats going wrong ☹

It’s under: **Project Settings \> Rendering \> Experimental**  **\>**  **Support Material Layers** , not in **Editor Settings** like before.

---

<div class="post-metadata">

**Author:** ![rosenand](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rosenand/32/1141324_2.png) [@rosenand](https://forums.unrealengine.com/u/rosenand)\
**Post date:** [March 28, 2018, 4:05pm UTC](https://forums.unrealengine.com/t/shelved-material-layering-feedback-for-4-19/105106/114 "2018-03-28T16:05:17Z")

</div>

I noticed a lot of shader compilation going on while testing this system. Tried to compare the number of shaders that needed compiling for a simple single layer vs an equivalent regular material.

Test setup: I created a simple material with some PBR texture parameters, a few scalars etc. Then copied the same nodes into a Material Layer. Neither had any instances, I triggered shader compilation by simply moving a node a little in the graph and clicking Apply.

Here are the results from OutputLog window:  
Regular material: 16 + 36 shaders  
Layer: 31 + 77 shaders

For some reason it shows two compilations, but either way it’s much more for the layer system.

This test may be somewhat “synthetic”, but I also tested it more organically by putting a Cube with material into a scene and triggering shader compilation. A Layer packaged into a Material Instance with just the Background Layer, added about twice as many shaders to the compilation process, as a regular Material Instance with the same nodes as the Layer.

Is that expected? Is it because it’s just an experimental feature? Or am I doing something wrong? Could someone test it, please?

Shader compilation was a big issue for us later in our last project, with thousands of shaders needing to be recompiled. I don’t think we’ll be able to accept those numbers increasing even more just as an overhead, for our next project.

---

<div class="post-metadata">

**Author:** ![Shadow.Storm](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Shadow.Storm](https://forums.unrealengine.com/u/Shadow.Storm)\
**Post date:** [March 29, 2018, 2:25pm UTC](https://forums.unrealengine.com/t/shelved-material-layering-feedback-for-4-19/105106/115 "2018-03-29T14:25:49Z")

</div>

> [@SmartPolygon](#):
>
> By the way, would be there any possibility in the future to make “set material attributes” as a parameter?  
> That would give extreme flexibility to reduce unneeded nodes in layer instances.  
> I’m talking about this one:

Hey SmartPolygon 🙂 For things like this, it really will differ from project to project, so it’s probably best for you to create the library of blends you will need. When we release this feature fully, we plan to ship a library of blends with the engine as well, but we expect a large number of project specific blends and people sharing their ideas for awesome blend setups!

---

<div class="post-metadata">

**Author:** ![Shadow.Storm](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Shadow.Storm](https://forums.unrealengine.com/u/Shadow.Storm)\
**Post date:** [March 29, 2018, 2:28pm UTC](https://forums.unrealengine.com/t/shelved-material-layering-feedback-for-4-19/105106/116 "2018-03-29T14:28:00Z")

</div>

> [@mittense](#):
>
> Mostly, though, being able to hide unused/unreferenced parameters would be _lovely_.

Do you have an example material setup that is causing material parameters to not be hidden if they’re not connected? This would definitely be a bug we’d be interested in a repro case for. Thanks!

---

<div class="post-metadata">

**Author:** ![Shadow.Storm](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Shadow.Storm](https://forums.unrealengine.com/u/Shadow.Storm)\
**Post date:** [March 29, 2018, 2:36pm UTC](https://forums.unrealengine.com/t/shelved-material-layering-feedback-for-4-19/105106/117 "2018-03-29T14:36:11Z")

</div>

> [@mittense](#):
>
> Additional notes after some more work: something seems off about the layer authoring process; I don’t really know if I’m just not properly setting up a material at the very start to give the following materials something to work off of, it’d be nice (and maybe this is possible and I just didn’t test it) to toss in a material layer to use as a preview while authoring another layer.
> 
> The blends that exist seem… Non-ideal. I’ve had to create a handful already and they’re about as fun to make as something not fun to make. I often just want to ignore a blend entirely and just handle a layer blending entirely in a layer itself (also: probably possible already).
> 
> The shader compile time seems to be both longer than that of non-layered materials, as well as just the hiding/unhiding of material layers in a stack for quick looks. I’m not sure how this would work, exactly, but the blend used for a bottom/top material seems to result in some non-obvious results and it’d be handy to have a better idea of what/why is getting lost in the mix in a layer chain.
> 
> I’m likely just approaching this from the wrong mindset, but the process seems unwieldy and time-consuming at the moment.

So, I’d definitely recommend checking out Alan Willard’s GDC learning theater presentation on Material Layers. 🙂 He covers workflows, as well as the flexibility that comes from isolating the blend from the layers. If you still have questions after that though, definitely post them here and we’ll take a look!

Blends really will be something that is project-specific - things like damage, grime, and scratches all will have a particular look and feel for each game. We do plan on shipping blends that correlate with existing “blend functions” for 4.20 - but there are so many potential possibilities that we look forward to seeing the community create!

For layer hiding/unhiding, that will compile the permutation once, but should be quick after that. Also, in 4.20, you’ll be able to alt-click on the eye icon to toggle off all other layers, which will make compiles faster when you are just wanting to isolate a layer.

Thanks so much for all the feedback!

---

<div class="post-metadata">

**Author:** ![Shadow.Storm](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Shadow.Storm](https://forums.unrealengine.com/u/Shadow.Storm)\
**Post date:** [March 29, 2018, 2:36pm UTC](https://forums.unrealengine.com/t/shelved-material-layering-feedback-for-4-19/105106/118 "2018-03-29T14:36:53Z")

</div>

> [@SmartPolygon](#):
>
> Not a half bad idea to have the blend function inside of a layer.. 😃 By the way, I noticed it doesn’t work well with baked lighting. The model becomes very dark, or most likely it looks like it has something to do with reflections, perhaps?

If you have a repro case for this, please pass it along here! Thanks 😃

---

<div class="post-metadata">

**Author:** ![Shadow.Storm](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Shadow.Storm](https://forums.unrealengine.com/u/Shadow.Storm)\
**Post date:** [March 29, 2018, 2:37pm UTC](https://forums.unrealengine.com/t/shelved-material-layering-feedback-for-4-19/105106/119 "2018-03-29T14:37:37Z")

</div>

> [@SmartPolygon](#):
>
> Another thing we need is a drop down menu with ‘move up/down’ layers, since right now we don’t have the possibility to change layers order. Not a big deal if you didn’t tweak any layer parameters, you can always just re-drag from content browser to another slots, but once you tweaked some parameters, you will lose them.

In 4.20 (and you can see in Alan’s video here: [https://www.youtube.com/watch?v=7ieuiaZNwII](https://www.youtube.com/watch?v=7ieuiaZNwII)) you will be able to drag and drop layers which should definitely make this easier. 🙂

---

<div class="post-metadata">

**Author:** ![Shadow.Storm](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Shadow.Storm](https://forums.unrealengine.com/u/Shadow.Storm)\
**Post date:** [March 29, 2018, 2:39pm UTC](https://forums.unrealengine.com/t/shelved-material-layering-feedback-for-4-19/105106/120 "2018-03-29T14:39:47Z")

</div>

> [@trungswat](#):
>
> Hi,
> 
> I just played around with material layers and thought if BlendAsset could received parameters directly from master material, it would be nicer. Because right now, for each LayerAsset I have to assign the same blended texure, it’s quite annoying for repetitive task.
> 
> I might think it could be improved in next release of Unreal or you guys have any ideas to set blended texture as a parameter of master material which is the same thing with Tinted\_Tex.
> 
> Thanks

We do have plans to update the parameter system - to be able to pick up parameters set in the material in a layer or a blend. We’re still in the prototyping stage for this as we want it to be a really smooth workflow for the user, so we don’t have details yet, but it’ll definitely be in the release notes/documentation as we add them!

[Previous page](https://forums.unrealengine.com/t/shelved-material-layering-feedback-for-4-19/105106.md?page=5)

[Next page](https://forums.unrealengine.com/t/shelved-material-layering-feedback-for-4-19/105106.md?page=7)
