Does anyone know if there's something I was missing about Lottie if I needed to choose between them in the future?
https://rive.app/blog/introducing-vector-feathering
I do understand the appeal for an open format though. Rive seems to have their own proprietary (documented) binary format: https://rive.app/docs/runtimes/advanced-topic/format
Then I downloaded the app and found you can't use it without setting up an "account" and being online.
So in the end, this is more tiresome Web-only crap. Deleted.
I’ve personally pushed against the use of Lottie in projects I’ve worked on due to the file sizes being very difficult to justify for the kinds of animations that our designers wanted to use it for. SVGator was another alternative we had success with.
One thing I’ve been very frustrated is the amount of places I see Lottie pushed with no mention of file size. ie tools like Webflow, and general advocacy from prominent figures in the tech community. I’m sure there is a sweet spot for Lottie, but I’m also convinced that there are better choices for use cases most people are using it for.
This can also be used for progressive enhancement, since if the user has requested reduced motion you can simply leave the first (or last) frame of the animation, or hide it altogether.
I love the idea, it's really cool that you can generate the animations from what animators already use, but boy, the implementation of it is very disappointing.
The format is probably one of the worst choices they could do for a use case like this - it's JSON, for something that is usually a bunch of numbers and perfect fit for more compact binary format. This JSON can reference external files, so the animation is either
- a folder with bunch of files (sub pictures)\
- or those files are inlined in the JSON as base64
- or it's just a single file, which turns out to be a zipped folder of this amalgamation.
If you imagine loading this on the web, you have to load absolutely enormous SDK (which is not very actively maintained and isn't very well size optimized), and then loading the animation either means loading a bunch of files separately, or loading a single file but processing it through multiple different parsers in multiple passes (JSON, base64, png, lottie, zip). If you use the .lottie file, you have to include zip decompresser in the JS bundle (.lottie player, which is a different library, also uses 2MB wasm blob, not sure why).
It took me a while to squash the footprint of this craziness in our app and I'm glad we don't use it in a hot path, because this is just crazy - it's supposed to be this little cherry on top for special occasions, but it's by far the heaviest part of the codebase. I had to manually tweak tose animations, run them through some optimizers, fixup weird path and inlining issues, fixed issue with those exporters turning vectors to png, all sorts of stuff.
On top of that, the browser doesn't survive playing more than a few of them reliably at the same time (especially on lower end devices), because turns out (who would have guessed?) - animating stuff with JS and DOM is not quite performant.
I kinda want to try a weekend project to turn these into optimized svg sprites and try to play them with a CSS transision, see if this makes it more bearable.
In many cases just rendering a video and binding playback to interaction is much more lightweight and less work-intensive than using Lottie.
I’ve heard about Rive before and a lot of the choices they make seem to be exact fixes for the issue of Lottie. I haven’t worked with it yet however, so YMMV.
- there's still tremendous demand for a product like Flash, an easy interface for non-technical creatives to build animations
- building / compiling to web standards is highly suboptimal and we need binary formats special purposed for animation
On the other hand, I wouldn't want another proprietary binary format to deal with.
And it seems like zipped JSON is almost the best of both worlds -- text-based so debugging and manual editing in a pinch is easy, but around as small as a binary format would be.
Sometimes I wonder if there shouldn't be a kind of optimized library that translates directly between 1) an in-memory structure based on e.g. class attributes rather than dictionary keys so the repeated keys aren't using up all your memory, and 2) writing out to zipped JSON format but automatically creating zip dictionary entries for keys, syntax like braces, numbers, repeated values, etc. It could be vastly faster than regular zip compression because it wouldn't be creating a dynamic dictionary, but would know the repeated bits and frequencies in advance. (I.e. by default wouldn't compress English text within JSON values, but you could also enable regular slower global zip compression if you wanted.)
So the file format would still just be zipped JSON that any tool can read. But you could use this optimized library to convert directly between a much smaller size on disk and a small size in memory, without ever having to e.g. hold the entire JSON uncompressed string in memory at any stage.
Maybe something like this already exists? I haven't come across it though.
In my experience zipped JSON is not a magical panacea. It usually isn't as small as a binary format (especially a compressed one), and you usually need to decompress the whole thing in memory before you can use any of it. It's a lazy bodge, not a proper solution.
So that's why I'm saying, there's really something to be said for zipped JSON. You point out that you "usually need to decompress the whole thing in memory", and that's precisely what most of my comment was about -- handling it efficiently so you don't.
And it's not like protobuf is inherently any better at that anyways -- if you want to access a record in the middle of the file, you've got to stream the whole file up to that point to get to at it. It doesn't support random access in any native way.
So I'm kind of bummed out my original comment is being downvoted -- I'm making an actual serious proposal in it. I think zipped JSON should actually be taken seriously as a file format in its own right, especially with much more memory-efficient decoding.
Managed to get rid of two animations, and put another two together with lottie thing istelf into lazy loading. Still, I consider that battle lost rather than won, because I couldn't really convince the designer or other developer why having 8 megs for a bundle is a bad thing.
Can we see what you've built?
Edit: Huh? What's wrong with wanting to know more?
Many designers I've worked with get really excited about Lottie animations but I usually just make the animations in CSS since it's more performant and easier to work with.
By the way, CSS animations have gotten significantly easier with the @property rule. Simply edit the CSS variable and your animation will update!
Not sure if this is only a problem with lottielab or the lottie format, but if not using their proprietary minimizing hosting the animations are so big that I consider them useless for a landing page. Their compression reduces the size by 400% on average for larger animations. We ended up paying $30 subscription just to host the animations which does not sit right with me. So will be looking for alternatives but not looking forward to recreating them..
In the past I’ve used other react based animation libs and they chore of building animations was so tedious I would not attempt anything complicated. With lottlielab you can really play and build what you can imagine with relative ease.
Have not tried Rive.. Will check it out. Any suggestions on how to better compress lottie format for libs for that would be appreciated.
Telegram uses it for animated stickers, Samsung itself uses it for icons on their smart watches
*I will add though if you absolutely need to, use Telegram's fork. They've at least fixed most of the known issues (with very great commit messages like "fix bug")
This page:
https://airbnb.io/lottie/#/community-showcase
Absolutely cooks my company-issued laptop and my belief is that had it been done via CSS, it wouldn't have this effect.
herrherrmann•5h ago
I’m sure it is a good fit for usage on native mobile apps, though.
throwanem•5h ago
I've worked with Lottie animations as a mobile app dev, but never authored one.
pavlov•1h ago
Instead you have to ask an artist to author a project from scratch within Lottie’s limitations, but of course there’s no feedback within AE itself if you’re overstepping the boundaries, so they have to be particularly careful.
I wouldn’t recommend it based on my personal experience. But I guess there are teams who have the diligence to make it work.
legulere•5h ago
JusticeJuice•5h ago
herrherrmann•4h ago
echelon•5h ago
Contrarian opinion: Flash was one of the best things about Web 1.0.
The forced move to CSS and the constellation of other "standards" still hasn't caught up to what Flash once offered us.
Flash was all at once a video format, animation format, programming environment, video player, interactive UI system, game programming engine, multiplayer MMO game dev engine, infographics system -- actually, it was literally everything you wanted it to be. And it was so simple that even kids could use it.
If Adobe had opened everything - the format, the player, etc. - it could have become something tremendous that is still with us.
I think there's space for this to be rethought and redone. We shouldn't be so dogmatic that CSS and SVG and HTML and Javascript are the only way. They've had nearly 40 years to shine and we're still struggling with the same issues.
We should be trying to reinvent the wheel.
bsimpson•5h ago
It really was a wonderful tool that is still unmatched for creative coding.
Benanov•5h ago
A lot of interests in web-based video wanted DRM, which meant it was never going to be usable by Free Software.
It was trying to do too much and then the usual corporate mismanagement led to its demise.
atemerev•5h ago
Same goes for Java applets.
It's always politics.
WorldPeas•4h ago
DidYaWipe•1h ago
Aurornis•4h ago
Hard disagree. Modern web apps can be amazing within the browser alone. Look at Figma or OnShape as class leading examples.
I think you’re also misunderstanding Lottie: For web use it is compiled down to those browser primitives you were talking about. It works well, too, so I don’t understand why you’re claiming we’re “still struggling”.
echelon•4h ago
Because we are.
If you've ever used Flash, you know how easy and accessible it is to create.
The results were 100% portable and even downloadable. You could treat flash files like gifs or pngs.
The web document standards don't work that magically. They have never lived up to what you once could do.
> For web use it is compiled down to those browser primitives you were talking about.
Gross. I want a single, self-contained file that I can open on my computer without having to open a browser. Not an assortment of JavaScripts and css files.
Anything can be a "standard". The web standards are way too big. And they've accumulated decades of baggage.
brulard•3h ago
detritus•3h ago
There are plenty of options today for technically-minded or 'computer people' to work with, but there's a dearth of options for the 'merely' creative to play around with and investigate.
A lot of the magic from the 'old' (mid?) web came from people who had very little initial interest in the technical nature of the solution from just going ahead and making Cool Shit™ anyway. Some of those people might then relish getting their hands grubbier and delving deeper into the technical guts (eg. Praystation et al).
- ed : for the record, at the time i was also critical of the proprietary nature of Flash.
brulard•2h ago
rixed•3h ago
What do you mean by that? My understanding of the above suggestion is that the author dreamed of a world where something like flash would have become the standard, so part of the browser, without the (proprietary) extension.
satvikpendem•43m ago
hbarka•4h ago
dagmx•3h ago
From energy use, to security and accessibility, it was very problematic.
hbarka•3h ago
throwanem•3h ago
hbarka•2h ago
throwanem•1h ago
As though a rich kid channer ever impressed anyone.
ofrzeta•2h ago
dylan604•3h ago
At this point, the only think I see being Flash was the app with its timeline to make the animations visually instead of just with code. I've seen plenty of Show HNs of various apps attempting he animation UI similar to Flash, so I know they are out there. I just have no need for that type of work, so I don't spend too much time with them.
cwillu•2h ago
echelon•2h ago
satvikpendem•41m ago
afavour•5h ago
panstromek•4h ago
nine_k•5h ago
A good example is the Telegram messenger that uses Lottie as the format of animated stickers, e.g. https://tlgrm.eu/stickers/Princess (click to animate).
herrherrmann•5h ago
throwanem•3h ago