godot-extended-libraries / godot_vector_graphics

Basic vector graphics in the Godot Editor
MIT License
9 stars 1 forks source link

Investigate Lottie #1

Open fire opened 4 years ago

fire commented 4 years ago

Export animations to SVG and then animate with animation player.

faildozerYesterday at 06:32 lottie is actually just a system for rendering adobe after effects animations that are exported as json https://airbnb.io/lottie/

fire commented 4 years ago

https://github.com/airbnb/lottie-web/blob/master/docs/json/layers/shape.json is their Json schema.

fire commented 4 years ago

https://github.com/airbnb/lottie-web/blob/master/player/js/renderers/SVGRenderer.js Can export to svg.

fire commented 4 years ago

manifest.json https://dotlottie.io/structure/#dotlottie-structure

{
  // Name and version of the software that created the dotLottie
  "generator": "LottieFiles 1.0",

  // Target dotLottie version
  "version": 1.0,

  // Revision version number of the dotLottie
  "revision": 1,

  // Name of the author
  "author": "Alibeyya",

  // List of animations
  "animations": [
    {
      // Name of the Lottie animation file without .json
      "id": "test",

      // Desired playback speed
      "speed": 1.0,

      // Theme color
      "themeColor": "#ffcc00",

      // Whether to loop or not
      "loop": true
    },
   // More animation file listings, if any...
   ....
  ],
  // Custom data to be made available to the player and animations
  "custom": {}
}
fire commented 4 years ago

https://github.com/Samsung/rlottie exists. https://github.com/windows-toolkit/Lottie-Windows exists (mit). https://github.com/google/skia (BSD? MIT?) https://skia.org/user/modules/skottie

Feature from Sage to support svg CRUD.

fire commented 4 years ago

NullCanvas for Skia can be investigated for direct Godot usage.

Take lottie file. Use https://skia.org/user/modules/skottie. Render to Godot as a implementation of SkCanvas.

fire commented 4 years ago

https://skia.org/user/build describes how to build skia.

Translates gn to cmake.

bin/gn gen out/config --ide=json --json-ide-script=../../gn/gn_to_cmake.py

fire commented 4 years ago

https://github.com/airbnb/lottie-ios https://github.com/airbnb/lottie-android

Either port swift or java to c++.

fire commented 4 years ago

Currently integrating rlottie.