vasilnatalie on DeviantArthttp://creativecommons.org/licenses/by/3.0/https://www.deviantart.com/vasilnatalie/art/Less-stupid-bone-tricks-698110462vasilnatalie

Deviation Actions

vasilnatalie's avatar

Less stupid bone tricks

By
Published:
607 Views

Description

For more on proxies and the axle structure I use, check out vasilnatalie.deviantart.com/ar… .

Axle structures let you turn rotation into linear motion.  In this case, what's important is that I can turn axis-limited rotation (in the Z axis) into axis limited movement (along the arm bone).  The axle structure is ultimately parented to the shoulder, so it rotates with the arm and extends only in the direction the arm is pointing.  It was a stupid accident that I even discovered this was possible with my model; with many bones/weights, you're not going to be able to get smooth movement of a sleeve along an arm, but I was happy to discover that here, I could.  (The kimono's clavicle weights can be adjusted too, to keep up.)  The axle structure is made visible for this picture, but you may as well hide it to keep it out of the way.  Here, the handle shows the location of a proxy I use to control it.

Proxies are useful for a lot of things.  For an example of a proxy, think of a typical both eyes bone.  Especially the fact that it's located nowhere near the bones it affects!  You should be able to use proxies to avoid the problem of visible bones at the same location, as I do with this model.  I don't mind so much that my leg cancels are at the same location, because they're rarely used, I just want them out of the way, but if you wanted, you could place them on the side of the model rather than on top.

The IK sleeve is purposely weird to show you it in action.  In actual use, the bone is hidden and follows the twist-affected wrist in order to achieve the proper angles without knowing about the twists.  Use a high anlge and avoid angle limits; with a single bone, it should never twist, since it never gets any benefit from it.  There's a potential for this to screw up at high angles, but so far, this particular structure has worked for me.

I should probably explain the leg cancel structure one of these days.  It's the bane of beginning MMD modellers everywhere.  Oh well, maybe they need it to get motivated to learn about MMD bones.  Studying it was how I actually learned about MMD bones.

(Yes, I'm working.  I have basic shaders for the important bits, but the code is horrifyingly ugly and the load times abysmal and some of the textures/colors aren't so hot either.  They'll need editing.  I did a few bone details today after getting something basic and workable.  Tomorrow I'll probably revisit sleeve physics, which are currently the most broken part of the model.  Eventually, good or bad, I'll release, just to free myself to work on something new.)
Image size
1600x1600px 1.99 MB
Comments1
Join the community to add your comment. Already a deviant? Log In
vasilnatalie's avatar
That axle is interesting to me for another reason.  It changes the response curve.

When you put linear rotation into the axle (angle = time), you get sine wave motion out (position = sin(time).  Now, sometimes, that's kind of a pain, like when you want to drive linear motion at the same speed as rotational movement with the same bone.  I guess it can also be kind of cool, because sine waves are less obvious, less computery, than linear rotation.  You can turn this linear motion back into rotational motion, if you want, with an IK bone tracking the linear motion.  This changes it back to linear rotation-- you now have angle = arcsin(sin(time)) = time.

However, there is something interesting.  This is math.  There's a proof that any wave can be represented by a sum of sine waves of different periods and amplitudes.  This fact was very interesting to me when I was playing with fog generation using the sum of sine waves, and imagining that any possible shape could be represented in that fog.  Now, the reality is, you might need an infinite number of sine waves.  But that's only if you're sampling your wave infinitely.  You're not, you're sampling it discretely.  In this example, the amplitude of the sine wave is the length of the axle and the period is the append ratio.

Theoretically, this means that you can get any response curve out of a bone.  Practically, it's more difficult than that, because you need so many bones.  I've always thought it would be interesting to learn how to create some plugins-- just simple scripts, screw the UI-- to do some of this stuff automatically.  Unfortunately, I have a lot more ideas than I can ever implement.

I'm thinking about this now because I'm thinking about how to rig a bicycle chain in MMD.  This is not an easy task.  I'll use a series of IK and appends to keep each chain "jumping" inside of a tiny area, rather than rolling all the way around the chain, so that I can use separate bones to drive the circular part from the linear part.  However, I won't use this structure, too complicated.  I'll probably use a rotation bone at whatever maximum distance PMXE/MMD will allow in order to approximate linear motion for the linear part.