PDA

View Full Version : Bendy arm rig with shape modifier...


JellyFire
01-12-2007, 07:02 PM
Hey guys, I'm interested in creating a character with a "bendy" arm setup instead of a normal humanoid arm...

I could put a dozen (or less) joints in the arm and IK it so it would bend more like an early cartoon arm, but could you guys suggest a way I could do it so I would have total control over it's shape?

Maybe control it through IK the normal way, then have a few more controls down the arm to bend and shape it more...

Would love to hear your thoughts.
JellyFire

TechnicallyArtistic
01-15-2007, 11:14 AM
I've built something like that before that works pretty well. You can download an example of it on my site here. (http://home.comcast.net/%7Eevil_the_cat/) The model on it wasn't particularly skinn weighted with those controls in mind. They characters we have on that rig that are meant to animate more cartoony work fairly well when you skin weight them with that rig in mind. It may not be what exactly what you're looking for though because on this set up we oppted for control over greater ease. There are deffinatly ways to simplify it though to make it more user friendly.

Anyway, not too sure if I'll get to into explaining how it works here, but you can take a look at the file and see if you understand it at all. All the joints are set to scale as well so you can get squash and stretch also. All the control visability switches are under the evil the cat logo icon.

sporadic
01-16-2007, 12:38 PM
I developed a rubber hose arm rig awhile ago that I'm finding to be really useful in a lot of my current work, which is cartoony. It uses a hierarchy of controls to give complete spline control over a bendy arm. Nice thing about that is you can just use the level of detail you need. Here's a demo:

http://www.sporadicenterprises.net/downloads/armDemo.avi (http://www.sporadicenterprises.net/downloads/armDemo.avi)

Is this the kind of thing you're looking for?

It uses a spline IK under the hood, but the controls are set up like a tangent spline, which means they'll always be on the final curve (and point in the right direction). Stretch is done using pointOnCurve nodes, which I find to be a lot more stable than using curve distances, which tend to cause little wobbles in joints further down the chain.

What parts are you having trouble with? I can try to talk you through it, or I can send you a bit of MEL that might help.

TechnicallyArtistic
01-16-2007, 01:14 PM
Can you go a little more into the tangent spline and the point on curve features? I'm not sure I'm that familiar with those.

sporadic
01-16-2007, 06:20 PM
Sure. A tangent spline is one where you have tangent lines out determining both the direction of the result curve and how much effect that direction has. Think of the graph editor. Those are tangent splines. The curves in photoshop are too. Tangent splines have the advantage of going through the control points, unlike nurbs, where the control points may be wildly divergent from the actual curve path.

I think they're lots more intuitive for animating, since the curve goes through the point I choose, and in the direction I choose.

To do it right, there's some finicky math assosicated, but I ignored it, since it didn't matter to my purpose, and just took the concept of a curve that runs through the points I chose, and had tangents in the direction of my choosing.

I took a curve with five, evenly spaced vertices and rigid bound the ends to the joints at either end of the curve (shoulder and elbow, say). The middle three vertices I put under control of a control. Voila. Move the control, the curve moves with it, and rotate the control, and the curve rotates. Add a method of translating CVs 2 and 4 towards and away from 3 allows fine control of the final curve, which is fairly important.

That's a basic setup sufficient for most purposes. I've made mine layered with multiple levels of controls, as you can see in the video, but you really don't need it unless you want to make the limb do loops or weave through obstacles or whatever.

The point on curve stuff comes from my perfectionist streak. I always get annoyed when the end joint doesn't land at exactly the end of the spline of an IK spline. If you just use curve info nodes to scale the joints, there'll be error, since the joints are straight lines and the curve is not, so the last joint tends to wiggle around a bit. Annoys me.

The pointOnCurve node has become one of my favorite nodes for this reason. Given a curve and a length parameter, it gives back lots of info about that point on the curve, such as the point in space. This allows you to tie a joint to a particular location along a curve. There's two ways I've tried with this: using an IK spline and some distance dimensions (using them to scale the joints so they land on the exact place on the curve I want), or using point and aim constraints and no IK at all. Either way allows for the joints to automatically stretch to fit that curve precisely. I haven't decided which I like better, to be honest.

These days, I'm taking it a bit further and using pointOnSurface (same thing but using a NURBS surface). This actually can be really cool, as it allows you to specify the joint rotation around the primary axis by using surface normals. It also allows for joint setups where the joints aren't all along a single line. Imagine parenting a bunch of chest joints to a nurbs surface and then being able to make a character 'breathe' by just scaling the surface. Similarly muscle systems that use joints instead of influence objects. Dunno if these last ideas will work, but I'm liking the results I've seen so far.

Does that give you enough to go on?

Saihtam
01-16-2007, 07:13 PM
thank you sporadic, It's really interesting, I will try that. And Btw, nice rig for the arm!

Saihtam

large-x
01-17-2007, 07:34 AM
A friend of mine created a series of joints, made a spline from front to end with only 3 control points, and the used that curve to drive the spline IK of the joints. He then made another more traditional 2 joint arm (shoulder->elbow->hand) and had the control poitns from the IK spline curve parented to the 2 joint arm.
The 2 joint arm is the control for animating which drives the underlying joints. Bendy arm.

Soulcialism
01-23-2007, 09:26 PM
sporadic, are you using the projectTangent node to get that tangent information? i was looking at your video and it looks like you might be using that node to control things like your tangent scale... how are you using that in combination with curveInfo to get the curve position? are you using multiple curves (like one for the tangents and one for the ik spline)?

i thought your vid was super interesting with all the different layers of controls and the precision of the controls... i'd love to learn how it works in more detail.

sporadic
01-23-2007, 10:05 PM
Soulcialism:

Nope, no projectTangent nodes, though I may have to look into that. I used the motionPath node to pull out the directional tangent.

The tangent scale is actually a fake. Under each of the controls are actually three objects (nulls in this case, but they could be joints or clusters or whatever), which are used as inputs to the skinned curve. When I adjust the tangent, it's actually just translating those nodes.

As for multiple curves, yes, but not for the reason you suggest, 'cause there's no IK spline. The pointOnCurve infos and a couple of aimConstraints do the same thing and give stretch automatically, so I don't really need it. The multiple curves are to make the hierarchical system work. See, as I move the first control, the others follow, right? Well, that's because they're actually controlled by a simpler curve that the first control is manipulating. They in turn manipulate a curve upon which other controls are constrained, for as many levels as needed. Each curve is created based upon the last one using rebuildCurve nodes with more CVs at the right places.

So at each level, there's a curve, which the controllers at the next level are constrained to, and which is rebuilt to make the curve which those controllers manipulate. It sounds complicated, I know, and it was a bit tricky to set up, especially avoiding double transforms. Now it's scripted, so I can take any curve I like and add these levels to it.

I hope that helps. Trying to explain this is a bit tricky...

CGTalk Moderation
01-23-2007, 10:05 PM
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.