Joint bone rig that maintains volume

Have you come up with a good Moho trick? Need help solving an animation problem? Come on in.

Moderators: Víctor Paredes, Belgarath, slowtiger

User avatar
heyvern
Posts: 7042
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

Sorry I didn't look at your file closely enough. I noticed the points not bound and assumed that was the problem.

First off the parenting is wrong. The two big fan bones in the center need to parent to the top opposite bone that the constraint points to. If you constrain to the same bone as the parent it ADDS to the rotation. You want to BLEND the rotation.

Also you didn't put in the angle limits. Without the angle constraints the springs squish in on the elbow point. With the limits the opposite spring stops squishing and maintains the normal elbow shape.

Another trick is how splines work. If two points meet at the same distance on either side of a center point you get a larger loop. By "offsetting" the opposite points the loop is thinner. Look carefully at my sample and see how the points away from the joint are not the same distance. One set is a little closer. This helps remove some of the big loop when the joint bends.

With a few minutes of tweaking I got your file working pretty well.
---------

Yes it does require some tweaking of course it does. Everything requires tweaking. The point is to adjust the amount of "spring" while using onion skin to see exactly how the joint looks.

Once I came up with this I did both joints (arms legs) for a character pretty quickly. I love this joint and now I've got it memorized I can create it really quickly.

My point all along using bones and constraints is spending ALL the effort UP FRONT BEFORE ANIMATION. Imagine all the extra work having to key points on every frame where the joints cross over.... YIKES. Is that LESS work than this idea? I don't know... I don't think so. It's a matter of how and when you spend that extra effort. i would rather spend time tweaking animation and motion than moving points to make a joint look right.

This to me is MUCH less effort. If I spend 10 minutes on each joint what a savings later on.

Just my preference. Some people were looking for a way to do this without a lot of effort. This is pretty good so far. I don't see it getting better without using point motion.

I would like to see a constraint or a way to control line weight and visibility based on bone rotation... that would solve EVERYTHING. Would need all this stuff at all.

-vern
User avatar
synthsin75
Posts: 10272
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Post by synthsin75 »

Well it is fairly easy to adjust it in real time on frame one, but I agree that it is a pretty heavy per joint structure. Probably one of those thing that you'd want a template for. Something to import into each character rather than build and tweek every time.

But nice work Vern. I doubt that's the last we'll see of Genete's springy rig. :wink:
User avatar
heyvern
Posts: 7042
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

synthsin75 wrote:Well it is fairly easy to adjust it in real time on frame one, but I agree that it is a pretty heavy per joint structure.
It's not too bad. It only takes a few minutes to set up one side of the joint spring then I use my bone copy/flip for the other side, do it again for the other OTHER side. Then copy THOSE two joints for the legs. ;)

I LOVE my new sciripts. Oh what a joy.

I also just now discovered that a menu script can be dropped in the tool folder to be used as a button... works exactly the same as a menu script. I never knew about that.

So... why in the world did they remove menu scripts from the standard version? It makes no sense.

-vern
User avatar
mkelley
Posts: 1647
Joined: Fri Nov 02, 2007 5:29 pm
Location: Sunny Florida
Contact:

Post by mkelley »

Okay, that made a huge difference -- I don't know how I missed the parenting thing (because I *was* looking at your parenting :>).

Just doing that made it much better... but it wasn't until I added another vertice that it started working the way I'd want it to work.

With that extra vertice it actually deforms like a bicep, rather than your example (which is more like folding a sausage). This is positioned between your middle vertice and the second from the end, on the side of the bend (so opposite sides for each bend, one assigned on the bicep side, the other on the forearm side).

It really makes it work perfect -- so I thank you for this technique. By default each vertice was assigned to either the bicep or the forearm bone as you would think. If anyone else wants to try this technique I highly recommend the extra vertices (you'll end up with a total of 12, five assigned to the bicep, five assigned to the forearm, and the two in the middle assigned to the spring bones).
User avatar
heyvern
Posts: 7042
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

Does that extra point work when the bicep shape is over and/or under the forearm shape?

The problem is flipping the shapes. I desperately needed to be able to bring the bicep shape (on a separate layer) OVER the forearm and visa versa. I struggled with adding extra points because it would only look good with one shape on top.

I will play around with the extra points and see if I can duplicate what you are talking about.

p.s. Yes, a bending sausage. I had that on rye bread with spicy mustard for lunch the other day. ;)

