Disclaimer - I know I how to make this effect by using curves and blueprints without using the Layers system, but I wanted to investigate the possibility of using MLB’s for this, as they are a very dynamic and flexible tool which I only recently got to be acquainted with.
Hey there!
I have myself a Material using the layers system, and I wanted to use a Material Layer Blend to drive an animation to smoothly transition between two material layers:
As you can see, I exposed a parameter called “Driver_Dissolve” - I intended to plug that parameter to a curve in a blueprint and have that change based on a timeline:
Massive thanks to user “Dan Gant” from the Unreal Source discord - who suggested that I used Custom Primitive Data instead of a regular Scalar Parameter:
The effect is now following all the features I initially wanted from it
in the MLB, I set the parameter type to be a Custom Primitive data, and now it is possible to use a different blueprint node to control the parameter on runtime.
Thanks a lot for the community for helping me out, and I hope this post is useful for another dev in the future
Update.: because the MLB is still not a literal part of the main material, it is necessary to copy-paste the scalar parameter as a Custom Primitive Data into the parentmost Material, with the same name. If your parentmost material DOES NOT contain the Driver parameter with the same setup, I believe the system falls apart because it can’t find a reference to the MLB’s CPD.
I’ll keep logging any other errors I find with this over here.