Masking on PNG with transparency

Wondering how to accomplish a certain animation task? Ask here.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
User avatar
Jkoseattle
Posts: 430
Joined: Tue Nov 08, 2016 6:39 pm

Masking on PNG with transparency

Post by Jkoseattle »

I have four PNGs with a lot of transparent parts in switch group, and shuffle rapidly through them via an action to make it jiggle in the needed way. I need this jiggling thing to get a red tint at some point. So I'm trying to cover it with a semi-transparent red shape, then using masking to only show the red shape that is over the images. It technically works, but Moho thinks the transparent parts of the PNG image are part of the mask, so the red covers the whole rectangle that makes up the image instead of just the non-transparent parts. In other words, Moho's masking system doesn't recognize PNG transparency.

How else might I do this?

Here's how I initially tried to solve this:

My first attempt was to duplicate the switch group (replacing the four images with red-colored versions of them) and its action. I then had two identical switch groups, a regular one and a red one. I would also duplicate the animation, then simply adjust transparency from the original to the red duplicate where needed. I was unsuccessful in animating transparency though, and I don't know if this had to do with the fact they were in a switch group, were using an action, were PNGs or what. In any case, it wasn't working. (All images and the group itself have "Allow animated layer effects" checked.) I decided to do the masking technique instead, which seemed simpler anyway and allows for more flexibility down the line as this thing is going to be used a lot, and will go from normal to red all the time.
Most of the time I'm doing music stuff. Check me out at http://www.jimofseattle.com/music.

Thing I did for work: https://www.youtube.com/watch?v=LgFYGqifLYw
User avatar
hayasidist
Posts: 3493
Joined: Wed Feb 16, 2011 8:12 pm
Location: Kent, England

Re: Masking on PNG with transparency

Post by hayasidist »

I've never had any problems with using a PNG with transparency as a mask (even PNGs inside a switch). have you checked if you get the right result if you render (ctrl-R to preview)?

have you got the right grouping (e.g.)?
> Mask group - hide all
>> colour - mask this layer
>> switch - no masking in this group - add to mask
>>> children - don't mask this layer
User avatar
Jkoseattle
Posts: 430
Joined: Tue Nov 08, 2016 6:39 pm

Re: Masking on PNG with transparency

Post by Jkoseattle »

Aha! Ctrl-R shows it works just fine. I was doing it right all along.

--- and this involved MASKING, so my saying it that I set it up correctly in the first place is a major accomplishment.

Thanks!!
Most of the time I'm doing music stuff. Check me out at http://www.jimofseattle.com/music.

Thing I did for work: https://www.youtube.com/watch?v=LgFYGqifLYw
Post Reply