PDA

View Full Version : Spacing multiple objects along a curve automatically


Xebozone
08-12-2009, 01:03 PM
I am trying to rig a character's mouth so that several separate pieces of geometry automatically line up and space themselves along a curve. Each of the objects has to have a geometry constraint so that it stays on the surface of the character's face, or somehow stay on the face using any other method) like so:

http://img194.imageshack.us/img194/677/rigy.th.jpg (http://img194.imageshack.us/i/rigy.jpg/)
The curve is selected (in green)

I have literally been trying all day with different methods (read if you can be bothered, or if you need inspiration, otherwise if you have a solution just reply now :) ):

I tried "creating bones on curve" with a spline IK (bonus tools), then point constraining each piece of geometry to the bone joints (I didn't use the geometry constraint on each piece, like described above) . The curve itself had a geometry and aim constraint to the face of the character. It worked ok to some extent, but the bones can only stretch so far with the IK system, and I had other problems associated with conflicting constraints. Also, it was very messy, and each piece of geometry didn't line up with the face due to the lack of a geometry constraint. Using a geometry constraint on each joint of the bones failed. Ultimately this was a huge mess and would get very frustrating to change and manage.

I then discovered the wire tool (wire deformer), which did what I wanted in regards to lining up and spreading the geometry along the curve, but it also deformed it (as expected). Also, this made geometry constraints on the pieces of the mouth impossible.

scroll-lock
08-12-2009, 03:56 PM
The first "solution" that came to my mind when I was reading your post was this:

somewhat similar to your first method - create joint for every object - 8 in your case. Parent each one to the previous one, so it's a joint chain. Make stretchy spline - there are a lot of scripts that can do it, or you can do it by hand. Parent each object to it's corresponding joint.
At the end you are left with a spline, which you can control with clusters, and every object will stay evenly spaced. The clusters can be geometry constrained to the Head then. I think this will do your job just fine.

Xebozone
08-12-2009, 06:55 PM
Ah yes. I never even knew about stretchy spline before now (I don't do too much rigging/animating). Thanks for the idea. I will give it a try tomorrow

I found a rather tedious but good tutorial here for anyone else that stumbles upon this:

http://www.darksuit.com/tutorials/StretchSpine.html

I just followed it with the exception of the last section, and it seems to work great

If anyone knows of any quick and simple or alternative tutorials, that would be appreciated too.

I also have another question:

Before, I had set up my mouth for facial expressions by using blendshapes on the curve. However, I don't think that will be possible with a stretchy spline because the curve itself is set up to be controlled using the clusters and so, cannot be modified/blended into other curves. Is there still a way?

scroll-lock
08-13-2009, 08:12 AM
the way is to NOT use clusters then. Just make it stretchy with the example you provided - the length of the joints depends on the length of the curve, so If you just blendshape it it would be ok.

thematt
08-14-2009, 09:06 AM
you could maybe attach your objects with a motion path too..and delete the keyframe created, then move the curve with cluster the way you want.

cheers

CGTalk Moderation
08-14-2009, 09:06 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.