I’ve run into a math challenge working on an animation re-targeting script. This Python script copies the bone rotational properties from one character rig to another (like the retarget tag) but also performs additional modifications and clean-up.
I'm using Cinema 4D R21.
Up to now, both characters were always rigged based on an “A-Pose”, but now the source characters can be based on a “T-Pose”. Simply adding 45 deg to the shoulder works fine, but every bone to the fingers center of rotation is now off by 45 deg. I’m struggling to find the math or hopefully a Cinema 4D Python functions that will enables me to calculate from the single axis rotation from the source rig, to the “multiple axis” rotations required for the target. This would be similar math used by Cinema 4D when rotation an object in “World Space”.
Example, if I have the source character in the T-Pose position and rotate the forearm “forward” 45 deg in the “H” axis only, the target character I first add 45 deg to the shoulder to the “B” axis making it in the T-Pose, then I need to apply multiple axis values close to (H = 35.264, P = -30, B = 9.736) to get the same orientation of the source character.
Source Character
Target Character
Any ideas? Bruce Kingsley