Join George Maestri for an in-depth discussion in this video Rig a coiled spring, part of Maya: Tips, Tricks & Techniques.
- [Instructor] Hi I'm George Meanstry and today we're going to take a look at how to rig a spring. And this will show you a little about wire deformers and joints and what we're going to do is rig this spring and joints and what we're going to do is rig this spring so that it forms while keeping its shape so typically when you deform something you'll want to put in some joints and then skin it. So let's go ahead and do that and we'll see what happens. So I'm going to go ahead and go into my rigging tools here.
And let's go ahead and just create some joints and I'm going to go ahead and snap to grid here so we can go straight down the center. So I'm just going to create a series of joints for this object. So I'm just going to create a series of joints for this object. And then once I do that, I'm going to shift select the object itself and let's go ahead and just do a bind skin. Now when we do this what's going to happen is we're not going to get results that are good. So if I select this joint and turn off snapping you can see that when this deforms, it deforms to the spring but it also deforms the shape of the spring so you can see these ones are getting bigger.
And so that's not really what we want for this particular situation. So I'm going to undo my way out of this. Let's go ahead and do this a different way and what I'm going to do is create a wire deformer. Use that to deform the helix or the spring Use that to deform the helix or the spring and then deform the wire deformer with the joint. So let's go ahead and see how that works. So I'm going to select my geometry here. And then I'm going to right-click and go into edge mode here and let's double-click on this outer edge and hopefully you can see this, but what I'm going to do is just get one of these spirals as an edge.
So I want to turn that into a wire So I want to turn that into a wire that we can use to deform this. So I'm going to go into modify, convert, So I'm going to go into modify, convert, and we're going to convert polygon edges to curve. And what that does is it creates a separate nerves curve that basically matches that edge. that basically matches that edge. So I'm going to keep that curve selected and the first thing I want to do is I want to delete history. And the reason I'm doing that is because we don't want to get any sort of dependency loops when we use this to control the geometry.
So now that I have this I can use this as a wired former for the geometry so I'm going to go into deform, wire, and I'm just going to use the defaults here so now the first thing we need to do is select the geometry, hit enter, then we select the wire and also hit enter then we select the wire and also hit enter and that should make it go. Now if we go over to the attribute editor and select our geometry, you should see a wire deformer right here. you should see a wire deformer right here.
And that's basically what's being controlled. Now if I select the wire itself and right-click and go into control of our text, and select part of that wire, if I move it, it's not moving everything if I move it, it's not moving everything so what we need to do is expand its field of influence. Now we could've done this when we created the deformer but I find it sometimes easier to affect it afterwards and so the parameter that we're looking for in this particular attribute is drop off distance in this particular attribute is drop off distance and so I want to go ahead and bring that up.
Now I'm just going to max this out at five and see what happens. And as you can see it's starting to work so you can see that its controlling the entire piece so you can see that its controlling the entire piece of geometry locally but it's not spilling over. If that number gets too big it'll start to control the ones that are down here so now that we have this, we can now do a deformation of this curve with our geometry. so you can see that its controlling the entire piece So I'm going to go back into object mode. I'm going to double-click on my skeleton.
Shift-select my curve and now I'm going to do a skin bind skin. Now all I'm doing is I'm skinning the curve to the joints. Now all I'm doing is I'm skinning the curve to the joints. So in this case the joints are controlling the curve and then the curve controls the geometry. So now if I select one of these joints and move it, you can see that I'm getting a much better spring. And that the spring isn't losing volume as I change the orientation or the size of those joints. as I change the orientation or the size of those joints.
So now I have a control structure that I can use to animate and deform this spring without losing volume. to animate and deform this spring without losing volume. So hopefully this technique will be able to be used not just in springs but in all sorts of other objects that have similar properties.
Skill Level Intermediate
Q: Why can't I earn a Certificate of Completion for this course?
A: We publish a new tutorial or tutorials for this course on a regular basis. We are unable to offer a Certificate of Completion because it is an ever-evolving course that is not designed to be completed. Check back often for new movies.