lottie-ios
lottie-ios copied to clipboard
Alpha Inverted Matte masks don't work in pre-compositions
Check these before submitting:
- [] The issue doesn't involve an Unsupported Feature
- [] This issue isn't related to another open issue
This issue is a:
- [] Non-Crashing Bug (Visual or otherwise)
Which Version of Lottie are you using?
Lottie 3.1.8
What Platform are you on?
- [] iOS
What Language are you in?
- [] Swift
Expected Behavior
https://lottiefiles.com/share/Os6s8S
Actual Behavior
On iOS nothing is previews and the layers are involved are hidden. Please preview this on the LottieFiles iOS app
Animation JSON
https://lottiefiles.com/share/Os6s8S
Did you ever find a solution to this problem?
Well I had to find a workaround, and not use pre-compositions at all. I duplicated the mask and used is as an inverted alpha mask for each layer I had to mask ( rather than how I would usually precompose all the layers that had to be masked and only use a mask). For me this workaround worked well because my mask didn't really animate, if you have to animate the mask as well i guess i have to keep every copy in sync. Hope this helps and the developers find a solution to this bug,
@EfraimB did you test the animation on iOS? I have a problem where the alpha inverted matte doesn’t render correctly on iOS
Well that's all about what this bug is. It doesn't render correctly on iOS if you mask a precomposition with an inverted alpha mask.
We are still seeing this issue, and are looking to move away from pre-compositions as well. We'd love to see a fix on this
Hi @roguealexander and @EfraimB I did some research into this matter and found another app on iPad that I am able to test my Lottie JSON files. The app is called Animotion X. I tested my animation with alpha inverted mattes and noticed that it renders completely fine using that app, the alpha inverted mattes displayed correctly as intended. I messaged the developer of that app and asked him why my animations with alpha inverted mattes are playing correctly on that app, they stated that it could be a Lottie player problem causing the track mattes to render weird on iOS. Also, I found this article that goes in depth as to how Lottie handles track mattes behind the scenes. It's worth a read to understand how things are working. This problem drove me crazy because I know I built that project with only supported features and it was displaying incorrectly. I wonder if there are other ways to test different Lottie players on different platforms.
Check these before submitting:
- [] The issue doesn't involve an Unsupported Feature
- [] This issue isn't related to another open issue
This issue is a:
- [] Non-Crashing Bug (Visual or otherwise)
- [] Regression (Something that once worked, but doesn't work anymore)
Which Version of Lottie are you using?
Lottie 3.0 Exporting with Bodymovin 5.7.8
What Platform are you on?
- [] iOS
What Language are you in?
not sure only using LottieFiles preview app on iOS
Expected Behavior
I have a layer with an AlphaInverted Matte, that should show up when I take that original comp, turn it into a precomp thats nested inside another comp.
Actual Behavior
I have a layer with an AlphaInverted Matte that exports and renders correctly when rendered from inside its own comp. But when that comp with the AlphaInverted Matte is made into a pre-comp, and then I try to render from the new Main Comp (that has the precomp nested inside of it), then the layer associated with the AlphaInverted Matte doesn't show up in the renderer.
Code Example
Animation JSON
I'll send you the file Brandon :)
I also had this issue, so I submitted my description above. Hopefully we'll find a solution soon :)
Having the same issue here used the workaround for now
is there a solution expected? :]
Closing since this appears to work correctly in 3.4.1 -- the inverted matte is applied in the same way as it is on web.
Hi I have the same problem, did you find a solution? Is there no problem with the actual app?