Fade In/Out of Translucent HUD Element?

I’m essentially trying to fade a HUD element in and out along a timeline, being able to control delays etc. using blueprints. The element is a material applied to a curved StaticMesh. Obviously Epic have decided not to include a fadein/out node for materials in UE4, so it’s proving quite complicated; I’m trying to decided on the best method to attack.

Just to include more detail, I’ve tried creating an MID but I’m completely unsure where/how to do this and referencing what kind of parameter: a vector one? Plus, I’ve tried adding a fade over time within the actual material, but this is difficult to control in terms of timing and I want to be able to fade this material in and out at will (not accessible during runtime, just through blueprints) and apply this to other pieces of the HUD, though resetting the Time parameter in the material doesn’t seem possible. Not to mention doing this through the material seems to be a very clunky method.

Honestly I’m pretty lost. Any suggestions would be appreciated.

First of all you need to use a translucent material and convert the opacity value to a parameter(right click on constant 1 node and Convert To Parameter) name it anything you like. Here i named mine Fade.

Then head over to your BP where you have the HUD mesh. In Construction Script get the mesh > Create Dynamic Material Instance. Pick the material you created as the source, and then promote it to a variable so that you can use it to change the parameter value in run time using the event graph. Here i named mine fade Mat.

Finally, switch to Event Graph > get the material instance variable > Set Scalar Parameter Value. We had left the default value at 0 so it is invisible right now. You can fade it in to 1 by using a timeline.

RE: the construction script, where should I complete this exactly? In the BP where the HUD mesh is placed or in a separate BP containing the mesh/where the HUD Mesh is the parent?

In the BP where you placed the HUD mesh. It doesnt need to be a separate BP.

in reference to the node named Fade Mat, what is the node called?

Drag the blue pin from Create Dynamic Material Instance node then select Promote to Variable, and name it anything you like. After that it will be visible on the left side > Variables column. You will use that in the event graph.

Thanks I’ll try this out! By far the clearest solution I’ve found, I’ll let you know if it works for me.

RE: the construction script, where should I complete this exactly? In the BP where the HUD mesh is placed or in a separate BP containing the mesh/where the HUD Mesh is the parent?

Very sorry, I’m new to this, but in reference to the node named Fade Mat, what is the node called? I want to make sure I set this up correctly haha

Thanks so much it worked finally!