Answered

Exported Animation offset

nory 2 years ago updated by Peter - Soxware Developer 2 years ago 1

Heyo,

first of all, thank you very much for developing this awesome tool. I greatly enjoy working with it and have tons of fun slowly discovering everything about animation.


Unfortunately, I'm running into a discrepancy between animations shown in UMotion and the exported animation, both as an .anim and as an fbx.


You can see the difference in the following screenshot, showing both the fbx in UMotion and the animation preview of a duplicate:

Image 1162


I've exported the fbx as a unitypackage, along with the corresponding UMotion project file, in case you want to have a look:

Ganymede3.asset
Ganymede06.unitypackage


I've tried playing with the animation import settings, but so far no configuration seemed to fix the issue. My suspicion is that the culprit is most likely found in some interaction between IK and the root of the object being rotated, but I haven't been able to pinpoint it, so far. Then again, I might also be on the wrong track and the issue is rooted in something else entirely.

As an added note, the FBX used here is the result of a VRM object being exported to FBX and consecutively rigged as a humanoid. I've considered whether this might play into it, but since the discrepancy also exists between the FBX in UMotion and the exported FBX with the animation, I'd imagine that it's likely not to be the cause.

In any case, I'd be incredibly helpful if you had any pointers.
If you need more information or the like, I'd be more than happy to provide.

Answer

Hi Nory,

thank you very much for your support request.

The problem you are seeing here isn't really related to UMotion, but to how the humanoid animation system itself works. The humanoid animation system is an animation re-targeting system. When Unity imports an FBX file configured as humanoid, it converts the actual authored animation into a "normalized" format that can then be played by the humanoid animation system on any other humanoid character even if the animation wasn't made specifically for that character. The system is designed to make animations look similar to the original authored animation, but they won't be precisely the same.

Hands being at wrong relative positions is one such problem humanoid can introduce. In order to compensate that error, humanoid has an internal corrective IK pass implemented that can correct wrong hand and foot positions. It's just not enabled by default (but you can preview it's effect when previewing the animation in the inspector window by enabling the IK toggle button).

More information about humanoid: https://blog.unity.com/technology/mecanim-humanoids

This blog post also covers the issue you are seeing with your hands at headline ("IK Solver").

