Search Unity

Resolved Animations not the same on player as it is in preview?

Discussion in 'Animation' started by IncrediblyWalrus, Sep 14, 2022.

  1. IncrediblyWalrus

    IncrediblyWalrus

    Joined:
    Jul 22, 2019
    Posts:
    46
    Hi there,

    I'm just trying to figure out how animations as a whole works within Unity, I've never dabbled fully into animations and more just programming. I've noticed within the preview of the animations I've imported that the preview is correctly showing, however, once placed on an animation controller on a T-Pose position object, the animations aren't the same on there as they show on the preview.

    Here is the object in question, the arms (highlighted), are just First Person Arms, in T-Pose for the idle animation and to have an object in place so I can add the animator component to it:



    Now, here's the problem on the animations for it. Take my running animation for example, here is an IMGUR link that shows the issue side-by-side, with captions to better understand, here is the link.

    If there's more information to be said so you can understand my POV please let me know, I'm trying my best to explain the issue(s) I'm facing, but it's kinda hard to describe it.

    Thanks.
     
  2. IncrediblyWalrus

    IncrediblyWalrus

    Joined:
    Jul 22, 2019
    Posts:
    46
    From looking into this further, it seems as tho the hands / fingers are straight because the IDLE pose fingers are straight, which would be the default state pose in the Animation controller. Is there any way for the separate animations to have their own finger animations without them referencing the IDLE pose ones?
     
  3. IncrediblyWalrus

    IncrediblyWalrus

    Joined:
    Jul 22, 2019
    Posts:
    46
    Still having this issue, if anybody is willing to understand more on my issue.
     
  4. Jamesgf_4322hn

    Jamesgf_4322hn

    Joined:
    Sep 14, 2022
    Posts:
    6
    most likely for each element you need to create a separate animation, crossing them on the final result. It is also necessary then to complete everything in one common connection
     
  5. IncrediblyWalrus

    IncrediblyWalrus

    Joined:
    Jul 22, 2019
    Posts:
    46
    I'm unsure on what you mean when you speak of separate animation, each animation is different, such as the walking, grabbing item, etc.
     
  6. Nathanieljla

    Nathanieljla

    Joined:
    Apr 18, 2014
    Posts:
    97
    Your preview animation looks to be roughly 58 frames long. The animation you're playing in the non-preview window is listing the motion as 16 frames long. I'm confused as to how these are the same animations. Can you post the entire animation import tab? What's your animation controller look like? It would be nice to see a screenshot of your node network and the inspector info for the node playing the animation.
     
  7. IncrediblyWalrus

    IncrediblyWalrus

    Joined:
    Jul 22, 2019
    Posts:
    46
    That's strange, I notice that now how it's pretty different.

    Here is the import animation tab, if that's what you mean, if you're wanting to the parts at the bottom (where the preview tab is), just let me know: https://i.imgur.com/xY6abqz.png

    Here is the animation controller:
    https://i.imgur.com/LgwHm6o.png

    Here is it in action when running, as you can see, the default pose is the IDLE one (where it is t-posing, you don't see it in view of the camera as first person): https://i.imgur.com/jbVRsfy.mp4

    As you can see in the first link given, the fists are more closed in within the preview, but in the video above, the hands are out and not in fist motion, like they should be, I'm really confused as to why.
     
  8. IncrediblyWalrus

    IncrediblyWalrus

    Joined:
    Jul 22, 2019
    Posts:
    46
    Here's another view of the running animation being transitioned from a flashlight holding animation:
    https://i.imgur.com/ShZKO3X.mp4

    It's as if animations are being blended together on the transition, but the transition part should be over with (the fading between the two moment). I'm really confused as to what is going on, if anybody can give some insight on all of this that would be fantastic. Is this a blender import problem or what? I'm able to give more information with screenshots, etc.
     
  9. Nathanieljla

    Nathanieljla

    Joined:
    Apr 18, 2014
    Posts:
    97
    To me it seems like the issue is the idle node isn't processing any animation. When you select the node, what's listed under the motion field?

    anim.PNG
     
  10. IncrediblyWalrus

    IncrediblyWalrus

    Joined:
    Jul 22, 2019
    Posts:
    46
    Thanks for the response, the IDLE animation is going off a blend tree (they show some bored / idle animations):
    eeefaf9bc0a998cf25cf67d7b6cbdf69.png

    And here is the blend tree:

    034d2beb098e6b23bfb8402c390362e0.png
     
  11. Nathanieljla

    Nathanieljla

    Joined:
    Apr 18, 2014
    Posts:
    97
    Sorry. I realized I ran you down a rabbit hole, because I didn't fully catch your original concern. I thought were were reacting to the run animation blending into a t-pose, but upon reviewing this conversation I see you're concerned with the fingers.

    For the run cycle animation, under the rig tab, is the avatar being created or is it referencing the same avatar that the other animations use?

    If your run cycle is building it's own avatar, then I could see how it looks correct in the import preview, but doesn't work once placed on another rig. (Assuming there's some deviation between hierarchy of the two files). In this case, I would switch the import settings to use the existing avatar, then see if the fingers are now broken in the import preview.

    If that's NOT the case, i.e. the run animation is referencing the same avatar as the t-pose anim and the fingers looks good then....yeah. That's an interesting one. In this case if you DM me a unity package of your animations I can take a look.
     
  12. IncrediblyWalrus

    IncrediblyWalrus

    Joined:
    Jul 22, 2019
    Posts:
    46
    Heya,

    Sorry for the slow response. It does seem like an avatar thing, I checked and placed the avatar from the idle animation onto the running one as a test, and it basically was looking like it did in the animator controller in the actual running imported preview. So then I created an avatar within the actual model of the animation, and it works like normal again in the preview, however, the animation controller seems to still be having issues...
     
  13. IncrediblyWalrus

    IncrediblyWalrus

    Joined:
    Jul 22, 2019
    Posts:
    46

    Here is a more updated import settings, same import settings on two animations that I have used, one idle one running.

    6f3986f76e89559bc08504a8a7318274.png

    However, still the same issue. Both animations have their own avatar just for the sake of testing, to see if something is up. And it's still basically transitioning wrongly: https://i.imgur.com/DDX0CmP.mp4

    How would I go about doing this package stuff? I've never sent anything to anyone with my unity projects before, so if you could DM me that would be really beneficial, cheers for the support, I honestly wasn't expecting this amount of love here and I do appreciate this.
     
  14. Nathanieljla

    Nathanieljla

    Joined:
    Apr 18, 2014
    Posts:
    97
    I started a private conversation with you.
     
  15. Nathanieljla

    Nathanieljla

    Joined:
    Apr 18, 2014
    Posts:
    97
    Found the issue, this has kicked my ass too many times in the past. Joints that don't have any keyframes on the rotation (or translation) won't have their current transform data stored. I.e. set some keyframes on the finger joints and re-export.
     
    IncrediblyWalrus likes this.
  16. IncrediblyWalrus

    IncrediblyWalrus

    Joined:
    Jul 22, 2019
    Posts:
    46
    Will look into this and reply back once done, if it works you're a genius, many thanks again for looking into this.
     
  17. IncrediblyWalrus

    IncrediblyWalrus

    Joined:
    Jul 22, 2019
    Posts:
    46
    Perfect!

    That was indeed the issue, appreciate this so much again. @Nathanieljla
     
    Nathanieljla likes this.