Using an alphamask without the alpha being visible
Posted: Sat Jun 11, 2016 2:13 pm
Ok, I have a slightly complex issue. I have a composite where I want to display one graphic layer, that has an animated alpha mask to occlude parts of it. I've got it working to the point that the alpha layer animates properly, and properly effects the opacity of the target layer, but the problem is that the alpha layer itself is visible in frame, and I want it to be invisible because it's just a junk image used for its alphachannel. If I just set the alpha of the alpha layer to zero, then it vanishes, but so does the target layer.
I can fake it for part of this by hiding the alpha layer behind the middle layer, but this only works when the alpha is in a position to not peek out from behind it. Is there some better way to hide the alpha layer itself, while retaining it's ability to pass on the alphachannel from the png itself?
Code: Select all
image TestLC = LiveComposite(
(100, 100),
(0, 0), "AlphaImage", #putting it here can hide it when it's fully behind the base, but not when it's larger or moved wrong
(0, 0), "BaseImage",
(0, 0), AlphaMask("TargetImage", "AlphaImage"),
)
image BaseImage: #This would be a png with its own alpha channel
"images/Base.png"
image TargetImage:
"images/Target.png"
image AlphaImage:
"images/alphalayer.png" #This would be a png with its own alpha channel
#alpha 0 #If I use this, the alpha layer hides, but so does the target layer. If I don't use this, the alpha layer is visible.
ease 2.5 offset (25,100)
ease 2 offset (0,-35)
pause .5
repeat