Birdoggydog's Builds

Building headless bodies with swappable heads in Blender

One written contract for every playable race's skeleton, clips and armor slots, six bare bodies built to it, and three neck joins measured through 110 frames.

Every playable race in Blobber now builds to one written body contract. There are six bare bodies at the ends of its range: human, elf, dwarf, goblin, orc and a lizard with a tail, from 1.16 m to 1.96 m tall. Each body is built without a head, and the head is a separate model that attaches at a neck socket. I had agents build it as a study on 10 October, and nothing is installed in the game.

The six frames in a row and walking, the human through its five clips, one body with four heads lifting off and coming down, one head on four bodies, each neck from 2 m, the lizard’s tail in the walk, and the armor slot boxes on dwarf and elf.
Human, elf, dwarf, goblin, orc and lizard bodies from the front, three-quarter, side and back
The six frames by day. The lizard's tail is a model of its own.

I named ten races that the party can play and that also live in the world: elves, humans, goblins, dwarves, cat or fox people, dog people, bird people, lizard people, dragon touched and Eldritch touched. That’s the core set the armor has to fit. I wanted swappable heads so I can make a bunch of different faces. I also set the order: races and their body types first, equipment after. The armor had just been built as rigid pieces fitted to slots measured on one orc, so I needed to know the range those slots have to cover before making any race.

Writing the contract as data

The contract is a Python module of constants with a check, plus a document next to the generator. If a body follows it, it can wear any piece of armor and play any clip.

  • Bones: 19, by name. Hips, spine, chest, belly, head, and a left and right clavicle, upper arm, forearm, hand, thigh, shin and foot. The body has no jaw bone. A headless body has no skin for one, and the model validator rejects a bone that doesn’t move any vertex.
  • Clips, by name and length in frames: idle 72, walk 32, attack 34, hit 16, death 56.
  • Regions the body declares in its manifest: helmet, chest, legs, hands, feet. A body with no legs leaves out legs and feet, and has 13 bones and 12 slots.
  • Slots: 20 of them in 13 types. Each is a box in its bone’s axes, measured on the skin of the exported file.
  • Sockets: a weapon on the right hand, neck on the head bone and tail on the hips. Every body has the tail socket whether it has a tail or not.

A slot in the manifest looks like this. A piece of armor is drawn once and then scaled on each axis by the slot’s size divided by the size it was drawn for:

{bone, kind, x, y, z, origin, size[3]}

The neck socket’s size is half width, head height and half depth. A head is scaled by one number, the body’s head height divided by the height the head was drawn at. The scale is uniform so a face keeps its proportions.

Ending the skin at the neck

The body is one skin over a field of masses on a skeleton, from the same kit the new orc uses. A subclass of the body builder ends the skin at the neck, deletes the head’s parts, and weights the last neck ring and its cap (13 points) to the head bone only. That makes the rim move rigidly with the head. The head is a lot of pieces sunk into a skin, and it’s exported with its origin at the neck point.

A body and head together come to 3,478 to 3,741 triangles. The lizard with its 208-triangle tail is 3,843. All 13 models come out as the same bytes on a second build.

Which neck join stays closed?

I had three joins built and compared on the human and the orc. sunk puts the head’s stub inside the body’s open rim. collar flares the body’s skin by 1.16 to wrap around the stub. ring draws both so they end on one shared circle and meet rim to rim.

Each one was measured by attaching the head to the exported body in Blender and stepping through all 110 frames of the five clips. That gives two numbers: the largest gap between the body’s rim and the head, and how far the rim moves relative to the head. Closed means under 1.5 mm.

JoinOwn head: human / orcElf head on orc (45 mm thinner)Orc head on human (33 mm thicker)
sunkclosed / closedclosedopen 14.0 mm
collarclosed / closedclosedopen 20.3 mm
ringopen 2.9 mm / closedopen 12.6 mmopen 17.9 mm

The rim never moved against the head by more than 0.001 mm in any of the twelve fits, because the rim is weighted to the head bone. If a join is closed at rest, it stays closed in every clip.

Sunk is the only join that’s closed with every body’s own head and with a thinner head. Ring looks the cleanest, but the man’s stub isn’t a circle, so 4 of its 14 rim points don’t touch. None of the joins close when the head’s neck is thicker than the body’s.

Sunk has a visual cost. The body’s rim is 13 to 36 mm outside the head. That looks like a rolled collar at 2 m and a dark fleck at 5 m, and you can’t see it at 12 m. The color doesn’t match either. The head and body are baked separately, so the head’s neck skin is grayer than the body’s on three of the bodies, and green against red on the orc. I approved the contract overall, but the neck ridges are still weird.

How far apart can two necks be and still swap?

One human body wearing the man’s, the elf’s, the orc’s and the lizard’s heads, full figure and close on the neck
One human body, four heads. The elf's fits. The orc's and the lizard's leave a gap at the neck.

