APEX animate tool for drawing poses

   Views 1539   Replies 8   Subscribers 2
User Avatar
Member
49 posts
Joined: Jan. 2017
Online
A little Python tool I'm working on to draw poses for bendy characters in the APEX Scene Animate node.

https://www.noad.co [www.noad.co]
User Avatar
Member
2 posts
Joined: Dec. 2014
Offline
Cool! Please tell a bit more on how you achived that.
User Avatar
Member
49 posts
Joined: Jan. 2017
Online
Roy Ranheim Kristoffersen
Cool! Please tell a bit more on how you achived that.

Hi Roy! It's similar to creating a Python view state, the main difference is the custom code is loaded by the APEX Scene Animate node to act as a sort of sub-tool.

Then you can respond to mouse and keyboard input. I've done some processing of the input using SOP verbs, like comparing the current z-depths of the joints and aligning the transforms, to create the curve that then feeds back into the joint positions using the APEX api.

For the prototype I've also added some properties to the rig so joints know which curves they belong to, it might be possible to make it more general - for example if the tool looks at the joint heirarchy for the selected controls instead.

There's some starter support for multi-level controls in here, so broad controls are positioned first, with fine controls then positioned from the broad curve to give the final curve - this will be nice for manual pose tweaks when it's ready, but the code to go backwards from the drawn curve to the broad curve needs an overhaul when I next get a chance to look at the tool.

I hope that sheds some light on it, let me know if you have any thoughts!
https://www.noad.co [www.noad.co]
User Avatar
Member
108 posts
Joined: Aug. 2020
Offline
Looks good! Does it preserve "bone" length?
User Avatar
Member
49 posts
Joined: Jan. 2017
Online
citizen
Looks good! Does it preserve "bone" length?

No, this version just controls the input transforms of a ControlSpline, so the lengths will change with the length of the spline - which is great for cartoony or stretchy limbs but not otherwise. It should be possible to do something directly with the skeleton heirarchy that preserves lengths, though I'd wonder how to fix the end point of the joints to the end of the drawn line, it could get frustrating if it's over/under shooting to preserve lengths. Maybe an internal FullBodyIK could fix the ends?
https://www.noad.co [www.noad.co]
User Avatar
Member
108 posts
Joined: Aug. 2020
Offline
The resulting pose should be a scaled up/down version of the drawn curve, with the start/end points on the same line determined by the drawn curve. Easy to say, I know, much harder to implement
User Avatar
Member
49 posts
Joined: Jan. 2017
Online
citizen
The resulting pose should be a scaled up/down version of the drawn curve, with the start/end points on the same line determined by the drawn curve.

This would work to pin the end points, but not to preserve the lengths - to do both the joints in the middle of the heirarchy need to be free to deviate from the drawn curve, because that curve could be any length.

Also I just realised if the distance between the start and end points of the drawn curve is longer than the total rest length of the joints you can only solve one or the other, so drawing very straight stretched out limbs is a risk, but you could choose to prioritise lengths or end pinning depending on the type of animation you're working on.
https://www.noad.co [www.noad.co]
User Avatar
Member
108 posts
Joined: Aug. 2020
Offline
I was having in mind something like this:

Attachments:
limb_pose.jpg (293.9 KB)

User Avatar
Member
49 posts
Joined: Jan. 2017
Online
citizen
I was having in mind something like this:

ah I see! Yes that'd work for fixing to the start and preserving lengths, and it would keep the characteristics of the drawn curve if not the positions so there's definitely a use for this. I think there are situations where this could get frustrating (eg trying to get a character to scratch their own head, if we can't control the position of their hands at the other end of the joint chain), but maybe that's just where it would need an option to flip between preserving lengths or preserving positions.
https://www.noad.co [www.noad.co]
  • Quick Links