← Workshop

How mofu is built.

24 primitives

If you see mofu for the first time, you'd probably guess she's a 3D model someone made in Blender. She isn't. Her body is put together in code, from 24 simple shapes, and there are some very practical reasons for that.

It started with a ball

The first mofu was a ball. Round, with a face, pretty cute, but honestly more of a mascot than a cat. On 18 November she got four legs and the build of a British Shorthair.

On the left the round first mofu, on the right the draft with four legs on a small island
The first mofu and the draft with four legs. Still in the browser back then, there was no app yet.

When the picture-book style arrived at the end of November, we had to go back to her once more. How round should she be? We put four versions side by side on a meadow and stared at them for a long time. The bean won: compact, soft, and her head is a touch too big, which suits her rather well.

Four versions of mofu side by side

24 shapes under the fur

Under the fur there's a handful of ellipsoids and rounded cones. Body and head are a few big shapes, the legs are slim cones, the paws small flat ellipsoids, and the tail is a chain of segments. Where two shapes meet, they blend softly into each other, a bit like pressing two balls of clay together.

When mofu sits down or curls up, all that really happens is that these 24 shapes move somewhere else.

Technical drawing of mofu in four poses, with colored outlines of the primitives and dimension lines
mofu from the side, in four poses. The colored outlines are the shapes, the gray dots her skin. Sizes in world units.

Kneading was too expensive

Until the end of November, the app kneaded a fresh skin out of these shapes in every single frame. It looked nice, but took 6 to 11 milliseconds. At 60 frames per second you get just under 17 milliseconds per frame, for everything. That didn't leave much room.

Now the skin is kneaded exactly once, while mofu is standing still. After that it only gets bent. Each of its 8,368 vertices hangs on up to four shapes and moves along with them. Sitting, sleeping or grooming would make creases with bending alone, so there are corrections worked out in advance.

Wireframe of mofu's skin standing, colored by body part
The skin while standing. The colors show which shape a vertex mostly hangs on.

Bending takes about a millisecond. Since then, the app uses 60 to 80 percent less processing time on the iPhone when idle.

Stripes that stayed behind

Her fur color doesn't come from a texture. It's painted straight onto the vertices, stripes, spots and markings included. Early on, that came with a pretty funny bug. The paint went wherever a vertex happened to be in space. When mofu started walking, the stripes stayed put and her fur slid along underneath them.

These days the app first carries every point back to the resting pose and paints it there. Since then, the patterns stay where they belong.

Grid of mofu in every fur pattern, each from several angles
Every fur pattern from several angles, from tabby to calico.

Read more: How mofu's world is built, Costumes that belong to her fur and mofu no longer gets stuck in the furniture.