airbnb / lottie-android

Render After Effects animations natively on Android and iOS, Web, and React Native
http://airbnb.io/lottie/
Apache License 2.0
35.03k stars 5.41k forks source link

Rendering only specific 3d rotation animation incorrectly #1790

Closed cyb3rko closed 3 years ago

cyb3rko commented 3 years ago

Checklist

  1. My animation doesn't use any unsupported features.
  2. I know what part of my animation doesn't work.
  3. I have created a simplified version of my animation
  4. I have attached the AEP file (as a zip file so it can be attached) that only has the part of the animation that doesn't work.

Yep, animation is here: 18089-gold-coin.zip (https://lottiefiles.com/18089-gold-coin)

Describe the bug I tried using two different coin animations:

  1. https://lottiefiles.com/36928-fake-3d-coin
  2. https://lottiefiles.com/18089-gold-coin

The first one is working fine but the second one is not rendered correctly. It seems like the 3d rotation is not calculated correctly and stays 2d or something...

What version of Lottie did you test this on? Versions 3.7.0 and 3.5.0

What version of Android did you test this on? Android 11 and Android 9

Steps To Reproduce Steps to reproduce the behavior:

  1. Add xml element:
    <com.airbnb.lottie.LottieAnimationView
        android:id="@+id/animation_view"
        android:layout_width="200dp"
        android:layout_height="200dp"
        android:layout_marginTop="30dp"
        app:lottie_fileName="coin-spin.json"
        app:lottie_loop="true"
        app:lottie_autoPlay="true"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toEndOf="parent" />
  2. Just start the activity and let the auto play do it's thing.

Screenshots

  1. Working coin animation (https://lottiefiles.com/36928-fake-3d-coin)

https://user-images.githubusercontent.com/46033730/115122322-9609fa80-9fb7-11eb-85cd-5831a04fcb60.mp4

  1. Non working animation (https://lottiefiles.com/18089-gold-coin)

https://user-images.githubusercontent.com/46033730/115122343-b6d25000-9fb7-11eb-9bb1-205cbfcd5de5.mp4

  1. The second should like like this:

https://user-images.githubusercontent.com/46033730/115122351-bcc83100-9fb7-11eb-8f3a-af6a97bb79c4.mp4

gpeal commented 3 years ago

Lottie Android doesn't support 3D https://airbnb.io/lottie/#/supported-features

cyb3rko commented 3 years ago

But why does the other animation work then? Cause it rotates in the same dimensions, right?

gpeal commented 3 years ago

@cyb3rko one was probably created with just 2d layers.

cyb3rko commented 3 years ago

Ok, thanks.

hardikm9850 commented 1 year ago

Hi @gpeal 👋 Will 3D support be available for the Android SDK in the near future? It would be great to have 🙌🏼 Trust iOS has started providing the support for 3D