[SHELVED] Material Layering Feedback for 4.19

I submitted a Bug Report with the exact same problem (I brought it up at discord),

Hi all!

Definitely hearing you on the preview 5 issues - we were refactoring things and Material Layers in preview 5 is in a bit of a buggy state as a result. I know a number of the major crashes, as well as the global parameters not updating have been fixed since then, so good news on that at least. :slight_smile:

Dam, was just about to make a video series on the new method showing how to convert old function layers into the new method using the Trooper character from the Sequencer demo. Even got all the prep work done, just can’t record because of that crash when switching to the Layers Parameters tab.

Any idea when we’ll get a fix for this?

Preview 6 probably.

Yep, fixed in Preview 6, which is now available for you all to try out! Looking forward to seeing the video series, Miroac!

Something minor but I sure something is planned is for Materials Layer, Material Layer Blends assets have different thumbnail from Material Function and Materials in the content browser. Prefixes help but different thumbnails would be a nice extra visual aid to select the right asset quickly.

So previously when I was working in the Layer Parameters, if I deliberately named named a parameter the same name, when I changed layers it would keep the same parameter values.

But in preview 6 when ever I change to a different layer all the parameter values are reset to default.

Is this is a deliberate change or a bug? Because I honestly found that feature to be AWESOME! It meant being able to go back and forth during look dev without loosing all your tweaks.

Also the Material Shared Input asset appears broken and there is no node for it in the material editor. Is the idea to use the input pin of the Layer node and just read those inputs instead of setting up a shared input asset?

So, this is a deliberate change - the previous behavior was a bug. We’re trying to eliminate cases where there are ambiguities based on parameters with the same name causing collisions - which really gives you a lot of flexibility to reuse layers in the same stack and just tweak parameters for each “instance”.

When you switch out the layer (or blend) you should be getting all the parameters that are set in that layer or blend. This also opens up possible future developments like treating the whole layer’s parameter set more as an actual “parameter collection” and the resulting power to swap those around that would come along with that.

See the original post - we’ve edited it to reflect this change. :slight_smile: After a lot of discussion, we decided to go forward with removing the Material Shared Input because it was only meant to be a temporary workflow patch, and removing it now means people won’t get started with a less-than-ideal method when a new one is on the horizon! You’re right, the way to pass in parameters from your Material to any layers and blends it contains is through the input pin of the layer node. This will still allow you to set named parameters for the whole material, and use those as inputs within a layer or blend as needed. :slight_smile:

Thanks!

Hi Lstilson, I would recommend you make a Min & Max value for everything you want randomized, then hook that up to a position-randomizer or a HISMC-randomizer (depending on type of object), that way you get randomized results for each of the object you place for free (as each object can use the exact same material instance which batches nicely).

Are Normalize/Transform Vector nodes not supported in Material Layer Blend? I’ve filled more details there 4.19 experimental Material Layer Blend doesn't support Normalize/Transform Vector nodes? - Rendering - Unreal Engine Forums

anyone got an issue where the material blend wont really change after the first compile? playing around with having both a pre-made mask and blending it with vertex color and it sometimes works and sometimes not, it seems completely random.
no blend:
Imgur
New Blend with just mask:
Imgur
same blend with a lerp (notice no change in the shaderball or model)
Imgur
same blend but the lerp disconnected so it should be full green or brown but its the same
Imgur

Layer the physic mat and you will have something special.

Almost no point in using material layers in a real game at the moment.

Example you have AI wearing armour; a bullet hits it armour you hear the thud of Kevlar, the second bullet hits his face you hear the skin and blood squelch. Currently you have to assign mat ID to achieve this. And that’s for almost everything, you use layers for different surfaces but without the correct surface physics/sfx you can’t use it in anything that has interactions, bullets footsteps etc.

Lol, but isn’t it the same with standard materials?
I personally love to use the layers to add details, like scratches, paint chips, dust, dirt and leaks. Don’t say material layering doesn’t have a purpose… because it does for a lot of things! Especially where you want to add texture tiling. Or when you use over and over the same textures, but want to add the uniqueness for each model and want to save video memory and disk space.

Thanks for the info! We’ll check this out on our end :slight_smile:

Thanks so much for the repro steps - this is an issue we’re looking into and getting a good repro helps so much! For now, a possible workaround is to duplicate that final blend asset and assign the duplicated asset instead. Definitely not ideal, but we really appreciate your patience while we get the bugs ironed out of the experimental feature! :smiley:

I wasn’t sure about this feature, but I spent the afternoon yesterday playing around with various approaches to using it and I’m starting to dig it. My first stabs were all pretty rough, but once I get a decent sample set of layers/blending functions I’ll toss them up on my repo: GitHub - trentpolack/joymachine-public: All sorts of random publicly-available information, assets, sc

They could use some additional written documentation I think, but I dunno if I’ll have the time to swing an article any time soon, so hopefully just a bunch of samples will suffice.

Can please someone help me out here? I have updated Ue4 to final 4.19 and cannot find “material layers” under “create new” menu and there is no “layer parameters” tab anymore in material editor… I don’t know if I’m doing something wrong or did workflow change? I have “example layers and blends” enabled under editor settings, so I have no idea what I’m doing wrong…

During the preview process, we moved this setting to Project Settings so it could also toggle runtime behavior. To enable this feature, navigate to the Project Settings > Rendering > Experimental and set **Support **Material Layers true.

Very cool! Looking forward to seeing what you come up with!

Thank you sooo much Shadow.Storm! I was tearing out my last hairs here… Works like a charm :slight_smile: