Friday, April 06, 2007

Mirroring Translation controls by Behaviour

I have been scripting lots of animation tools in my work so far, and one thing never fails to bug me. In my old rigs, I did not consider this right from the beginning, and even in the rigs the rigging department build in my company now, this thing still exist.

That is...

IK controllers, or rather, translational controllers that exist on 2 sides(left and right) of a rig, do not have mirrored behaviours when the same translation values is plugged into both. For e.g. a 5.0 translateX value in the left controller will move it in the positive X direction. The same value in the right controller will also move it in the positive X direction.

This problem is not that critical, but when scripting tools to mirror animation, mirror pose, etc, you always have to consider inverting the value when putting into the opposite controller.

I have always preferred having mirrored behaviour in the rigs, and it is more intuitive to the animators as well to see that the same animation curve is driving the opposite controller in the same way, that is, mirrored behaviour.

So...

To get mirrored behaviours in the translational controllers, I would
- create the left controller as per normal. Having a compensation group node above the translational controller.
- in creating the right controller, I would first create it in the same way as the left controller, apply -1 value in the scaleX attribute of the compensation node, then move the node to position it at where the right controller should be.

And now, the same translate values will create a mirrored behaviour on the opposite side of the rig.

This is definitely what I would want to see in my rigs from now on, but I'm not sure if I'm thinking along the right path to create rigs in such a way, so would be seeking more opinions on this...

No comments: