Pose Library - attribute set offset

So I’ve been developing a pose library tool for the studio I intern at. I have it pretty much done but when testing I realized a pretty big flaw with the tool. When I set the pose it’s positions are based on the local space to it’s parent, but the parent is a move scale rotate curve.

When an animator sets the pose and they do a walk cycle, they wont move the MSR. The problem I have is, what if the animator has moved the character away from the MSR and they want to set the pose? Right now it’ll snap back to were the MSR is, if the pose was set at the MSR location or it’ll snap back to the position it was set based on the position of the MSR.

I need the tool to handle the offset so that when an animator moves the rig away from the MSR it wont snap back to where the pose was originally set but set the pose at the current location in space. I think I can achieve this by messing with the matrix or using the Dag command on the control curves but I really have no idea where to start.

If you want a solution that’s already done for you take a look at my Red9 StudioPack, it’s designed to be able to process any rig, has tons of anim tools built in and the poseSaver has a full ‘relative’ mode in it, allowing you to snap poses relative to any node selected (as long as it’s something included in the poseFile). It also has the concept of posePoint cloud, allowing you to adjust the space a pose is stored in by manipulating it in one go. There’s a main demo of all of that in the v1.27 walk-through and an over-view of some of the more advanced and newer features in the later vieo.


have a play

cheers

Mark

Yeah Mark I’ve taken a look at your tool. Sadly I don’t get to make the decision on weather or not we use it. They want their own tools built in the studio. So i’m just trying to figure out how to get what they want. I’m just lost as to how to achieve the offset.

On yours you have to select a control to build the pose from when you have offset selected. How are you getting the other controls positions/rotations based on that one control? Are you just taking the information of how far they are apart in the regular pose and applying that difference to the other controls? If you don’t mind me picking your brain that is :slight_smile:

No worries, I know what it’s like with in house tools vs off the shelf, I’m lucky that Crytek allow me to continue this stuff under BSD license so it’s under the same licensing as PyMel, open and use, modify etc.

Anyway, I tried a few things, I had the code working at a matrix level originally, so I got the offset matrix between the selected node’s current and stored position, then multiplied everything in the pose by it’s inverse to subtract it. This all worked but I kept getting stuck with Maya’s pivot’s management and in the end I make a point cloud. You can see the cloud if you use the posePointCloud tools at the bottom of the PoseUI. Basically I load the pose in it’s saved world space, then I make a locator cloud of the controllers with a parent group who’s pivot is in the reference objects stored location, then I subtract the new position from it’s old pushing the poseCloud into the new reference position. Finally I spin through the controllers and snap them to the cloud. It’s something I first started doing years ago and the animators loved it, the stuff in Red9 is far more obvious (hopefully). Projected or Absolute offset where Projected takes the general direction of travel with reference to the ground plane, same as the translates which are calcutaled only in Z,X space. If you use Absolute the offsets are absolute and the reference node will stay locked completely, but the pose may rotate and translate freely to allow for that.

One extra thing is that if you use the posePoint stuff in the UI it also has the option to shape parent the given mesh geo to the group, so you end up with a selectable mesh who’s pivot is at the reference node, means you can just grab the reference mesh and move it where you want. This happens either if the code finds a message link attr ‘exportSkeletonRoot’ that points to the geo (this is an attr oon the RootObj specified), OR if you select the mesh as a second object.

Hope that helps. The codes all wide open so go digging in Red9_PoseSaver :wink:

cheers

Mark