-vern
User avatar
madrobot
Posts: 670
Joined: Mon Apr 07, 2008 3:07 pm

Post by madrobot »

I'm excited about this
Thanks Vern!
User avatar
mkelley
Posts: 1647
Joined: Fri Nov 02, 2007 5:29 pm
Location: Sunny Florida
Contact:

Post by mkelley »

Vern,

First of all, I don't think it will help with the look you want -- I don't need my arms to collapse completely (and I only want a single shape).

But... I'm still doing something very very wrong and I'd appreciate just a little more help. I thought I had duplicated the rig exactly, but using it on one of my real world examples and it doesn't work at all.

The upper vertices aren't staying put -- and I have assigned them to the bicep bone. The file I'm posting here has different weights than yours because I think it needs them, the vertices aren't exactly where I need them because I was playing around, but you'd still think those upper bicep vertices would *have* to stay put, wouldn't you?

http://www.kelleytown.com/Shared%20File ... roblem.zip
User avatar
heyvern
Posts: 7042
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

Lots of confusion regarding layer and point binding.

Select the vector layer of the arm and under the bone menu select "Release layer". Your layer is bound to a bone which completely over rides the point binding. This happens a lot I think because the buttons for layer and point binding are right next to each other.

Once I released the layer it works great!

If you ever find that points are not doing what you expect make sure the layer is not bound to a bone.

Also make sure you have two shapes for the arm (I'm sure you know that already but I had to mention it.)


-vern
User avatar
heyvern
Posts: 7042
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

There are some other issues with the point set up and binding. I played around with it and got it working but keep in mind this is personal "tweaking" kind of thing.

I still have a problem with too many points around the joint. I get those "lines" at the crease that look odd. That is why I have the points further away from the center to smooth out that loop. Also i tweaked the angles of the springs a tiny bit so they don't push out too far and cause and odd bulge at the joint.

If I were doing this for a specific thing and the number of bones weren't an issue I would throw some extra ones in there to control some of the points. However my goal with this was simplicity for simplistic characters. I wanted to keep the bones to a minimum (ha ha).

Try this it will help... set the layer of the arm to show no fills or lines and turn on construction curves. On several key frames key extreme rotations and then click the onion skin markers on some keys to see how it's bending.

On frame 1 set a key for the camera translation. On frame 0 slide the camera so what you are working on is right near the onlion skin markers for those keys. Now tweak the points, adjust the bones, and you immediately see how it's working. This is how I do it and it works really fast.

p.s. You think this is hard? Try doing the same thing with 3D joints! Ten times harder... well... 3 times harder at least ;). Try bending a poser model too far and see how bad the joints are. At least on my ancient version it was awful.

This is a breeze by comparison.

-vern
User avatar
mkelley
Posts: 1647
Joined: Fri Nov 02, 2007 5:29 pm
Location: Sunny Florida
Contact:

Post by mkelley »

Thanks, Vern -- I never would have gotten that.

I never bound that layer but perhaps it was bound by default when I first set it up. In any case, you're right, it works great, and I simply tweaked some vertices here and there to get the look I wanted.

I do think this will work fine for my work -- there will still be times I need to tweak a vertice or two, but for 90% of the animation it's setup nice.

