A Nudge Formula

I’m currently making a pose library and I want to add a nudge feature to it, the only issue I’m running into now is getting the right algorithm for it. The approach I’m taking is to add 10% of the total value of the pose to the current value of each attr of the control that is to move(determined by the pose). Is this the wrong approach? Am I going to need to use matrix math to figure out the translations and rotations in world space to get the controls in the right area? As of now what I figured it should be is this:

if I wanted to move 10% closer to the pose I’m selecting…

newValue = currentValue + (totalValue * .1)

Right now the values do indeed move by a 10% increase but not toward the pose itself, it just increases the attr values. Any hints would be awesome. Don’t flat out give me the answer though, I need to train my brain to figure this crap out.

Would interpolating be a better solution? As such:

newValue = (currentValue + .10) * (valueToReach + currentValue);

This way, you’re moving 10% to the attribute values instead of adding 10%. I would imagine you’ll run into problems if a value is < 0 with your current method. Maybe not.

I’m sure someone with more knowledge than myself will have a better solution, however personally I would have attempted it this way (possibly finding myself in the same situation as you). I’m unsure of the results as I don’t have 3ds Max or Maya in front of me :frowning:

I’m not a coder so this might look messy,… but could you do something like this?

targetSampleFrame = (nextPose_frameNumber - poseToNude_frameNumber)/10
poseToNudge_Value = getValues(targetSampleFrame)

I’m not sure if that makes sense.

I’m thinking that you could take the value of the attributes from whatever pose exists on the frame that is 10% of the distance between your target pose and the next pose.

This assumes that tangents are splined.

Thanks for the responses guys, so far no luck but I’ll keep plugin away at it till I figure it out, then post what I came up with.