Delaney King Profile picture
Character/tech artist (Dragonage, Where The Wild Things Are, Unreal 04, Civ IV, D&D Online, God of War:CoO, Stellaris ++) Writer. Minis. Intersex. (SHE/HER)

Jun 9, 2023, 16 tweets

#gamedev
Okay so joints are best thought of as the central pivot of a ball.
Like you get on action figures.

The joint should go in the centre of the mass, NOT where out bones actually are.

To give you an example- poke your finger into your hip joint at the side and move your leg around, find where the joint in a human is.

Okay so what you have no doubt discovered it it is near the outside of our leg, not the middle.

But this is because of how our bones work...

Human bones are curved, so they can absorb shock. You don't want a straight bone as the force will run down the length and shatter it. See how our hip socket is actually deep, comes out then bends down.

BUT 3d bones are a straight line between two pivots.

So you see the pivot isn't where you think it is in the actual bone.
I am pointing to the bit you can feel, that orients down the bone itself.

If you simplify the 3d model in your mind right down, what you are doing is putting a ball joint in the blue areas here:

Another abstraction we make is that 3d bones have one fixed pivot point. Our bones roll against each other, which allows us to do things like kneel on our legs.

If you look at action figures again, you can see that to simulate the way our knees bend you need TWO pivots.
Because the bone heads are round and roll against each other.

So our joint placement is a cheaty abstraction of the real deal.
Furthermore, our skin weighting is also a hack.
Vertices rotate around a pivot (joint), compressing on one side, stretching on the other- so you are looking for the middle of the mass.

Here is an example of doing it wrong: this is from Vampire The Masquerade Bloodlines. The artist has put the joint where the bone is. Not the center of movement. So the leg BORKS when moved sideways.

So the way to figure out where you want a joint is this...

It's the center of the arc of every vertex between where it is and where you want it to be when rotated.
So look at that vertex here... it has orbited the joint.

The vertices of the pink mesh will orbit the joint when the pink bone is rotated. So I place the joint based on the extremes of where I want those to go.

Weight painting just softens the effect by distributing the vertex between more than one joint.

Extra joints can be added for more complex and accurate rigging, such as knees that can kneel without shearing like scissors.

So the easiest way to learn is to look at articulated action figures, as they are a simplified simulation of what we are doing.

In fact creating meshes as rigid and soft sections like this really helps you learn where to put the key edge loops (blue) and it looks very much like the shapes of action figures as well.

I am covering this with some nice clean visual guides and diagrams in my forthcoming book Violent Triangles, so stay tuned.

As always you can make me smile by buying me a coffee here:

ko-fi.com/dellak

Share this Scrolly Tale with your friends.

A Scrolly Tale is a new way to read Twitter threads with a more visually immersive experience.
Discover more beautiful Scrolly Tales like this.

Keep scrolling