It's too bad this bone setup couldn't be simpler, though -- I'm not sure how to ask for something like this. Perhaps a way of "storing" bone setups so you could easily drop them in (similar to actions). I can always get a basic skeleton and drop it into a file and move it around, but you can't adjust bones that way, right? (What I mean is that if it doesn't fit the particular shape there is no way to lengthen a bone or move things around without starting all over again).

Would it be possible to write a script that at least automated the angle and constraints? Something you could point at a structure (with a certain naming convention, of course) and it would just assign all the other things? I guess I'm going to have to look at some of your bone scripts and see exactly what is involved -- that alone would probably do it as far as ease of use for me was concerned.
User avatar
heyvern
Posts: 7042
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

I'm absolutely certain that a script can be created to place these springy joints. Point binding would need to be done by hand of course. Since each rig is unique you would still need to tweak the bones.

Genete's 3D script auto generates bones at specific locations based on points. This is a lot easier I think.

As far as the adjusting the angles and length that seems simple to me. Just rotate the bones until they sort of match. I don't bother using exact positions and locations with the springs, I just sort of eyeball it and it works fine.

You're talking about adjusting the springs for different thicknesses of an arm or something right?

Another trick I found (or problem, whichever way you look at it) has to do with sleeves OVER a thinner arm. I got really nervous when I encountered this problem. The spring for the sleeve wasn't working for the thinner arm. It pushes the joint point to far.

The workaround is just to add a an extra bone on the first spring bone. Like a second spring. I made this one shorter for the arm mesh and moved it so the base is still on the first spring bone. Works like a charm.

The smaller spring bone controls the points of the thinner arm mesh, the longer bone controls the sleeve.

Also worth noting... I realized you don't need two big bones at the joint. The base bone of the springs can be parented to one bone since they don't control any points.

Image

Also notice in this case I don't even have the spring tips perfectly aligned with the points and it still works. Just pare of the tweaking process.

-vern
User avatar
mkelley
Posts: 1647
Joined: Fri Nov 02, 2007 5:29 pm
Location: Sunny Florida
Contact:

Post by mkelley »

The part of the process I'd like to automate is the putting in of the constraints -- both the angles and the parent bones.

Setting the bone rig up in the first place is easy (easier now that you've eliminated one bone :>) and weighting it can be done by eye with the weight tool, and even assigning vertices is something that is done only with the mouse but typing in all those angles and parent relationships is a big PITA (I have to keep referring to a piece of paper I made where I wrote them all down). I'd like to just point to the base bone, say, and run a script which then assigns all the numbers to the children (it could be done by name if need be -- I've been naming my bones B, F, L, L1,L2, R, R1,R2 and then assigning a prefix of one letter for arm or leg, and another for downstage or upstage -- DLL2 would be one example of the L2 bone of the downstage leg).

I did some modification of a button script early on but haven't really played with scripting so I need to look at your stuff and see if this is possible -- that to me is the only drawback to your bone rig.
User avatar
heyvern
Posts: 7042
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

I understand now what you need.

Yes this could be scripted including the constraints and parenting. As a matter of fact most of the code needed I'm using in my copy/flip bones script. Instead of "copying" bones with constraint values the script would just make them up.

That script is doing the exact same thing when I use it to copy one of the spring rigs anyway. It's just copying the info from the bones, makes new ones, and applies those values. I will just put the values in the script instead.

I could also add some user input like, adjusting the angle of the springs or adding additional bones for arms and sleeve joints that could be adjusted later by hand.

This is a cool idea for a button script. I bet I could whip this up pretty fast. I'll add it to my list of things to do. ;)

-vern
User avatar
mkelley
Posts: 1647
Joined: Fri Nov 02, 2007 5:29 pm
Location: Sunny Florida
Contact:

Post by mkelley »

Yes, I think this would be very useful -- it might get everyone to use this rig.

But don't break your neck getting it done, at least not for me. I'm heavily into a production at the moment (deadline 7/8, for about 27 minutes of animation and I'm about 10% done <BG>. However, all scenes are setup and rigged so it's just a matter of doing the animation. Just.) While I did spend the morning rigging one of my main characters to use this (and it will help) I decided I just don't have the time to retrofit the rest of the scenes (about 30 of them). I'm quick, but not *that* quick.

If you do get it done in a couple of weeks I can really use it, though -- I'm going to go through and redo all 21 of our regular characters to use this. It will really save huge amounts of time in the long run.
User avatar
heyvern
Posts: 7042
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

I won't be breaking my neck on this. I expect it to be pretty simple to code.

Right now I'm almost done with the COOOLEST FREAKING SCRIPT EVER! I've been playing with it today to work out some bugs and test it out.

It saves out bone animation based on the names of bones ONLY. So... if you have completely different bone rigs for different files, but all of them have.. a head bone, a thigh bone, a foot bone, etc... you can save animation from one as a file and load it into another file with the same named bones.

If the file you load into is missing one of the bones it just skips it and moves to the next.

I'm really excited about this. It would be a great way to load actions, or share animations... as long as the bones have the same name as the file it was saved from.

I was using that Macton script for saving layer animation which included bones but it was very specific. To load any animation the files had to be absolutely identical including the internal ordering of the bones (which is nearly impossible to maintain) all the layers etc.

I am having a blast.

-vern
Post Reply