lottie-android icon indicating copy to clipboard operation
lottie-android copied to clipboard

Allow simultaneous time stretch and work area with precomps

Open marianpavel opened this issue 7 years ago • 11 comments

Hi,

I've requested to the designers of a project to use the Lottie library and get me the JSON file of the animation. I have received two files, a JSON, and an HTML web page. As you guessed opening the web page shows me the animation but when I import it in android using Lottie or test it on sample application from this repo the animation is not played at all.

I asked the designers for the after effects source but I think it will take some time to receive it and I tough I can find a solution till then.

Below you have the JSON file attached and the web page. Hopefully, I can get some help. reserve_animation.zip

Best, Marian

marianpavel avatar Apr 19 '17 11:04 marianpavel

It definitely looks like something isn't rendering correctly. As soon as you attach the AE file, I can take a look

gpeal avatar Apr 19 '17 11:04 gpeal

Thank you @gpeal , I have attached the after effects source file. Thank you ! source.zip

marianpavel avatar Apr 20 '17 13:04 marianpavel

The same is in my case too. My animation consists of images and text animation but only image animation work. I am not able to view an animation which consists of text part. Any update on this issue.

shashankpsingh avatar May 22 '17 09:05 shashankpsingh

I have asked the design team to redo the animation with the most basic components. After few tryes, the animation works like a charm.

marianpavel avatar May 22 '17 09:05 marianpavel

@shashank26ashu Lottie doesn't yet support text

gpeal avatar May 22 '17 23:05 gpeal

#287

charleston10 avatar May 31 '17 13:05 charleston10

@marianpavel I've just added support for time stretching and work area. However, you can't use the two together yet. If you can create your animation without using both at the same time, it should work now.

gpeal avatar Jul 03 '17 07:07 gpeal

I'll release 2.1 or 2.5 this week with the changes

gpeal avatar Jul 03 '17 07:07 gpeal

@gpeal time stretching is not working properly on 2.1 version for me. The animation blinks and stops before reaching the end. Can you please have a look at my .json or .aep files?

zmax91 avatar Aug 07 '17 06:08 zmax91

@zmax91 Please attach them to a comment here.

gpeal avatar Feb 21 '22 06:02 gpeal

I've spent quite a lot of time on this recently. The root cause is when there is a precomp that has time stretch inside of a composition with a work area that starts after 0.

The root cause is, unfortunately, very tricky to solve. Most of the Lottie internal components have access to their own info + the root composition. However, in a situation like this, the progress gets shifted by the root composition's start offset before it gets passed into the precomp. However, the precomp animations need to be able to handle when their own composition has a start offset but because it's pointing at the same root composition, it applies the start offset again which causes all of its progress calculations to be wrong.

Fixing this will require a fairly significant rework of how data is piped around to make it more hierarchical but there are a number of complexities around getting that right.

In the meantime, I've attached a repro AE project that is a minimal repro.

Time Stretch Work Area.aep.zip

gpeal avatar Mar 04 '24 03:03 gpeal