I need to keyframe the opacity of a plane inside a blueprint which has a material that needs to be in “masked” mode, so the Opacity input is not available, only the Opacity Mask is.
I tried several ways to have a scalar parameter as Opacity that I can bring into a level sequence, and the only way I found was this:
I thought that was the solution, but it’s not, because when I play the sequence, it comes up suddenly at around 0.35 and not gradually. The other components that I need to fade in or out, do it gradually because their materials are set to translucent and have the opacity scalar parameters set to the opacity input.
So how can I solve this? I tried everything myself, plus searching online, and came up empty. Is there some kind of node that is like the scalar parameter but has an input and an output, like the texture A output would go to this node, which could be set to any value and keyframed in the sequencer, and the output would go to the opacity mask input? Just a thought but if anyone has any ideas, I would love to try whatever you can throw at me.
If you want gradual opacity change, use Translucent material. With masked, you have a certain threshold that divides visible and invisible, and by default it’s 0.3333 (you can change it in the material details, look for Opacity Mask Clip Value, but you can’t change it at runtime).
Anyway, make the material translucent, then you’ll be able to change opacity.
Yes, but that’s the main problem I have. I cannot make it translucent, because in that case I lose the alpha mask. I’m new to UE, but it seems that even if the original file has an alpha channel, UE needs to have the masked mode enabled to allow the alpha channel, otherwise the effect I applied to the emission input applies to the whole thing, not just the pixels that have content.
You can still use alpha in Translucent, just multiply your emissive value by this alpha and you’ll have no emission where alpha is 0.
Moreover, you can use an IF node with the alpha to have any kind of data for alpha 0 and alpha 1.
What that gives me is the material without alpha. I still see the graphic, but the background is not transparent, it’s white.
As for the IF node, I loaded it, but I don’t have a clue how it works, although I will look it up.
OK, but then where do I plug the output of the IF node? If I connect it to the base color, it makes the whole thing glow. If I connect it to the opacity, I see only the busy pixels glow, but then I can’t connect the opacity scalar parameter to it. And the other inputs I can connect it to, I don’t think that would work either.
Right, but that’s what I was saying earlier. If I send the If output to the opacity node, sure, I get the transparency, but I lose the opacity input to plug in the scalar parameter to keyframe opacity in the sequencer. That’s the main point, if I use translucent mode, it has to be in a way that gives me the transparency of the texture without using the Opacity input.
Although, in the sequencer, you have to set the starting keyframe to weighted tangent and extend it quite a lot to make the material appear gradually. For some reason it shows up too quickly otherwise.