Developer Notes

The function returns a MaterialAttributes object which shouldn't connect to the Opacity output pin which is correctly expecting a float. The error is already reported in the material editor.
Using a material attributes node is an explicit choice by the user to aid in passing around common parameters and in this case they can either change the final output to an attributes type which will let it connect, add a break node, or change the output of the function to return individual pins which seems the actual intention here if they're then going to be connected this way. Trying to automatically add a break node would be inconsistent and fragile, adding unnecessary code complexity for this specific case of user error.


Opacity is not working with a material function "Make Material Attributes" node.

Steps to Reproduce
  1. Create a new blank project.
  2. Create a Material Function
  3. Add a MakeMaterialAttributes node
  4. Add a Constant for the Base and Metallic as well as the Roughness Channel
  5. Bring in a .PNG image with an alpha.
  6. Connect RGB channel to either opacity or opacity mask
  7. Connect the MakeMaterialAttributes to the Output Result node

Result : Opacity is never calculated in the viewer
Expected : Opacity mask creating transparent areas where mask is black

I also tested pulling from the green channel of the texture sample and adding that to a component mask. I then masked the R Channel and plugged that into the opacity/opacity mask channels. I then added the Function to a translucent material and tried to add this to the opacity channel. I received the message "Material Attributes is not compatible with float."

Have Comments or More Details?

Head over to the existing Questions & Answers thread and let us know what's up.

Login to Vote

By Design
ComponentUE - Graphics Features
Affects Versions4.9.24.10
CreatedOct 19, 2015
ResolvedJul 11, 2016
UpdatedJul 14, 2021