Abishek Muthian

RSS Email Mastodon Wheelchair Bluesky Newsletter Twitter GitHub Dribbble LinkedIn Facebook Instagram YouTube Pinterest Reddit icon

AI for generating 2D animations

Posted at — Oct 26, 2025 by Abishek Muthian

Note: This post has embedded videos in them, If the videos don't load then please refresh the page.

I wanted to add some frills in Memory Hammer app1 when the user completes review of their flashcards. I decided to add a simple 2D animation where a brain is sulking and after being hit by the hammer (memory hammer's mascot) the brain becomes happy and jubilant.

I made a simple animation with Lottie first,

When I imported the .lottie file for the animation into my flutter app, I noticed that it's skipping frames. There's no official Lottie library for flutter, I saw someone else facing the same issue2 with the 3rd party Lottie library.

I recreated the animation with Rive next,

When I tried to export the animation from Rive I learnt that exporting requires paid tier plan3. The pricing for paid plan is reasonable but I didn't like the fact that I can't test the animation in the app before paying for their service, especially since lottie didn't work well earlier.

I briefly considered procedurally generating this animation within the app, then I realized life as a disabled person is time-constrained4 as is and so I shouldn't spend more time on such trivial things.

It's 2025, most people are fine with consuming AI generated content depicting real people5. A simple 2D animation if done right should be fine I think.

I generated this animation using hailuoai6,

Prompt: Brain is sad and sulking, gently move the brain up and down in a smooth motion while sulking, after the hammer hits the brain the brain becomes happy and jubilant, add sparks when the hammer hits the brain, slightly open the eyes of the brain when the hammer starts hitting the brain, after the brain is hit by the hammer smile gently, do not move the hands of the hammer

I took several attempts using the Hailuo 02 model, I purchased the paid tier for more credits. Some of the results were obviously weird, to put it lightly.

{}

I guess it's another way to interpret Memory Hammer!

I was curious to give the Local AI models a shot. This was generated using FramePack7,

FramePack is a next-frame (next-frame-section) prediction neural network structure that generates videos progressively using HunyuanVideo model.

This was generated using Wan2.28,

Wan2.2 is a video generation foundation model from Alibaba.

I was surprised how competitive the small local models are compared to bigger cloud models. In fact I felt the local models produced better results in the first attempt. Another interesting feature I noticed with FramePack is that its output is reproducible i.e. each new video generation doesn't result in a new video.

Of course there are other SoTA video generation models like SORA, Veo 3.1 etc. which I didn't consider for this experiment. Let me know if you would like to see them included.

I used Pinokio9 for the local AI models. Tangentially, One interesting quirk I noticed while running these models locally was that they all used Gradio10 UI for user interface and due to the nature of Python it maxed out just a single core from my 32 core CPU. I felt that it was funny that for the amount of optimization which goes into these AI applications, CPU bound routines seems to be bottlenecked by Python.

Gradio.py using only single core

I made a collage of all 4 animations, so it's easier to compare them -

Which one do you like better?

Discussions

If you would like to discuss with me about Apple Watch with Android, hop on to any of these social platforms - Hacker News, Bluesky, X and LinkedIn.

Sources

1: https://memoryhammer.com

2: https://github.com/xvrh/lottie-flutter/issues/323

3: https://rive.app/pricing

4: https://abishekmuthian.com/time-constrained-person/

5: https://www.bbc.com/news/articles/crkjgrvg6z4o

6: https://hailuoai.video

7: https://github.com/lllyasviel/FramePack

8: https://github.com/Wan-Video/Wan2.2

9: https://pinokio.co/

10: https://www.gradio.app/

Credits

Sad brain icon - https://www.freepik.com/icon/mental-illness_3576293

Happy brain icon - https://www.freepik.com/icon/mental-health_3576226

Newsletter

I strive to write low frequency, High quality content on Health, Product Development, Programming, Software Engineering, DIY, Security, Philosophy and other interests. If you would like to receive them in your email inbox then please consider subscribing to my Newsletter.