Description

From the UDN:

Currently, I'm using UE5, but I've seen this issue occur in UE4 and I don't see any other posts on UDN about this. Refraction can only be set in material functions if using the MakeMaterialAttributes node, and then it has to be set again in the material using the material function using MakeMaterialAttributes. I'm using material layer blends in this example, but I've also seen the issue with material functions.

My original setup was this:

Material layer blend called MLB_Refraction. Use SetMaterialAttributes with the top layer plugged into the input to set the refraction. Plug the output of this node into the Material Attributes output.
Material that's using material layers. Nothing going on here other than the material attribute layers node.
Create an instance of the material and set the background layer to a blank layer, create a new layer and set the layer to a blank layer, then set the layer blend to MLB_Refraction.
This setup does work:

Material layer blend called MLB_Refraction. Plug Top Layer input into BreakMaterialAttributes, then make a MakeMaterialAttributes node, and set the refraction, then pass everything else through. Use this output for the final material attributes output.
Material that's using material layers. It has the material attributes layers node, but I've also added in a BreakMaterialAttributes-MakeMaterialAttributes with everything passed over.
Create an instance of the material and set the background layer to a blank layer, create a new layer and set the layer to a blank layer, then set the layer blend to MLB_Refraction.

Steps to Reproduce
  • Material layer blend called MLB_Refraction. Use SetMaterialAttributes with the top layer plugged into the input to set the refraction. Plug the output of this node into the Material Attributes output.
  • Material that's using material layers. Nothing going on here other than the material attribute layers node.
  • Create an instance of the material and set the background layer to a blank layer, create a new layer and set the layer to a blank layer, then set the layer blend to MLB_Refraction.

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-145776 in the post.

1
Login to Vote

Backlogged
CreatedMar 14, 2022
UpdatedSep 22, 2022