airbnb / lottie-ios

An iOS library to natively render After Effects vector animations
http://airbnb.io/lottie/
Apache License 2.0
25.76k stars 3.75k forks source link

A gradient issue in Lottie 3.1.2 #1022

Closed leegwiro closed 2 years ago

leegwiro commented 5 years ago

Check these before submitting:

This issue is a:

Which Version of Lottie are you using?

Lottie 3.1.2

What Platform are you on?

What Language are you in?

Expected Behavior & Actual Behavior

Please check a video attached. (gradient_impl.zip) It works fine with version 2.x implemented by objective-C. However, it does not work with version 3.x implemented by Swift.

gradient_impl.zip

image

Animation JSON

Here is files to help you solve the problem:

lottie_report.zip

  1. gradient.aep : After Effects project file
  2. gradient_render.mp4 : Rendered video in After Effects
  3. Gradient.json : json file exported to BodyMovin
hhai9x commented 5 years ago

I have same issue. Using version 2.x will be fine, but still have issue with scaling animation (Fixed at 3.x - https://github.com/airbnb/lottie-ios/pull/932)

Please help!

atistank commented 5 years ago

Same problem here with version 3.1.3 :( Please help us.

buba447 commented 4 years ago

I've looked into this and it has to do with the layer being scaled. The layer was created at 30x30 px and then scaled up. In lottie 2.5 the scale was applied to the curve before render, in lottie 3+ the scale is applied to the layer rendering the curve which is creating pixelation when scaled up.

This is obviously a regression but I need to think of the best / cleanest way to fix the regression without introducing performance bugs. For now it can be fixed in after effects by manually scaling the path up and resetting the scale of the group/layer to <=100%

buba447 commented 4 years ago

Added to my todo

xquezme commented 3 years ago

@buba447 Any updates on this issue?

LexHrabovskyi commented 3 years ago

@buba447 waiting for any updates too

calda commented 2 years ago

I believe this is fixed in 3.4.0

jhughes696 commented 1 year ago

hey @calda , I think this pixelation problem is still happening inn 4.1.2. My coworker @collinleix just posted a similar bug report here: https://github.com/airbnb/lottie-ios/issues/2066