Lottie-ios: Animation Trim Multiple Shapes Individually (implemented in bodymovin) but not in Lottie yet

Created on 3 Feb 2017  路  15Comments  路  Source: airbnb/lottie-ios

I've been trying out this aep.
In After effects:
rocket_aep

The result is this json file: https://www.dropbox.com/s/8r807g1hcntrzt7/rocket.json?dl=0

The result:
rocket_result

Bodymovin Settings, if it helps:
screen shot 2017-02-03 at 10 42 02 am

enhancement

Most helpful comment

@yozef @tomasbarcys It's not trivial to get done on Android and iOS but we are working on it :)

All 15 comments

Are you using trim offsets?

I'm using trim paths:
screen shot 2017-02-03 at 10 58 40 am

I tried again with another animation, I get the same:
checkmark_aep

Result:
result

(If you need the aep file, I can send it to you)

I'm having some similar issues that seem to have something to do with position or anchor point transforms not coming through properly. Although, I think this issue might be due to bodymovin because it renders the exact same way in the bodymovin player

This turns out to be a bodymovin issue which dosen't handle yet Triming Multiple Shapes Individually

Out of curiosity @buba447: Once bodymovin handles this use case, would lottie-ios & lottie-android handle them as well out of the box or support would also be needed for these libraries?

Ohhh interesting! I will have to look into this

I was experiencing this yesterday as well. Good to know where it's coming from.

I was working with a simple animation with two paths being trimmed by animating the "End" property in separate groups on the same shape layer. My quick fix was to animate the "End" property in one group and animate there "Start" property in the other. The other option would be to separate the groups into their own layers. The Explode Shapes Layers script is extremely helpful for this process with more complex animations. http://aescripts.com/explode-shape-layers/

Trim Multiple Shapes Individually is now supported in bodymovin version 4.5.4.

However, I think Lottie (iOS & Android) needs updating to handle this (the bodymovin commit): https://github.com/bodymovin/bodymovin/commit/e7617af51c0d38e18c25c6da3a8f8ef76dd15d4c

I can look into supporting this on Android as well

Any update on this? Would love to be able to use Trim Multiple Shapes Individually.

@yozef @tomasbarcys It's not trivial to get done on Android and iOS but we are working on it :)

@yozef Can you attach the AE file for either or both of your animations?

@yozef Thanks. As of 2.0.0-beta2 (for Android) which I'm going to release today, I was able to get rocket working. However, I had to make one small modification. I moved the stroke outside of shape 1 and shape 2 so that the trim path individually knows about both shapes:
image

Should be fixed in Lottie 2.0! If you still have a problem please create a new issue!

Was this page helpful?
0 / 5 - 0 ratings