Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Lottie animation using ThorVG #9104

Open
hermet opened this issue Feb 16, 2024 · 1 comment · May be fixed by godotengine/godot#91580
Open

Add support for Lottie animation using ThorVG #9104

hermet opened this issue Feb 16, 2024 · 1 comment · May be fixed by godotengine/godot#91580

Comments

@hermet
Copy link

hermet commented Feb 16, 2024

Describe the project you are working on

I'm the lead of the ThorVG project (www.thorvg.org). ThorVG is dedicated to the development of a vector graphics engine that supports both Lottie animations and SVG

Describe the problem or limitation you are having in your project

Lottie (https://lottie.github.io/) is quite popular and is now the industry-standard format hosted by the Linux Foundation. Similar to SVG, Lottie can be used not only for static but also for animatable vector graphics assets for UI, icons, and in-game content. In most cases, Lottie's feature coverage is quite similar to SVG, but it is smaller and more efficient in terms of interpeting / data size.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

By incorporating Lottie features, it is possible to improve the Godot development environment for various designs/apps demanded in the industry.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

Godot has already integrated the ThorVG library for SVG features, and ThorVG is prepared for Lottie support as well. There is no heavy lifting required from Godot for this integration. We only need to consider the animation frame control functions in Godot and binding to thorvg, based on the existing interfaces.

If this enhancement will not be used often, can it be worked around with a few lines of script?

There is no widely preferred animatable 2D vector format. While SMIL exists, it is no longer considered a viable option for products. Alternatively, GIFs or videos could be used in a limited way.

Is there a reason why this should be core and not an add-on in the asset library?

Godot editor also could use the lottie feature for UI assets.

@fire
Copy link
Member

fire commented Feb 16, 2024

Thanks for your proposal.

Lottie's popularity and efficiency make it a good choice for animated vector graphics assets.

Incorporating Lottie features into Godot could improve the visual quality of applications outside of games like the car interfaces and for 2d games.

Since Godot has already integrated the ThorVG library for SVG features, adding support for Lottie is the next step.

We'll need to examine how animation frame control functions in Godot and how binding to ThorVG based on existing interfaces would work. There are a few implementation options like software rendering, OpenGL and Vulkan external rendering or a port to Godot Engine's render device, but we'll have to discuss which would be the better approach given rendering performance and developer iteration time.

As Thorvg is already in the core, duplicating the code in an add-on seems like a shame.

The subtle use of Lottie for editor elements would be wise ux-wise, and applications and games could make use of this given the popularity of paid tooling like Spine2D, Live2d and DragonBones.

@Calinou Calinou changed the title Support Lottie animation in the same way Godot supports SVG. Add support for Lottie animation using ThorVG Feb 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants