Lottie exporter v1#775
Conversation
|
Indeed, I didn't mean this was going to be for 1.0 but 1.1 if you will consider it as a good addition. In the meantime, anybody can play with the builds created in this PR and start creating things if the resulting lotties are good enough for them 😉 I will try spreading the news in the issues and discussions mentioned before in order to get some feedback. |
|
Yes, there are things I would do in a different way if integrated in Friction, most of them are UX related, dialogs, options and so, but it's not time now for that, let's see if some Lottie eagers play with the builds |
|
btw, hidden items are exported. |
What do you mean? In the json file? |
Hide an item and preview/export lottie and the item is there, you will need to exclude hidden items. |
Oh! I understand now, yes, you are right, they are not filtered... I will fix it 😉 |
|
btw, added a reference project: https://github.com/friction2d/friction-examples/tree/main/lgm2026-state-of-friction Can be used for testing/comparing for lottie etc. |
|
Ok, can confirm latest commit works with https://github.com/friction2d/friction-examples/tree/main/lgm2026-state-of-friction The lottie preview looks identical(?) to the svg preview. I do however get a warning in glaxnimate
but it does work
|
|
I will create a Exporter plugin system for v1.1. That way it will be easier to make exporters. We will use this exporter as a reference on how to make a plugin. Don't worry about the code, I will adapt it. |
Yes, it does work for me too.
I think it's on Glaximate part, I trust the official JSON editor better (it loads with no error at all): Or even a pretty nice online player: |
I like the idea, that way anyone could create and share their own exporter (or improve the available ones). Will default SVG export turn too into a plugin then? |
Not really, SVG is part of the Core, but the SVG export dialog could be a plugin (and could support post-processing of the SVG, an example could be a dialog for creating a interactive SVG/HTML etc). |
I'm now playing with an importer for already animated SVGs to turn into editable Friction projects, it's progressing fine 😄 I'm commenting it because I guess they could also be added as plugins for v1.1, doesn't it? |
|
path inside Group layer ungroup in JSON. so it make imposible for opacity animation |
Hi @irwant, would you mind trying it now with the new builds?: |
|
good. that work perfect. |
Hi @irwant, parenting support has been implemented using two export modes:
This allows Friction Parent Effects to work across groups while using native Lottie parenting whenever possible. Try it out with the newest builds: |





Hi,
I've been playing (again) with IA and the idea of using Friction to export to Lottie format as it is a very common to be requested (#720, #516 (comment), https://github.com/orgs/friction2d/discussions/114, https://github.com/orgs/friction2d/discussions/757, https://github.com/orgs/friction2d/discussions/293, https://github.com/orgs/friction2d/discussions/756).
I know @rodlie not much time ago said that, if it would be implemented, it would be exporting to lottie via SVG, that is, Friction to SVG to Lottie.
I investigated that approach but there are no goods parsers and they don't cover all features, we finally went to the option to integrate it into Friction using all the code already prepared for SVG exporting but using it for Lottie instead.
This solution doesn't touch Friction code, animators, etc. it just uses what it is in Lottie advantage (maybe there are one or two little specific tweaks but innocuous to normal Friction.
So, I duplicated the idea of having a fast "preview" and an export dialog window to setup some things and, man, the feature started to work from the very beginning very easy and smooth.
It took some time to add one by one little features ensuring all was as clean and natural as possible.
I almost touched no code, so most of the ideas are the IA ones but made sense to me.
At this moment, the features added are:
DstIn/DstOutmasking (two adjacent objects or group/layers)lottie-web0.1xto4xlottie-webSVG renderer issueSome notes:
0..totalFrames-1timeline.I don't mean with this PR to want it inside Friction, but at least to be discussed as it was kind of effortless and could be treated as an experimental feature (to be even activated or deactivated) but to be honest, it could bring more users or coders to have a look to Friction as an editor...
Test builds (newest):
Try it out and let discuss about it 😄
Cheers