This is NOT working as per the tutorial in the Unreal Engine wiki and it’s not a complicated concept that I can easily attribute to user error. Clicking the “Use Material Attributes” button in the material properties SHOULD be turning the output node into “Material Attributes” but instead what I get is a node that says “Customized UV5.”
Attempting to connect a MatLayerBlend node to this returns “Material Attributes is not compatible with Float 2.”
I see complaints about this dating back to 2015, and one inquiry about it on answers.unrealengine.com with no responses.
Are Layered Materials completely broken, or is there an entirely different method of accomplishing it now? The only alternative solution I’ve found so far is to layer two static meshes, each with one of the materials, which seems ridiculously wasteful. Linear Interpolation within the material proved to be a non-solution because using a texture sample for the alpha gets reduced to a cheap “0 or 1” mask, with no varying degrees of translucence.
Those material attributes nodes and features are used pretty extensively across many projects but I’ve not seen that particular error before. You should be able to create a new material, open the graph editor and check the ‘use material attributes’ option, and then use nodes like SetMaterialAttributes and similar to output and connect, so it doesn’t look like user error here. I’m not able to reproduce your bug or a similar issue with recent versions. As it’s saying Customized UV5, my suspicion is a mismatch or incorrect offset in the (legacy) material attributes declarations but those were re-written a couple of releases ago (Around 4.14 I believe) so this might be a very old bug? Or possibly a bug migrating from an old to a recent release?
If you are seeing this in a recent vanilla engine build, can you please open an AnswerHub ticket (How-to) and attach a project with this happening or write reproduction steps? Be sure to attach extra information to your bug report such as which version of the engine you’re using, which platform is being targeted and so on as every extra detail helps.
It’s in the ARK Dev Kit, so no go on being vanilla technically. Officially the editor says v4.5.1 though. Unfortunately I didn’t go playing with layered materials until AFTER the most recent update, so I have no way of knowing if it’s been around a while or just cropped up now. Seems like a strange thing for a specific DK to break though.
It’d be interesting to hand a test project over anyway though just to see what happens to the node when it gets loaded in the stock editor. Or a material made in the stock editor, loaded into an ARK project, for that matter.
No idea if the ARK version has these features but if they are there you can do Break material attributes, then disable material attributes and hook the nodes up yourself.
Ah, that might be the reason then, thanks for the information. Under the hood the material editor has a list of the possible outputs such as Base Color, Specular, Roughness and so on, and at least in older versions this used to be somewhat brittle and could break between versions when the code there was changed causing some of your outputs to unexpectedly swap around. This was re-written when we added the SetMaterialAttributes and GetMaterialAttributes nodes so this can’t happen anymore. It might be that the Ark kit introduced a bug when updating engine version as there were some complex code changes, so perhaps see if you can report it to them directly or in the Ark modding board.
Cyaoeu suggested the right workaround for now at least.
I was going to say, that would just lead me right back to the problem I was having with Lerps (the alpha texture was being treated like a very primitive mask, with 0 values as transparent, and anything from 0.1 - 1 as 100% opaque), but then I tried it again, exact same node layout I had before, and this time it worked without a hitch. Cheers!