Does not render correctly
I have two animations from my design folks here at Qwello and both look very incorrect in the rendering of this crate vs the official renderer: https://lottiefiles.github.io/lottie-docs/playground/json_editor/. It is not only blending, but a lot of other things.
How much of the standard is supposed to be correctly implemented? I cannot share the files publicly, but I can make them available via email if that is of interest for debugging purposes.
My use case is the following: I'd like to take a Lottie file, remove all texts from it, then create PNG files for every frame, in which I can then draw text again. For this, I need to remember the draw position of each text for every frame - since they can be animated. The reason is internationalization: I need PNG files for our asset pipeline, but we have multiple languages and would like to automate the generations.
I assume that lottie-rs is not ready to do the PNG generation, but that is fine, I can use puppeteer-lottie there. However, I hope to be able to use lottie-rs to get the information where to draw the text to. Do you think this is feasible?
Sorry but I don't think so. The lottie file format is really complex and lack of documentation (The "official" doc you referred to is from lottiefiles.com, which I think is not really official since lottie is from airbnb I think?). Even though I tried my best to mimic the behavior of the web renderer, there's always a gap. Text rendering is IMO the hardest part in the pipeline. This project can hardly be production-ready in a short time, given that I can only contribute in my part-time.
Anyway, you can still strip down the file and send it to me so I can make this project better. To strip down a lottie file, you could just keep the wanted layers and remove everything else.
By the way this crate is made to do server side rendering, and could generate png files just file. Incorrect rendering is another problem though.
Thanks for your consideration! I really appreciate you working on this project and I hope it becomes a true alternative to the web renderer eventually. For now I will try to work my problems without relying on lottiefiles.
Feel free to checkout https://github.com/vectorgameexperts/bevy-vello, which has text and supports JSON lottie/svg.
It uses compute shaders for rendering through Vello, which is also much more performant.
@simbleau Thank you for self-promoting this much more performant approach! Have a nive day.
@SirVer if you just want bbox for texts in every frame, skottie is the best.
@simbleau I'll have a look at it.
@zimond Let a thousand flowers bloom, right? I'll check out skottie too, thanks for the pointer!
@SirVer skottie is battle-tested and also passes almost all lottie tests. We use it in our production. This project, in the meantime, is our experimental approach to use Rust in the pipeline. Still if you want to contribute to lottie-rs, you're welcomed to send me any file that not rendered correctly.
@zimond Do you mean this skottie? https://skia.org/docs/user/modules/skottie/. I will need to use skia then too, right?
@SirVer yes indeed