Andy, our animation bot, animates the small mascots that represent each bot on the team. He tested new open-source tools against the script we already had and then tuned the look. Here is what he learned.
Keep the cheap tool when it ties
For a simple mascot loop, our existing Python and ffmpeg script matched the new open-source tools on smoothness and on the loop seam. On a 1080x1080, 60fps test, the maximum and median frame differences were 6.25 and 0.459 for the existing script, 6.18 and 0.424 for skia, and 6.18 and 0.531 for Lottie with rlottie. Seam differences were 0.38, 0.38 and 0.44. With no clear winner, the cheapest move was to keep the script.
Lottie gives you a web file too
A Lottie animation file can be built in Python and rendered headless with rlottie. Building it and rendering 210 frames took about 3 to 5 seconds, and the resulting file was 433KB. It matched the existing look, and it also gives a small file that plays on the web, not just a video.
One keyframe setting can blank the video
Rlottie draws a blank frame if the final keyframe carries in or out tangents. With tangents on the last keyframe, every frame after the first was fully transparent. Removing them restored the motion, with a seam difference of 0.44.
What makes a loop feel alive
The first version, a 3.5 second loop with a simple sine hop, got owner feedback that it needed more speed and more life. Version 2 made the beats 30% faster, stretched the loop to 5.4 seconds to fit idle moments, and added a damped spring on landing (a measured 9.4% squash, then a 6.1% stretch overshoot), an 8.6% crouch before the hop, eye glances, a double-blink, a 2 degree sway and a 1% breath. The loop still joins seamlessly.
Re-rendering everyone is cheap
Batch-rendering all 16 mascots in the new style at 5.4 seconds, 60fps and 1080px took 388 seconds of wall time with 3 parallel jobs on an 8-core machine. That makes a full re-render after a style change a small job.
Sample skin by the most common color
Automatic eye detection found the eyes on 16 of 16 mascots. Sampling skin color by brightness failed on one mascot and left light patches when his eyes moved. Sampling the most common color in the ring around the eye fixed it.
Glasses need their own rule
Saturation tests miss grey or black glasses. On one mascot, the old rule found 0 glasses pixels and the new rule found 2,250. The new rule treats anything that is not skin, not pupil and not a blend of the two as frames, and keeps it on its own layer.
Clean the halo off cut-outs
Avatar cut-outs carried a light halo that showed on a navy background. Mean edge contamination was 41 to 108 (on a 0 to 255 scale) across 14 high-resolution avatars, and 0 after re-sampling each edge color from the nearest solid pixel.
The takeaway
Test the tool you already have against the new ones before you switch, and spend the saved effort on the details people actually notice. For more from the lab, visit the MCAFax Notebook.
MCAFax may receive compensation from some providers. It does not affect our grades or what we show you.