Answered

I want to export a custom transform but the solution described by you on the unity forum doesn't seem to work

Anonymous 3 years ago updated 3 years ago 3

Maybe it is something intended as I want to export the four custom transforms created by umotion, the IK_Pole ones. for both hands and legs.


I need their positions in the animation file or if this is not a good idea to have them put there, maybe some way to save them to a custom separate file of some kind could also work.


all four objects are marked as custom transforms and have the visibility on Show but don't appear to included in the animation file (which I think make sense, not a bug, except I need them :D )


UMotion Version:
1.25p03
Unity Version:
2020.3.3f1

Answer

Answer

With UMotion V1.26 I introduced an easier way to update a custom transform to a real transform:
Create new empty GameObjects in your character's hierarhcy (outside of UMotion) that are named like the custom transform inside UMotion and are located at the same position in the hierarchy.


When you then assign the character to the pose editor, UMotion is automatically going to ask you if it should convert the custom transform definitions to real transform. All other steps mentioned in my previous post are not necessary anymore in this case.

The animation data for those transforms is then automatically included in the exported animation.

UMotion V1.26 is shipping in the next one or two days via the asset store.

Please let me know in case you have any questions.

Best regards,
Peter

Answered

Hi,
thank you very much for reaching out.

Yes the custom transforms created in UMotion are not included in the exported animation as these transforms only exist within UMotion (so the animation curves would point nowhere outside of UMotion). But you can create your own transforms in Unity and use them in UMotion.


  1. Leave UMotion (by clicking on clear in the pose editor) and add new empty GameObjects for your IK handles. The hand IK handles created by the UMotion IK Setup Wizard are children of the shoulder bones and the foot IK handles are children of the hips bone. You should do the same if you want to work
  2. Give them slightly different names than the custom transforms in UMotion.
  3. Then assign your character to the pose editor again and open config mode.
  4. Assign the same settings (properties tab) as you have for the existing custom transforms (that where created by UMotion) to your new transforms.
  5. Make sure that you're pivot mode is local. Select an existing custom transform, click on the three lined menu button in the upper right corner of the move tool assistant shown in the scene view and copy the position. Paste it onto the new created transform using the same procedure. Switch to the rotation tool and do the same.
  6. Click on Save Reference Pose to save your changed positions/rotations.
  7. Now you would go back to pose mode and copy & paste the keys from the old custom transforms to the new ones. Unfortunately I just noticed that there is a bug that would only copy and paste the X values. I'm working on a fix (included in UMotion V1.26) which should be available in a few days via the asset store.
  8. Once you copied all your keys, go back to config mode and setup the constraints for your new transforms the same way as it was for the old ones. Then delete the old transforms.

For new UMotion projects, you could just create your transforms in Unity from the beginning on. Then the setup would be a bit easier as you don't have to migrate the existing custom transforms to your new ones. Just manually setup the constraints for your transforms (not using the IK setup wizard at all). More information about how to manually setup IK can be found in the second part of this video tutorial: https://youtu.be/ETN_DhktSjs

Please let me know in case you have any follow-up questions.

Best regards,
Peter

Answer

With UMotion V1.26 I introduced an easier way to update a custom transform to a real transform:
Create new empty GameObjects in your character's hierarhcy (outside of UMotion) that are named like the custom transform inside UMotion and are located at the same position in the hierarchy.


When you then assign the character to the pose editor, UMotion is automatically going to ask you if it should convert the custom transform definitions to real transform. All other steps mentioned in my previous post are not necessary anymore in this case.

The animation data for those transforms is then automatically included in the exported animation.

UMotion V1.26 is shipping in the next one or two days via the asset store.

Please let me know in case you have any questions.

Best regards,
Peter

Aweome !!

Thank You!!

That looks great. Thank You for the quick answer! :D :D