Lottie-ios: Is transparency supported?

Created on 6 Feb 2017  路  5Comments  路  Source: airbnb/lottie-ios

Tried to create a simple animation showing that something is being calculated:

http://gph.is/2kyQMdP

This seems to work perfectly fine through bodymovin, but when I transfer it to Lottie and play it through XCode I lose the transparency where the buttons are.

http://gph.is/2jTu1Ve

So I am wondering how I should maintain the transparency seen in the first gif when using Lottie?

Most helpful comment

Hi Ushaka! Gave your AE file a look, and it looks like you're issue isnt transparency, its about "fill rule". (wtf is fill rule) Right now you have multiple paths in a group and the fill rule is letting each small square cut a hole out of the calculator. Right now Lottie doesn't obey this, it just merges the paths into one shape.

screen shot 2017-02-09 at 10 36 25 am

There is currently another issue for tracking Even-Odd Fill rule, which should alleviate your problem.
https://github.com/airbnb/lottie-ios/issues/43
We hope to support this very soon.

In the mean time, the only workaround is to make each of the squares in the calculator its own group and give it the color of your background

Thanks!

All 5 comments

Transparency is supported! Are you using precomps?

I did not, but tried doing so now. Still only see the outline of the calculator itself. I have tried both creating the shape as a solid, and directly from a vector layer. I am using the example file for XCode to test with, could that be the issue?

https://www.dropbox.com/s/5obk4dkqp43pud6/calculator_animation.aep?dl=0 (the aep file in question)

@Ushaka that link is broken. If you could link me with the after effects file i will check it out :)

@buba447 Oh, I must have moved it by accident. Here it is again:
https://www.dropbox.com/sh/kt1redr3e1j2e7c/AAASAgu_dt7o3upfG_0iW6dla?dl=0

Hi Ushaka! Gave your AE file a look, and it looks like you're issue isnt transparency, its about "fill rule". (wtf is fill rule) Right now you have multiple paths in a group and the fill rule is letting each small square cut a hole out of the calculator. Right now Lottie doesn't obey this, it just merges the paths into one shape.

screen shot 2017-02-09 at 10 36 25 am

There is currently another issue for tracking Even-Odd Fill rule, which should alleviate your problem.
https://github.com/airbnb/lottie-ios/issues/43
We hope to support this very soon.

In the mean time, the only workaround is to make each of the squares in the calculator its own group and give it the color of your background

Thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ricardohochman picture ricardohochman  路  4Comments

loganblevins picture loganblevins  路  3Comments

whisterlee picture whisterlee  路  3Comments

JALsnipe picture JALsnipe  路  4Comments

RamblinWreck77 picture RamblinWreck77  路  3Comments