Problem with "use material attributes" option (does not work)

When using the “use material attributes” option, there are problems with the material. If we receive data from the Material function, then our material does not compile and throws a “[SM5] Cannot connect a non MaterialAttributes node to a MaterialAttributes pin.” error.


At the same time, if you disable this option, then the material will be displayed and compiled, but then I will not be able to work with terrain layers.

Also, if you directly output the output node from the Material Function to the output node, it will also work, but this is just an example and here we lose all the useful nodes.

Also, if you do not use the Material function, but place all its contents in the material itself, then in the preview window we will see only black material, although it will be displayed correctly on the landscape itself.


Summarize.
When the “use material attributes” option is set, the material is not displayed in the preview window, and if we use the Material function inside the material, the material does not compile at all and gives the error “[SM5] Cannot connect a non MaterialAttributes node to a MaterialAttributes pin.”
Please help solve the problem! This feature has not been working for several months now.

System specification:
Ryzen 2700x
16 GB RAM
GTX 1650
Windows 10 latest version
ALL drivers are up to date. Unreal engine 5 and Epic games launcher latest version.

I recreated the project and the materials themselves several times, it did not help.

You’re trying to plug a float3 into a material attributes node.

I don’t use MA, but I think you have to just split out the part you want to tweak, and feed it back in again

You might need to connect this, not sure…

2 Likes

Indeed, with this method, the compilation is successful, the material works, but the preview window is still empty.

But with this method, another problem arises, I cannot combine the Base Color and the Normal Map in one node … How to be? I really need each layer in layerblend to contain all the attributes.

In general, by and large, the problem is solved. Like you said, I took the SetMaterialAttributes node and selected additional attributes in it, like a normal map. The preview window still does not work, but for that the material itself is superimposed on the landscape without any problems!


In any case, thanks a lot! It really helped me a lot! :slight_smile:

1 Like

You’re welcome :slight_smile: Quite often, the material doesn’t work in UE5, from my experience…

1 Like