In order to enable the corrective IK pass at you're game's runtime, you need to use scripting (only the foot IK pass can be enabled via Unity's animator UI). You can use this script (make sure to have "IK Pass" enabled in your Animator window):

using UnityEngine;
using UnityEditor;
using System.Collections;

    public class AnimatorHumanoidIK : MonoBehaviour
    {
        //********************************************************************************
        // Public Properties
        //********************************************************************************

        [Header("In order to use this, enable \"IK Pass\" in your Animator Controller!")]
        [Space(15)]
        public bool EnableFootIK = true;
        public bool EnableHandIK = true;

        //********************************************************************************
        // Private Properties
        //********************************************************************************
        
        //----------------------
        // Inspector
        //----------------------
        
        //----------------------
        // Internal
        //----------------------
        private Animator animator = null;

        //********************************************************************************
        // Public Methods
        //********************************************************************************

        //********************************************************************************
        // Private Methods
        //********************************************************************************

        private void OnAnimatorIK(int layerIndex)
        {
            if (animator == null)
            {
                animator = GetComponent<animator>();
            }

            float footIKWeight = EnableFootIK ? 1 : 0;
            float handIKWeight = EnableHandIK ? 1 : 0;

            animator.SetIKPositionWeight(AvatarIKGoal.LeftFoot, footIKWeight);
            animator.SetIKPositionWeight(AvatarIKGoal.RightFoot, footIKWeight);
            animator.SetIKRotationWeight(AvatarIKGoal.LeftFoot, footIKWeight);
            animator.SetIKRotationWeight(AvatarIKGoal.RightFoot, footIKWeight);

            animator.SetIKPositionWeight(AvatarIKGoal.LeftHand, handIKWeight);
            animator.SetIKPositionWeight(AvatarIKGoal.RightHand, handIKWeight);
            animator.SetIKRotationWeight(AvatarIKGoal.LeftHand, handIKWeight);
            animator.SetIKRotationWeight(AvatarIKGoal.RightHand, handIKWeight);
        }
    }

----

If you do not plan to share your animation across multiple characters, I would highly recommend using "generic" instead. "Generic" is true "what you see is what you get" as the generic animation system plays the authored animation 1:1.

-----


My suspicion is that the culprit is most likely found in some interaction between IK and the root of the object being rotated, but I haven't been able to pinpoint it, so far.

Please note that the exported animation does not contain any custom IK code. The effect of UMotion's IK solver is completely baked into the final animation. Once exported, UMotion does not execute any IK code anymore. In order to preview what UMotion exported into your *.FBX file, you need to preview it as generic. Only generic shows you the actual authored animation. When configured as humanoid, Unity converts the actual animation of the FBX into it's humanoid format which can introduce imperfections like the ones you are seeing.

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

Best regards,
Peter

Answered

Generic Rig IK Constraint Dependency Loop

ytGameDevDave 2 years ago updated by Peter - Soxware Developer 2 years ago 4

Hi Peter,

No matter where I Put the IK in Config (shoulder/spine) to prevent a dependency loop, the error will keep showing. It does not work. There is not much else to give you here...

Image 1153

Image 1154

Image 1155



I have been at a standstill and will continue with FK.


Please let me know

Answer
It works when Twist Bones are set to none, UMotion does not add twist bones itself?

That makes sense.

UMotion is not altering you're bone hierarchy. If you do not have twist bones in your character's hierarchy but want some, you need to add them in your 3D modelling application of choice.

Having wrong twist bone settings in the ik wizard explains why you get into a dependency loop. UMotion assumes that your arm's/leg's bone chains are longer than they really are. As a result the IK targets are placed at a wrong positions in the bone hierarchy which results in being dependent on each other --> loop.

Btw. you can click on the black "info" buttons (spread across the entire UMotion UI) to jump right to the related page in the UMotion manual. Stuff like how the "Twist Bones" setting exactly works is explained there: https://www.soxware.com/umotion-manual/IKSetupWizard.html#HumanIK

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

Best regards,
Peter

Answered

Make a better Clip dropdown list

Adrian Taylor 2 years ago updated by Peter - Soxware Developer 2 years ago 1

A small quality of life idea:

Make a better dropdown menu for the list of clips in the Clip Editor. If you are like me and often have lots of clips in a project, this menu can become really annoying to scroll - seeing as there is no scroll bar and the scroll wheel does not work. You have to continuously press the arrow buttons to scroll.

Image 1149

Image 1150

Answer

Hi Adrian,

thank you very much for your improvement suggestion.

I've noted your idea on my internal "ideas for the future" list. This list is used when considering which new features to ship in new updates.

Best regards,
Peter

Under review

Loss of work - Saving a prefab with Pose Editor filled, broke and deleted entire prefab file & existing connections from project

ytGameDevDave 2 years ago updated by Peter - Soxware Developer 2 years ago 6

Image 1148


I saved everything under the prefab into multiple separated prefabs, so it was easy to rebuild the main one. 

Unfortunately this COULD have destroyed almost all progress as the entire prefab was fully unpacked in the scene.

Working with an agile setup, graphics get updated through these prefabs as we pull new updates. 

Imagine having to recreate the prefab and all of its existing connections manually. This would be a severe timeloss that you do not want when you are close to a deadline.

I do not wish to replicate this issue. XD

This definitely needs a fix.

ps: I've been working a lot with UMotion now, this is why there's a lot of suggestions/posts from me, I absolutely love the software and wouldn't choose anything else to animate with as it is a massive treat to be working in the game itself.

Fixed

Can't sync timeline in Unity Version2020.3.36f1

Elsiehar 2 years ago updated 2 years ago 10

I have just updated my project file to the above and I can no longer sync the timeline, I thought it was working okay with this version but can't be sure.  Everything seems to work but the bones don't show and when I play the animation nothing happens.

I went back to my 2020.3.31f1 version and it still works okay.  For now I can just do the animation in 31f and then copy the files to 36f but it would be good if there was a fix.

Answered

Very simple yet effective feature

ytGameDevDave 2 years ago updated 2 years ago 2

Hey Peter, I know I'm kinda overflowing the forum but I'm just putting this out there for if you want to bring out another cool but easy-to-implement feature for the next update.

Maya has a very handy feature where we can scrub the timeline but not let it play, by clicking and holding down the middle mouse button.

What's handy about this is that we can take an existing pose, or edit existing poses and then decide to put the keyframe elsewhere without overwriting the keyframe the slider is on or losing all the pose-work we just did. 

I know there's a workaround for this; simply key your pose, copy the key, undo, and paste it elsewhere. But this feature makes our work twice as fast and keeps you in that animator flow, it's a luxury that I kind of miss and will definitely make UMotion shine just a little bit more. 

Just wanna say thank you for this incredible software 🙏 Unity should fund you and make it a standard 

Answer

Hi Dave,
thank you very much for your input and also thanks for your nice words. I'm glad you enjoy working with UMotion.

The problem I see with this feature is when people new to UMotion accidentally use it and then get confused why the pose doesn't update while scrubbing. Maybe a different but similar affective feature would be copy/paste buttons in the pose editor. What do you think?

Best regards,
Peter

Not a bug

Weird IK Pin behavior

ytGameDevDave 2 years ago updated by Peter - Soxware Developer 2 years ago 1

Setting a pin on the first keyframe of an already existing IK animation on the base layer usually worked fine... 

Image 1147

This would only happen sometimes and I'd ctrl+z and shrug it off, but now there seems to be no way around it.

I have no idea what is the cause.

These curves are supposed to be smooth, but there are chunks popping out for some reason.

Answer

Hi Dave,
thank you very much for your support request.

IK pinning changes the coordinate system of your keys (from one local space to another local space). When looking at position/rotation curves, you see these jumps where it switches between different coordinate spaces.

Under the hood, IK pinning is just a simplified mode of the child-of constraint. You always need to keep in your head that changing the parenting affects your keys (existing keys need to be converted into the new coordinate space etc.). More information can be found in the related manual page (headline "Dealing with spaces") and in the following video tutorial:

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

Best regards,
Peter

Answer

Hi,
thank you very much for providing feedback. Much appreciated.

You can assign a custom shortcut to your preferred export option to avoid accidentally clicking the wrong option. Shortcuts can be assigned by clicking on "Edit --> Preferences" in the clip editor.

Best regards,
Peter

Under review

Timeline Override Layer gives Character in UMotion extreme offset

ytGameDevDave 2 years ago updated by Peter - Soxware Developer 2 years ago 3

When "Syncing" a Timeline clip with UMotion that is on an override layer, the character will be completely offset, sometimes to the other side of the map. 

The workaround for now is to temporarily put the clip on the main Animation Track and put it back later after edits.


This could still be a problem with complex/multiple override layers, the workaround then would be a "fix-for-all" solution recording the bone data into a separate animation clip for on the main track and continue your work with that. 

Answered

Bake With Frame Step Option (Crucial for Mocap)

ytGameDevDave 2 years ago updated by Peter - Soxware Developer 2 years ago 3

Hi Peter, 

This is a feature request for Motion Capture cleaning. The ability to bake keyframes with an arbitrary number of frames skipped. This is so we can get rid of Jitter and have more control over the animation. 

This would be already very useful if it's just for the whole skeleton, could just override the old animation with the newly baked animation.

This would be incredibly handy to have now with UMotion... 

And a "Smart Bake" perhaps for in the future: the ability to bake specific bones and specific curves and the ability to keep the shape of the curves by automatically estimating and modifying the tangents. 

Image 1143

Image 1144



This would be amazing. 

Answer

Hi Dave,

thank you very much for sharing your idea.

This is more or less already possible, but you need to work directly on the animation data (not via the humanoid format as humanoid always requires re-sampling on import/export which is introducing keys for each frame again).

  1. Decide on a character you want to use to do your mocap clean-up.
  2. Convert your mocap animation to generic (for that character):
    a) Configure your character and mocap anim as humanoid.
    b) Create a humanoid UMotion project for that character and import the animation.
    c) Export the animation into your character's *.FBX file.
    d) Configure your character as generic.
  3. In the animation tab of your character's FBX settings you now have exactly those options you described in your idea.

  4. Create a new UMotion project of type generic and edit your animation. You are now working directly on the animation data (due to the use of generic), no re-sampling required when importing or exporting the animation. Data-wise, this is equal to editing the mocap animation in motion builder, maya or similar.

With humanoid, you do not have the level of control over the animation's data that would be needed.


PS: Step 1 and 2 are not necessary if your mocap animations can already be used as generic because they where all exported using the same standard character model (by your mocap software).


Hope this makes sense to you. Please let me know in case you have any follow-up questions.

Best regards,
Peter