3DS Max: Rotation Limits, Lookats and Secondary Animation

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 03 March 2013   #1
3DS Max: Rotation Limits, Lookats and Secondary Animation

I'm in the middle of setting up some characters for animation, and things have proceeded nicely thus far. However, I'm working with ported video game models with geometric hair and secondary features usually controlled by jigglebones.

Given that Max doesn't have a direct rotation-based spring controller to emulate this, I did some digging and figured out how to recreate the basic principal by using a lookat constraint to point the jigglebone at a helper dummy parented to the jigglebone's parent and given a position spring controller.

This works pretty well, save for an issue with the lookat which I believe has something to do with the up-node. Basically, I'm doing this to bones in a character's bangs, and as I rotate her head in any direction, the bangs TRY to stay somewhat level to the ground, which naturally will eventually result in geometry clipping. I tried making a dummy directly above the bone, parent it to the bone's parent, and use THAT as an upnode, but this has resulted in erratic movement by the bone. It could be that I need to align it as "up" along the bone's axis locally than "up" in the world, and I'll investigate that.

And at the same time, while I know that setting the force limits on the spring is a solution, I have to wonder if there's a way to put directional limits on the rotation of an object under a lookat constraint. Being able to avoid the clipping with impunity would be nice, and especially in the case of eyes it would be nice to have a character's eyes automatically stop at a certain point rather than to roll into the back of their skull. It feels like this sort of thing should be doable, but I can't find how.

Can anyone lend a hand in this issue, or else has a better way of automating secondary animation of single bones in the context of rotation?
 
Old 03 March 2013   #2
LookAt has 2 types of upnodes: "axis alignment" and "look at".

Axis alignment tries to align one axis of the object to an axis of the selected upnode (both axes can be set), think of it as a sort of hinge mechanism. So if your bone is pointing up with x axis and you have an upnode that has the same configuration (x up) and you set axis alignment and align x to x, the bone will try to spin around its X axis when the target moves above. What you should do in this case is align Z to Z or Y to Y.

Look at upnode control works like a 2nd lookat - it tries to point one of the object's axes to the selected upnode's position. In this case if you have your upnode in the same position as your bone, you can imagine this'll cause problems as it'll effectively try to look into itself (same position anyway). What you should do in this case is offset the upnode to the side.


As for limits: one workaround I can think of involves using ExposeTm helper to expose the local rotation of the "springed" bone (don't forget to chose a parented expose upnode/parent, as having local rotation in world coordsys or wiring world rotation is asking for trouble) and wire the resulting euler values to the rotation of another "final" bone (make sure axis orders of the expose and the bone's rotation euler tracks are the same), setting the limit in wiring expression. Yet this would make a hard stop in rotation, not very springy. If you want soft cushioning you can put the wired controllers (on the "final" bone side) into float limit controllers and set the smoothing.
 
Old 03 March 2013   #3
Originally Posted by insect666: As for limits: one workaround I can think of involves using ExposeTm helper to expose the local rotation of the "springed" bone (don't forget to chose a parented expose upnode/parent, as having local rotation in world coordsys or wiring world rotation is asking for trouble) and wire the resulting euler values to the rotation of another "final" bone (make sure axis orders of the expose and the bone's rotation euler tracks are the same), setting the limit in wiring expression. Yet this would make a hard stop in rotation, not very springy. If you want soft cushioning you can put the wired controllers (on the "final" bone side) into float limit controllers and set the smoothing.


Whoa, I think my brain just exploded...

I'm trying to understand the process here, but my head is in flicker-mode, constantly trying to give up in despair.

So, the expose helper can reveal an object's rotation, and I can wire that directly to the rotation of a "final bone".

And this is where you lose me... What is the "final" bone? What does it attach to? What does it define? Is it just a bone with the same alignment and placement as the bone with the lookat constraint?

And I fail to see where the limits come in. You said it's wired, so are you basically saying to wire the two bone's rotations together, and by somehow limiting the one bone you automatically limit the lookat bone, since they're wired directly?

I admit, I'm a serious novice in parameter wiring. My usual standby with wiring is feeding one value directly to another, and figuring out the proper multiple to get an adjusted result is something I'd be seriously proud to have managed at all. So I guess it shouldn't surprise me that finding out wires can have limits surprises me. I just don't know how.

Also, minor note, my scene decided for some reason that it was going to be an ass and make every new helper I spawn invisible, and I'm having to clone dummies to have ones I can see and click. Any ideas on that, other than merging into a new scene?
 
Old 03 March 2013   #4
Okay, I think I figured it out.

You meant that the object with the lookat constraint was basically a dummy guide, whose rotation the ACTUAL eye object would try to follow via wiring, and I can set float limit controllers over the rotation in the curve editor to keep it from moving too far in any one direction.

I figured this out with a bunch of test objects, and within reason it works fine. I especially like the angle smoothing, easing it to a stop when the limit approaches.

Only problem now, is that going too far outside the limit causes the eye to spazz-out, which is even worse than having an eye move too far in its socket. Only solution I can think of off the top of my head is to put limits on one axis of the target so it CAN'T go far enough to trigger the spazz out. And that would depend upon the limit being interpreted as local and not world space, or else character movement is kinda screwed...

Yeesh, is this what rigging is about? Weighing the benefits of idiot-proofing something versus just winging it? Rough stuff.
 
Old 03 March 2013   #5
Yes, that's what I meant.

ExposeTm doesn't actually "show" an exposed object's local rotation, it calculates a new one, making it useful for cases when you need to "get" a rotation from a rigged element. As far as rotation goes, it's useful, but most often a "last resort" kind of option, being prone to error. This has to do mostly with how euler rotations work - what an axis does depends on what other axes are doing and/or have done in the past.

It's hard to tell why it spazzes out without seeing the exact setup, it could be a parenting or axis alignment issue, euler axis evaluation sequence mismatch (yeah, you get different rotations if you rotate/evaluate the axes in different order), or something else.

Often times rigging is not so much about foolproofing as overcomming technical limitations of the elements in the rig.
 
Old 03 March 2013   #6
Thread automatically closed

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.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 06:48 AM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.