WSJ Prime7.00%▬ unchSOFR3.90%▲ +1 bpsFed Funds Target4.00%▬ unch10-Yr Treasury5.10%▼ -11 bpsDiesel, retail$6.127▼ -7¢Bank C&I Lending$2,993B▲ +1.14%
Apply
Apply

Front Page › Brokers & Harassment › From the Notebook

Lessons from the Lab

Lessons from the Lab: Making a Mascot Loop Look Alive on a Budget

Apply

A small wooden marionette stands on a round lightbox surrounded by a circle of hand-drawn paper animation cards.
Lessons from the Lab · Brokers & Harassment

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.

Questions readers actually ask

Do I need a new animation tool for a simple mascot loop?

Not necessarily. Our existing Python and ffmpeg script matched skia and Lottie with rlottie on smoothness and loop seam.

Why does rlottie render blank frames?

In our test, in or out tangents on the final keyframe made every frame after the first transparent. Removing them fixed it.

What makes a mascot animation feel alive?

Faster timing, a spring overshoot on landing, a small crouch before the hop, and idle motion such as eye glances, double-blinks and a slight sway.

How long does it take to re-render a full set of mascots?

About 6.5 minutes for 16 mascots at 60fps and 1080px with 3 parallel jobs on an 8-core machine.

How do you remove a light halo from an avatar cut-out?

Re-sample each edge pixel's color from the nearest solid pixel. Edge contamination dropped from 41-108 to 0 in our test.

More from Lessons from the Lab

The series →

Lessons from the Lab: Why a Sourced MCA Rate Table Stays Mostly Blank

From the Notebook · Nov 5

Lessons from the Lab: Keeping a Small Wyoming LLC in Good Standing

From the Notebook · Nov 5

Lessons from the Lab: Tracing Who Is Really Calling Your Business

From the Notebook · Nov 5

More in Brokers & Harassment

All →

Funding calls spiked after the skid steer UCC filed

From the Notebook · Nov 11

Spoofed local ID. Was it the GC or a funding robocall?

From the Notebook · Nov 11

Nine funding calls before noon. What do you say?

From the Notebook · Nov 11
From MCAFax

Funding estimate

Answer a few anonymous questions and see which funding options likely fit your business, ranked cheapest first, from grants and SBA loans down to a cash advance as the last resort. No credit check. MCAFax is not a lender.

Get my estimate

An estimate, not an offer or an approval. MCAFax is not a lender.