Within one body type any head fits. Across body types it depends on the neck. The elf’s head on the human passes with a step of 8.8 mm. The orc’s head on the human leaves a 14.0 mm gap. The lizard’s gets scaled by 1.26 and leaves 20.4 mm. The man’s head on the dwarf and the orc closes, but it sits down in a hole with steps of 27.8 and 35.7 mm. So necks within about 9 mm of each other swapped fine, and necks 23 mm or more apart didn’t.

Which bodies set the range of the armor slots?

The goblin is the smallest in ten of the slot types and the orc is the largest in all thirteen. So the two bodies I already had set the range, and the four new ones fall inside it.

A box-fitted piece looks worse the more unevenly it’s stretched on its three axes. The upper arm is the worst at 2.00, then the shin at 1.91 and the forearm at 1.75. The hips, belt and waist distort the least, at 1.12 to 1.17.

Then the knight suit was run on the new bodies as draft solids, through the armor’s fit check. Outside the death clip it has 4 faults on the human, 4 on the elf, 8 on the lizard and 15 on the dwarf, compared with 0 on the orc it was tuned on. On every body the skirt goes 50 to 116 mm into the thighs during the walk. On the lizard the snout sticks 59 mm out of the closed helmet.

There was one real measuring bug. Heads were being attached and measured while the imported clip was still posing the body, so the lizard’s helmet slot came out 13 mm wide and 2 to 6 mm short.

Giving the head its own jaw

Each race’s jaw in the attack and in death, the human’s and the orc’s neck at 2 m before and after, three human heads on one human body, shoulders level and sloped 14 degrees, and the lizard’s tail lying on the ground in death.

A second pass on the same day moved the jaw out of the body’s skeleton. Every head now has two bones: head, rooted at the neck point, and jaw. It plays the body’s five clips by name, so mouths open.

The head’s clips come from the creature family’s table of keys. They’re filtered down to the jaw’s rotations and exported under the body’s clip names and lengths, so the head and body can’t get out of step. The jaw opens 18 degrees in the attack, 20 in the hit, 28 in death and 9 in the idle. The family never opens it in the walk, so there it moves 3 degrees each way, which keeps the exporter from dropping the clip.

I kept the sunk join. The body’s last ring is now tapered in under the head’s skin, and both sides use the same ring color. The mean step around the neck used to be 6.8 to 25.4 mm depending on the race, and now it’s 1.6 to 9.0. The crease went from 68 to 88 degrees down to 30 to 46. Baking the head’s shadow onto the neck was tried too, and it gave worse color and black flecks. A join under the jaw line opened up the human’s neck.

There’s still a thin dark line around the neck when the head tips. It’s worst on the human and the dwarf in the attack. The head’s rim is a free open edge lying on the body’s neck skin. When the head bone tips, the body’s last ring goes with the head but the ring below it only partly does. So the rim lifts on one side and its baked shadow band shows up as a line. I haven’t fixed that yet.

Sloping the shoulders with one knob

The human and the elf had shoulders like a flat shelf. The body kit got one new knob, slope, in degrees. Each shoulder joint is lowered by tan(slope) times its distance from the middle. The yoke, deltoid, armhole and the top rings of the trunk follow using the kit’s existing rules.

At 0 it does nothing, and that was proved two ways before rebuilding anything. The installed orc, rebuilt with the changed kit, comes out as the same bytes. And the workbench’s range builds (238 for bodies, 300 for the orc family) have the same triangles and bounds as before on every row.

The human and elf are set to 14 degrees, after I looked at sheets at 12 and 18. The human’s chest slot went from 0.173 to 0.157 m in half width. Height and neck didn’t change.

Why did the lizard’s tail sink 929 mm under the ground?

The tail didn’t have its own check. One was written first, and the tail failed it. In the death clip the body lies down, and the tail went straight through the floor.

The death clip now swings the tail out to the body’s left as the knees give way and lays it flat on the ground next to the hips. Over all 215 frames the root is 0.0 mm out of the hips (it was 15.5), no point passes through the body, and nothing is under the ground.

Also done

  • I decided the hide stays baked per race. A race gets several heads, and heads don’t swap between races. Two more human faces were built as a trial. Both close on the human body. The heavier one fails the gap check at its ear.
  • One more head for a race costs a row of knobs, a 1 to 2 minute build and about 120 KB.
  • The goblin body and head are declared as replacing the installed runt. They’re very different. The goblin is 1.16 m and 3,607 triangles bare, and the runt is 1.47 m and 9,775 with fantasy gear welded on.
  • Heads and the tail are a new pipeline class called part. It’s a model with its own small skeleton that attaches to a socket on a body.

Next

I still have the line around the neck, themed tails and the ear on a heavy face to deal with. A headless orc plus an orc head will replace the installed orc.