Masks not rendering in Lottie

Hi! Does anyone know how to make masks work in Lottie? Everything is previewing as expected in AE, but the masks disappear in Lottie. Is there a fix for this? I haven’t found a solution that works yet, without having to fix the code (which is not an option). Help would be greatly appreciated :slight_smile:

In case anyone else is having this issue, I found a possible solution. I masked a pre-comp and it worked in Lottie preview. Without the pre-comp, it wasn’t recognizing the mask for some reason.

1 Like

I never had such issue. I mask the object or an element or comp with separate shape layer and add Alpha Matte as normal or inverse depends upon situations. But Luma Matte never worked for me.

1 Like

If you are using masks to crop elements they may not work. Masks don’t work generally when you use a vector layer with the turned on “collapse transformations”. It may also not show up when you export through bodymovin. Precomping or using alpha mattes is usually a way to go, or convert your illustrator file to shapes, then you shouldn’t have issues using masks.

3 Likes

@gbiloski Can you kindly explain more details. I am still having the issue. Everything which is inside the mask does not get exported when I choose json. #loosingmymind

Hi, I’m also experiencing the same problem, but for me, the mask is working it’s just that the feather option does not work on the mask property. when I export its just straight crop it without the feather.

I find feathering and shadow options don’t always (or maybe never?!) work with Lottie. I’ve been using pngs where needed to resolve this. Luckily my animation was simple enough that I could use pngs.

Here is full list which is supported by Lottie from After Effects.

1 Like

Hi @gbiloski would it be possible if you could explain how you use PNG files in your Lottie animations as the feather and shadow for drop shadows? I am struggling to find a solid workflow for rendering drop shadows in Lottie. I know the effect and layer styles drop shadow options will not render in Lottie. So your technique sounds interesting, I would like to learn more.

Hi to everyone! I’m trying to export my animations that it is based on a multiple masks into a single layer. Once I try exporting this, the pluging just doesn’t process the animation and quits. I believe it is because these pile of mask might need to be as shapes, but I don’t know exactly how to make it in mass. Any idea? Thank you so much!

Have you figured out a solution to this? I would love to test out your project and troubleshoot the problem.

@isionindustriesoffic I never really have trouble exporting with masks, but I would try doing Alpha or Inverted tests. I did make sure that in the Lottie Settings I turned on exporting hidden layers, since the masks will be “Eyed Off”

I was having this issue because I had “inverted” checked on a mask that was set to “add”. When I unchecked “inverted” and then changed the mask setting to “subtract” it worked just fine.

1 Like

In case anyone else is having this issue, I found a possible solution. I masked a pre-comp and it worked in Lottie preview. Without the pre-comp, hope it will help you to solve your issue. mostly i used lottie for my writing services “animation” purpose.

1 Like

Hi @gbiloski I have the same issue: I need to export a logo animation for Android (AVD) and iOS (Lottie) - I followed your suggestion to pre-comp but still doesn’t work. Could you please let me know the exact steps? (I never use AF, and the animation was made by someone else). Thanks!

Hi, I had the same issue. I had the mask in pre-comp but still didn’t work. To resolve it, check " Export hidden layers" in the Lottie plugin settings.

Share the screenshot of the object or shape, masked. And I would prefer and suggest the Bodymovin plugin instead Lottie.