Scionate

Is there a way to limit the local rotation of a joint to a defined range? With a limit that we could still override manually if desired?

On one of our rigs we have three pieces of armor over the upper leg which should follow the rotation of the upper leg but stop following once the leg rotates beyond a certain amount.
이 게시글에 첨부된 파일을 보기위한 권한을 요청할 수 없습니다.
사용자 아바타
Scionate
  • 전체글: 9

Nate

We don't yet have limits, sorry. You could have the armor bone rotate based on the rotation of the leg bone using a transform constraint, but there's not a way to limit it automatically.
사용자 아바타
Nate

Nate
  • 전체글: 11261

IanM

Okay, so there might not be an official approach to doing this yet, but I was wondering if there was a sneaky way to pull this off by abusing the constraint system, so I gave it a quick test.

Basic idea: use a single-bone IK constraint to enforce the limit. If you set the constraint to compress to reach its target but NOT to stretch, then that creates a hard limit where it'll stop scaling and only rotate instead... if you want binary on/off behaviour within Spine's constraints, IK constraints are the right place to find it.

With a good choice of target points that rotation will be minimized, so set up a tracker bone that is tuned to only compress once the leg has reached a point where you want the skirt to respond.

Then we exploit that implied limit with a second IK joint on the skirt that looks at the tracker's endpoint. Only leg movements that cause the first bone to compress will cause it to significantly move. Again, with good choice of positions and angles it will get pretty decent results!

FakeRotationLimit.PNG


When the leg is lifted up the purple tracker bone shrinks and pulls its endpoint back, causing the skirt bone to rotate to track it...

FakeRotationA.PNG


...but when the leg is pulled away the limit of the purple bone's IK prevents it from following. NOT the same as no rotation, though additional tuning might further reduce that movement, and you might not mind it anyways.

FakeRotationB.PNG


A few notes:
  • You could probably set things up to limit this going the other direction, or chain additional constraints to create a more stable implementation, but the setup will become progressively more convoluted. It is very easy to over-engineer this sort of thing. Not that I'd... uh... know anything about that.
  • Tuning this can be a pain, and at the extreme limits you can get odd behaviour; tune it within your expected range of motion.
  • The setup demonstrated is actually a bit more complex than strictly necessary. I put the skirt bone onto an offsetter that mirrors 25% of the thigh rotation. That helped it work a tiny bit better when the knee was raised high, but maybe made it a tiny bit more unstable when the leg was pulled way back. Not a mandatory part of the setup by any means, but an example of the kind of elaboration you can make to tune the motion.

Spine project file is attached if you want to take a look!
이 게시글에 첨부된 파일을 보기위한 권한을 요청할 수 없습니다.
IanM
  • 전체글: 23

Scionate

Wow. That's a hell of a response. Can't thank you enough. I'll set aside some time to go over all that again.
사용자 아바타
Scionate
  • 전체글: 9


다시 돌아감: Editor