Answered

Adding Extra Keys on Import Anim Files

Murat Atasoy 2 weeks ago updated by Peter - Soxware Developer 6 days ago 7

Hello, we have an humanoid character. We have a problem, seen on the video.

We dont want to see other keys, after importing the anim files. how can we solve this.
Thank you for your support.

UMotion Version:
1.24
Unity Version:
2019.4.20f1

Answer

Answer
Answered

Hi Murat,

thank you very much for your support request.

Humanoid is an intermediate file format that stores the animation in "muscle space" which is a normalized space that can be applied to any other humanoid character (i.e. animation re-targeting). When UMotion exports your animation to humanoid, it needs to re-sample the animation to convert it into said muscle space. When importing the humanoid animation back into UMotion, the animation is then again re-sampled from muscle space into the authoring friendly local space of your character.


Re-sampling means that as the curves can't be translated 1:1, their shape has to be rebuilt by creating those additional key frames you see here.


So instead of importing back and forth, try to stay in regular local space and once you've finished your work, export once as humanoid. You can also export your animation as FBX (for humanoid, set "Write Mode" to "Update Existing File" and your character's FBX file as destination file!) and then in the FBX's inspector you can play with the animation compression settings to get the humanoid animation within the memory size budget you require (if build size is your concern).

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

Best regards,
Peter

GOOD, I'M SATISFIED

Thank you for your attention. You always answered quickly.

Satisfaction mark by Murat Atasoy 6 days ago
Answer
Answered

Hi Murat,

thank you very much for your support request.

Humanoid is an intermediate file format that stores the animation in "muscle space" which is a normalized space that can be applied to any other humanoid character (i.e. animation re-targeting). When UMotion exports your animation to humanoid, it needs to re-sample the animation to convert it into said muscle space. When importing the humanoid animation back into UMotion, the animation is then again re-sampled from muscle space into the authoring friendly local space of your character.


Re-sampling means that as the curves can't be translated 1:1, their shape has to be rebuilt by creating those additional key frames you see here.


So instead of importing back and forth, try to stay in regular local space and once you've finished your work, export once as humanoid. You can also export your animation as FBX (for humanoid, set "Write Mode" to "Update Existing File" and your character's FBX file as destination file!) and then in the FBX's inspector you can play with the animation compression settings to get the humanoid animation within the memory size budget you require (if build size is your concern).

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

Best regards,
Peter

Thank you for your support.

As an enhancement (for next build maybe), you can export a simple xml file that keeps the number of layers and frames for each layer on Curve Editor. Then read that xml, if exist, while import animation files back.

It could be nice for a friendly human-computer interaction :)

You can just directly import the UMotion project file (instead of the *.anim file). But be aware that (no matter if using XML or something else) this only works for exactly the same character. Animations are stored in the local space of the character, meaning that as soon as any bone has a different initial position/orientation or a different name/hierarchical position an animation can't be imported correctly. That's why animation re-targeting (i.e. Unity's humanoid animation system) was invented. More info: https://blogs.unity3d.com/2014/05/26/mecanim-humanoids/


Best regards,
Peter

Thank you for the information you provided and your time. We are planning to create over 5000 sign language animations. Each animation needs to be edited multiple times when deemed necessary. We exported animation as a FBX file and saw some reductions in the keys in the timeline (we want it to be). However, due to some conflicts between FBX animations and the animation plugins we use, we can only use anim files (FBX files are much more smaller than anim files, but face-emotion keys not included somehow).

We don't import the project file over and over again, because it's always open. We can do this when we move on to another Unity project. But Umotion Pro really helps us a lot. Also thank you for developing. 

Good afternoon and good work.

Just wanted to add this information for completeness: If your face emotions are blend shapes (weight keys), then yes FBX does not support those (as the blend shape weight keys are referencing the Unity specific MeshRenderer component that does not exist in the FBX domain). When you import an FBX into Unity, it is going to create *.anim files for each animation (you can see those *.anim files when you expand the FBX by clicking on the arrow next to it in Unity's project window).

Thanks for the nice words, I'm glad that UMotion was helpful.

Best regards,
Peter

I am writing this to make a note for those who have the problem of adding too many key points to the anim files. Keep your umotion project with the animations inside for future editing of your animation files. Don't import them again. Just select the animation from listbox as shown below. In this image we have 6 anim file in avatar18_umotion project file.

Also, those who will use facial expressions have to save the animation files as anim. Anim files are larger than FBX files. But they contain more animation information. If you only want to use the animations of the bone regions (head, neck, body, arm, hand, finger, leg, etc.), you can export them as FBX. If you created facial gestures using bones (not blend shapes) maybe FBX files can store facial gestures. You can see a bunch of blend shape animation on aboew image.

As a result, we will save 5000 separate animations as multiple project files so that they will be edited later. It may be useful for us if we keep an average of 100 anim files in each project. In this way, we will not need to import anim files. In this way, we will get rid of unnecessary keys.

Thanks for your help, Peter. We wish you to convey our thanks to your teammates.

Keep your umotion project with the animations inside for future editing of your animation files. Don't import them again.

Yes exactly. This is the intended work flow.

If you created facial gestures using bones (not blend shapes) maybe FBX files can store facial gestures.

Yes, facial bones would work just fine using FBX.

I'm glad I've been able to help you. Don't hesitate to contact me in the future in case any other questions arise.

Best regards,

Peter