Dynamic Rig Tutorial
The purpose of this tutorial
I had had to make a rig for an underwater vehicle with some fly by wire parts coming off of it. We wanted to have control over them, and be able to position them by hand, but seeing as how everything was supposed to be under the sea, we really didn't want to have to animate all the bobbing and swaying from the sea currents. So the plan was to come up with some sort of control that dynamically suspended the geometry. What I ended up going with was Maya's hair system. The theory being I could probably get a hair to be springy, and move and drift with some turbulence on it.
What I'm not going to go into here are any of the basics. I'm also not going to go into how to change settings on the hair system to get the dynamic motion you're looking for. Some things you're just going to have to learn and play with on your own to get a better understanding. I believe troubleshooting is a skill everybody needs. The first time I built this, I have very little idea how it would work when I started. I merely had an idea for a concept and broke it down into elements I would need to achieve that goal. Minus all the trial and errors, this is the system I came up with in a couple days.
So first, we're going to start off by making a control for us to animate. I'm going to use CV curves because they tend to not get in the way of anything, and they don't render. I'm going to make my own by point snapping a linear curve to an 8X4 sphere I made.
So first, create a sphere with a radius of 1, subdivisions axis of 8 and subdivisions height of 4. (The actual scale really doesn't matter. You can build it what ever size you need it in the end. In fact the shape of this control is very arbitrary. It just happens to be one I like for the function it serves. In all actuality you could use what ever you wanted for the control of course.)
I then trace the sphere with a linear curve. As you can see I don't trace every point of the sphere. Just enough points to have something spherical on each axis.
Next, I'm going to turn on the CVs of the curve to be displayed, so I can point snap to them. You can only point snap to CVs when they're visible, unlike vertices.
I then make a locator. We'll use this later, but for now, it's going to sit in the center of this sphere so I can point snap to it. With the CV curve tool still set to linear, I make 6 CV curves by point snapping to the sphere and locator. Start at one axis point on the sphere to the locator at the center. Do try to start sphere side and finish in the center of each curve. It'll mater on some settings later. Each line should only consist of 2 CVs for ease sake.
You may be asking why we're making 6 curves when one curve would be enough to have dynamics on it and move around under the control. Well, the answer is as an animator I want some predictability over it. Depending on my settings this curve can move more like a string or more like a rubber hose. If my object is dangling on the end of this dynamic curve it may be able to drift farther while moving in one direction than it could in another. Say the sting his hanging down from the controller. Maybe the object moves twice as far away from the control when moving down than up simply because of the settings and position of the curve. The reason I made a sphere for the control was I wanted some sort of container. We then made 6 curves, because we're going to make this like 6 elastic strings tied to each axis of the sphere and tethered together in the center. So to keep thing predictable and controllable for the animator, the control will do most of the work and since the points are tied together in the center, the object being animated by this rig will never really fly too far past the control. It'll have dynamic motion, but the control still stays the main master of the objects position. In the end, you may not need 6 curves for your needs, this is just what I needed in this case.
After you've built all 6 curves, we're now going to rebuild them. Why? Because dynamic curves need multiple points to bend across. If you use linear curves, they won't bend at all when made dynamic. We simply made them linear because it was the quickest and easiest way to build a straight line. So we'll rebuild them as cubic curves, with multiple points. How many points you make really depend on how much motion and stretch you want out of your final animation. Without getting too in depth on the hair system, basically the more points in your curve, the more it'll stretch.
Next, parent these six curves under the sphere control we made. Depending on your set up needs you could also group the curves and then parent constrain the group to the control.
Now we'll make the curves Dynamic Hair curves. Press the play button and you should see then curves droop down like strings. You'll see that both ends of hair are fixed, and only everything between the ends of the curves move. This isn't quite what we want yet.
So next, we're going to take the new curves that were created (the hair curves) select them and open up the Attribute editor. For each follicle, go in and change the settings from both ends to base. (This is the reason it was important to be consistent in which direction you started and finished each curve.) Hit play again and you'll see the curves droop again, but this time only staying fixed at a single end.
The next task is to attach all the ends of each hair follicle to each other so that we get a single point that drifts around dynamically, but that is also tethered down as not to drift too much.
Scrub your time slider back to zero.
Go up to the hair menu and choose constrain hair to hair.
Hit play again and you'll see all the hair follicles are tied together now at the ends, but aren't fixed to their origin.
So now we have a rig we can position by hand and these hairs will drift about but their center point won't travel too far away and thus remains fairly predictable motion-wise. And here's where I got to my brain teaser: What the heck do I use that can follow a single point on a curve without constraining that curve down in anyway? As well, I didn't want something like a point constraint where the object would follow this point in Translation, but would follow in rotation as well.
I could use a wire deformer to attach my model to the curve, but that deforms an object which I don't want. And even if I had some other geometry attached to the curve, I'm still in the predicament of needing a way to constraint an object to a vert or face or some single point. Because even if I get the geometry moving 100% with the end of the curve, its center point still stays in place, so parent or point constraints aren't any good.
The other thing I found that worked half way was a geometry constraint. I could make a locator and geometry constrain it to the curve, but a geometry constraint only confines the locator to the whole surface of the object, not a single point. So when the control starts moving, the locator will slide all up and down the curve I attach it to. We get a solution when we combine both these methods together though.
What we'll do is first make a nurbs plane and use one of the curves (I usually use the top curve hanging down) and make it a wire deformer on the nurbs plane. Now the nurbs plane follows the end of the hair, which is tethered to the other hairs, and thus stays in the center of them all.
Next, I'm going to take that locator we made earlier and geometry constrain it to the NURBs plane we just made.
And like the theory stated before, when this control is animated around, the locator currently drifts all over the nurbs plane.
BUT, if I scale the nurbs plane down to 0, there's no surface area left for the locator to drift and volla, we have a locator pinned to the center of these floating dynamic curves that I can parent constrain what ever I want to. (FYI, if you tried using a polygon plane, you'll notice the locator doesn't follow any more once the planes scale goes to 0)
After that it's tweaking the settings you want on your hair system to get what ever turbulence, stretch, stiffness etc you're looking for on your animation. I'm sure there's at least a couple other ways to make a rig like this.
But like anything, the concept of the functions is what's important in the tutorial. If you understand the concepts and theories, you can modify and combine these types of rigs to do what ever you want them to.
To download the example file click here.