# How to make rig that reacts to gravity or seem to behave physically correct?

Here's a nice, strangely familiar hat. It's rigged with three bones.

Let's say I want the hat to fall like a real hat would, and bounce around when the character which it's attached to moves. I could always do it manually, but that's no fun.

Is there any way to do this using Blender's physics system? I've seen some pretty clever jiggle-bone stuff using Bézier curves, Spline IK, and soft-body physics, but I've not found any way to make the curves act like a hat would, even after hours of playing with the settings.

• Maybe parent the outer bone to a cloth simulation Commented Nov 8, 2015 at 10:37
• @FacebFaceb The question is: how to parent a bone's root and tip to mesh verts? I have only been able to find this so far. No definitive answers as far as I know. Commented Nov 9, 2015 at 17:06
• Ok, sorry, I misunderstand :) I thought the question was how to make the mesh bounce realistically Commented Nov 9, 2015 at 17:13
• I haven't tried this, but you could use the techniques taught in this tutorial cgcookie.com/archive/creating-ragdoll-rigs to make the hat act as a rigid body. Commented Nov 9, 2015 at 23:44

# How to make a cloth sim rig

The trick is getting the bones of your armature to follow the vertices of your cloth mesh. This can be achieved by parenting Empties to the verts and then setting those Empties as IK targets.

## 1. Make a mesh and give it a Vertex Group for cloth Pinning

The mesh is extremely simple - just a chain of edges, made in the shape you want your armature to be in its rest position.

Assign a vertex weight of 1 to the base vertex because the cap needs to stay pinned on the head and not fall off. Assign less and less vertex weight as the vertices get further from the base and closer to the tip. My cloth object has only three edges and four verts, so I assigned weights of 1, 0.5, 0.33, 0.15 (from base to tip). Pinning the cloth object with weights allows the hat to be more cloth-like in some areas (the tip) and more rigid in others (the base).

Add a Cloth Simulation to this mesh object.

In the Cloth Sim settings enable Pinning and choose your "Pinning" vertex group.

Play your scene's animation to check that the movement of this skeletal "cloth" is alright. Grab and rotate the object while animation is playing to see the effect.

## 2. Add Empties and parent them to the cloth's vertices

Add an Empty for each vertex except the base one. Use Snapping (ShiftS) to position them exactly where the vertices are (while in their rest position, frame 1).

If you want to change the Display Size of your Empties this can be done from the Empties Context.

First select an Empty, then Shift-select the cloth object, Tab into Edit Mode, select only the vertex that is to be the parent, and press CtrlP to make it a Vertex Parent. Repeat this process for each Empty. The location of the vertices now determines the location of the Empties.

Create a bone for each Edge of the cloth object's mesh. Snap the roots and tips of each bone to the vertices of the cloth object.

## 4. Add an IK Constraint to each bone

In Pose Mode select a bone and then click the Add Bone Constraint drop-down button to choose Inverse Kinematics. Set the Target for the IK Constraint to be the Empty which lies at the tip of that bone. Set the Chain Length to 1. Repeat this process for each bone.

Test your animation again and make sure the bones of the armature are moving with the cloth object.

You should have a rig that looks something like this:

## 5. Model the hat if you haven't already, and do some parenting

Parent the hat object to the Armature and choose Automatic Weights.

Parent the Armature and the cloth object to the character's head so that they will move with it.

Adjust the hat's vertex weights in the Weight Paint Editor if necessary.

## End result:

• amazing! thank you for the example file... :) Commented Nov 10, 2015 at 17:41
• Oh, goodness! This looks gorgeous on my model. I'll try to post a gif when I render it.
– Poyo
Commented Nov 10, 2015 at 22:06
• Here it is! gfycat.com/CooperativeLividChicken
– Poyo
Commented Nov 11, 2015 at 19:49
• Excellent solution. Helped me out, too. Thanks!! Commented Mar 23, 2016 at 0:41
• You can use vertex snapping so it's quicker to create the empties and bones. You can also use Copy Transforms + Damped Track on each bone instead of IK, which is faster (especially if you had left your IK with default 500 iterations). Commented Jul 17, 2018 at 10:18

I did a simple setup similar to what I understood you are trying to achieve. Or at least can point you in a right direction, hopefully.

• Wow, this opens up a lot of new possibilities! I don't know much about rigid bodies. I have questions... Why is the upper cube passive and the lower one active? What's the reason for the high stiffness and high damping translation? What's keeping it from also moving side-to-side - and can it be made to move in all directions? Commented Nov 10, 2015 at 13:25
• I just came up with this to find some help fpr the OP, I didn't experiment much about "moving" it later, but maybe parenting would work. the two cubes are needed to use the spring rigid body constraint, afaik, which mimics the bounciness the OP was seeking for, if I got it right. There may be other/better ways, I think. Commented Nov 10, 2015 at 13:29
• After seeing how your rig uses an Empty as an IK target I had a realization, did some testing, and came up with what I believe is the ideal way to do this. I will post that answer now. Thank you for the inspiration! Commented Nov 10, 2015 at 15:42