Animating a suture being tied in Maya
I'm doing an animation of a surgical repair of a torn capsule in the shoulder.
I'm trying to animate a suture (string) being passed through the torn capsule of the shoulder and then tied to repair the tear. One end of the suture is firmly held in an anchor in the bone, and the other end is pulled through the torn capsule by a another looped bit of string. (sounds complicated - sorry)
I've attached images to help. sorry if they are a bit complicated too!
What I want to be able to do is have one end of the string fixed to the bone and then the other end to follow a curve. But I'd have to keyframe the curve deforming as the knot got tighter! It would be as if animating a shoe lace being tied.
If I just attach a cylinder to a cv curve with 'attach to motion path' and then 'flow path object' then the whole string moves along the path but one end never stays still.
If any one knows of any tutorials of how to animate a shoe lace being tied then that would be my life saver - but I haven't found one yet.
I would be very grateful if anyone has any ideas :)
This is very tricky.
Do you have access to a version of Maya with hair / fur? You could try using a hair curve for this, setting up constraints on it and letting Maya simulate its motion.
If you want to stick to more basic tools, I've got one method that seems to work pretty well in a quick test. It uses Maya's Spline IK tool as the basic mechanism, but with a few tweaks.
First, create a curve which represents the path from the fixed anchor, then through a long slack loop, then finally into the shape of the knot you want to tie. The path should be very long, much longer than the suture. When attached to the anchor end, the entire suture should go into the slack loop, but not be able to make it into the knot yet.
Now, at the origin, create a chain of joints long enough to stand in for the suture. Use lots; you're not going to be animating them by hand, and the more you use the smoother the deformations will be. In fact, you may want to make the chain extra-dense at the point that will end up being cinched tightly into the knot... you'll have to experiment.
Next, also at the origin, create a curve or a tube lying along that joint chain that will represent the suture itself (I would create a curve, and then later on extrude a circle along that curve to create the suture with some thickness, but it's up to you how you'd prefer to do it). Make sure you've got plenty of CVs here so that it can be deformed smoothly by the joint chain. Skin this geometry to the joints.
Next, create a Spline IK handle for the joint chain, all the way from the beginning to the end. This will create a new curve, but we don't want to use that curve--we want to use the path curve you created in the first step. You'll have to make a connection from the shape of that path curve to the spline IK handle (attributes: .worldSpace -> .inCurve). Now your joint chain should jump to the path curve you've created.
You're just about ready. All you have to do now is use some method to animate that slack loop getting smaller. You could use a cluster or just animate CVs. You could maybe use a blendshape, but you might have to set that up before you connect it to the IK handle, I'm not sure.
As you animate that loop getting smaller, the joint chain will be able to project along it, and will start to feed itself through the knot farther along. If you want to get really fancy you can also animate the shape of the knot getting smaller/tighter, so the suture seems like it's tightening itself as it goes.
I know that's a pretty elaborate set of instructions; I hope they make sense. Let me know if you have any questions.
Here, I've uploaded my test scene. Hope it clears up anything that might have been confusing:
Make the 'rigLayer' display layer visible to see all the curves and deformers.
Oh My gosh!
Thank you so much for such a detailed post - you're a star! I'm going to try this straight away and report back as soon as I've finished.
I can't thank you enough, this is absolutely brilliant.
thank you again so much for your set of instructions and for the brilliant test scene - it was such a help.
I'm stuck on one little thing though.
"to make a connection from the shape of that path curve to the spline IK handle (attributes: .worldSpace -> .inCurve). Now your joint chain should jump to the path curve you've created"
So I went to Window: Hypergraph: Connections: clicked on the IK spline handle (up popped a box) clicked More - found .inCurve and pointed it towards the original curve (path the suture would take) but it never jumped to the path (it did decide to give me list of other options which unfortunately I didn't understand. (I've only been using Maya for a couple of months) Could I please ask you to very kindly give me a step by step on how to connect the path curve and the spine IK handle - maybe I'm missing something very simple but I can't seem to get it to jump across.
Thank you so much
(I'm working in Maya 2011 if that makes a difference)
Hello, Cat. Sorry for the delay in my reply.
There are lots of different ways to make and break connections in Maya. You're on the right track with the Hypergraph. However, the convention is to start with the input connection (in this case the .worldSpace attribute of the curve's shape node) and then wire it in to the destination connection (the .inCurve attribute of the IK handle).
The Hypergraph can be a little tricky if you're not used to working with it. Let's try to skip that step and go directly to using the Connection Editor instead.
So, first select the shape node of the path curve (the quickest way to do this is to select the curve in your viewport, then press the down arrow on your keyboard). Then select the IK handle. Then choose Windows -> General Editors -> Connection Editor. The Connection Editor window should pop up, with the curve shape on the left and the IK handle on the right.
Now you just have to find the attributes in question. Scroll the left list until you find 'world space', and click to highlight it. Then scroll the right list until you find 'inCurve' and click to make the connection. That's all there is to it! The hardest part is finding those attributes in the big long list... I really wish the Connection Editor let you filter attributes by name. Or even just listed them alphabetically!
Let me know if you have more questions.
I know this was a while ago, but this thread has been extremely helpful!
I am having an issue with trying to animate the loop closed using clusters, I can't seem to get this step right or I have done something wrong previously, as my geometry starts deforming after it gets so far.
If you can remember how you set up your clusters I would be very grateful.
Thanks again for this answer.