[MAYA] Math behind joint scale compensation

Hey there wonderful fellow Tech-Artists,

Does anybody know what is going on under the hood when we turn ON the “segment scale compensate” on joints?

In the engine I’m currently working in, when I scale a joint up all the children scale with it too.

Ultimately, I want to be able to animate with scale compensation ON. Then procedurally on export: bake down the animation to the joints, remove the control rig (nurbs curves n such), turn OFF scale compensation on the joints, then loop through all [anim]keys and all joints and counter scale all children joints of a scaling parent joint. And hopefully see what I see in Maya, in the engine.

Does that sound correct? Does/has anyone done anything similar?

Any help would be super appreciated!


Not 100% sure but it certainly looks like it just applies the inverse of the parent’s scaling to the scale of an object with the flag turned on. That prevents the children from scaling though it does scale their positions.

Unity doesn’t allow seg-scale-compsensate. I just won’t let people export with it turned on, so they can’t do stuff the engine cant do :slight_smile:

I’m currently using scale on certain supplemental joints in the skeletal rig. Although, we don’t animate/key the scale. It’s done procedurally. And we don’t export the anim data on these joints either. It’s done procedurally in engine as well.
Also, and probably more importantly, I make sure the scaling joints don’t have any children. Depending on the setup, you may have to get a little creative to achieve this. But, is it necessary for the scaling joints in your rig to have children?

Thanks for your reply Proteoz!
In a way yes, it’s necessary to have parent joints scaling, one alternative I thought of was: to parent all joints to one “root” joint on export, so now all joints are essentially child-less and can independently scale, and the translation/rotations info are baked into the joints. I will toy around with this idea and post if it’s a success

Your original idea should work, although it seems like a lot of hassle :slight_smile: Where the parent scales by x, the child scales by 1/x down the line. You’ll probably want to flag the joints that don’t pass this scaling down to their kids so you don’t have to do it to every bone…

Old thread I know but did anyone get this working in the end? I’ve been trying to get it going but getting nowhere! Cheers