kinefx fix orientation post animation

   974   4   2
User Avatar
Member
225 posts
Joined: Feb. 2016
Offline
Hello,

I have mocap from mixamo with bad orientations on the skeleton making ragdoll setup difficult. Can the orient joints node work properly on a skeleton if it has animation? Look at my first photo. On the left is the default. On the right I added orient joints with the up vector set. At first it seemed to work, but as you can see at the end of the animation it became mangled. On my second photo it seemed to work if I do not use the up vector function. I wasn't sure if the orient joint sop was supposed to be used on a skeleton with animation or not. I also tried doing the orientation on a tpose and feeding the tpose into the second input of the orient joints sop but that didn't work either.

Any thoughts?

Thanks

Attachments:
help.JPG (163.4 KB)
help2.jpeg (127.6 KB)

Thanks,

Evan
User Avatar
Member
253 posts
Joined: July 2013
Offline
To transfer animation between different skeltons one usually uses a form of retargeting.

https://youtu.be/B4RT4OLu5E8 [youtu.be]
More code, less clicks.
User Avatar
Member
8583 posts
Joined: July 2007
Offline
if (as screenshot suggests) it's the same skeleton that works fine, but you just want to correct orients, then correct them just on rest skeleton and then you can apply the difference in local space of the animated skeleton transforms

you can most likely use Pose Difference SOP for that in Custom mode
or you can use Point Wrangle (input 0: anim skeleton, 1: original rest skeleton, 2: rest skeleton with reoriented joints):

matrix3 original_rest = polardecomp(3@opinput1_transform);
matrix3 fixed_rest = polardecomp(3@opinput2_transform);

3@transform = fixed_rest * invert(original_rest) * 3@transform;
Edited by tamte - June 14, 2023 02:48:58
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
225 posts
Joined: Feb. 2016
Offline
Jonathan de Blok
To transfer animation between different skeltons one usually uses a form of retargeting.

https://youtu.be/B4RT4OLu5E8 [youtu.be]
Thanks, that was what I was originally doing. But it is the same skeleton. The exact same, just re-orienting the same skeleton.
tamte
if (as screenshot suggests) it's the same skeleton that works fine, but you just want to correct orients, then correct them just on rest skeleton and then you can apply the difference in local space of the animated skeleton transforms

you can most likely use Pose Difference SOP for that in Custom mode
or you can use Point Wrangle (input 0: anim skeleton, 1: original rest skeleton, 2: rest skeleton with reoriented joints):

matrix3 original_rest = polardecomp(3@opinput1_transform);
matrix3 fixed_rest = polardecomp(3@opinput2_transform);

3@transform = fixed_rest * invert(original_rest) * 3@transform;
thanks, I will try that and see how it goes.
Thanks,

Evan
User Avatar
Member
225 posts
Joined: Feb. 2016
Offline
tamte
if (as screenshot suggests) it's the same skeleton that works fine, but you just want to correct orients, then correct them just on rest skeleton and then you can apply the difference in local space of the animated skeleton transforms

you can most likely use Pose Difference SOP for that in Custom mode
or you can use Point Wrangle (input 0: anim skeleton, 1: original rest skeleton, 2: rest skeleton with reoriented joints):

matrix3 original_rest = polardecomp(3@opinput1_transform);
matrix3 fixed_rest = polardecomp(3@opinput2_transform);

3@transform = fixed_rest * invert(original_rest) * 3@transform;

Thanks, you are a genius. I got it working. The left side is original, the middle is using the wrangle, and the right side is using the pose difference. For the pose difference setup I made sure the original rest position was in the left input and the fixed rest was in the right input. I set the input attribute name to rest_transform and apply the offset and invert. I got it working with the rig pose because that will be easier for me to remember how to do. The polar decomp went over my head, I need a better understanding of transform matrices. But thanks so much, I didn't know about pose difference and I definitely owe this success to you.
Edited by evanrudefx - June 14, 2023 13:24:58

Attachments:
fixed.JPG (167.7 KB)

Thanks,

Evan
  • Quick Links