Search Unity

  1. Are you interested in providing feedback directly to Unity teams? Sign up to become a member of Unity Pulse, our new product feedback and research community.
    Dismiss Notice

Scene animation does not match imported animation

Discussion in 'Animation' started by Griffo, Apr 17, 2015.

  1. Griffo

    Griffo

    Joined:
    Jul 5, 2011
    Posts:
    683
    Hi,

    Unity 5.0.1f1

    As below in the first video I have a animation that I imported and in the inspector animation preview window it plays ok, and in Cheetah 3D, but when played in the scene, video 2 the animation is slightly off, also this happens with a few other animations.

    Animation settings ..

    Using mecanim with animation controller.
    No root motion, as only arms and weapons.
    Update mode normal, tried others, same results.
    Culling mode, cull update transforms, again tried other modes with same results.
    Blend weights set to 4 bones





    As you can see the silencer and hand move out of position in the second video, anyone know why this would happen please?

    Thanks.
     
  2. Griffo

    Griffo

    Joined:
    Jul 5, 2011
    Posts:
    683
    Bump ..

    OK, why is Unity 5 Mecanim screwing up otherwise perfect animations in any other software ??

    Here the wrist twists around, I'd appreciate any advice from any Unity dev please ..

    Thanks.

     
  3. Griffo

    Griffo

    Joined:
    Jul 5, 2011
    Posts:
    683
    Again everything plays and looks ok in the inspector preview window .. has no one from unity have anything to say?
     
  4. raziel786

    raziel786

    Joined:
    May 6, 2014
    Posts:
    22
  5. Griffo

    Griffo

    Joined:
    Jul 5, 2011
    Posts:
    683
    raziel786 I really appreciate the input, I'm not using any masks and have already tried playing around with the transform mask, and still getting same results ..
     
  6. Mecanim-Dev

    Mecanim-Dev

    Unity Technologies

    Joined:
    Nov 26, 2012
    Posts:
    1,674
    When you get a different result between the previewer and in scene playback this is often caused by using a different avatar rig for you in game character and to import your animation clip.

    Are you using a humanoid rig or generic rig?

    the very first thing you can do is switch to generic rig and see if the problem go away, if you still have your issue then it mean that there is an issue will unity import the animation. Please log a bug with your project.

    If the problem go away and you were using the Humanoid rig your next step is to make sure that both your character avatar and animation avatar match(assuming that you did use the same skeleton rig), use the same avatar to import both your character and your animation.

    If after all these step you can't make it work please log a bug
     
    theANMATOR2b likes this.
  7. Griffo

    Griffo

    Joined:
    Jul 5, 2011
    Posts:
    683
    Mecanim.Dev Thank you for the input.

    I'm using a generic rig and using the
    same avatar in my game as the one imported with the model (the animations come with model )

    I've tried both humanoid and generic rigs with the same results, i'll make a small scene and submit a bug report.

    I'll point you to THIS thread as you might find it interesting, as a similar problem was happening (I alerted him to this problem after buying one of his models) and you say "We did a test in 5.0 and with the new algo it work." Unity 5 doesn't seem to have corrected this problem.

    Thanks.
     
  8. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    Hey @Griffo

    Not sure about the first issue with the pistol, especially when it looks accurate in the preview.

    If you want to fix the wrist twist (for now) until Unity can get it all fixed up, you can probably set a tween key on the wrist rotation half way between when it starts rotating and when it ends the rotation - with a smooth interpolation on the key. I know this is a work around, but it may help Unity understand the rotation that is nearly 180 degrees. I'm not sure if this will fix it, but it's worth a try to get it working so you can continue on with other tasks.

    One thing about the pistol animation - the right finger should be off of the trigger when messing with the silencer. :) Don't want to shoot off a finger on the other hand!

    Nice rigging and skinning on those wrists and fingers!
     
    Griffo likes this.
  9. Griffo

    Griffo

    Joined:
    Jul 5, 2011
    Posts:
    683
    theANMATOR2b thanks for the input, i"d already thought of using IK to correct the twist but I really want to find the problem ..

    I've been doing some more investigation and if i build a new scene and import a fresh model of the weapon and hands the wrist still twists around, but if I build a new project and import the model the wrist does not twist, so what can be causing this problem?

    I can not build a new project as the project I'm working on is to big and complicated to start messing around with building new projects.

    Any ideas would be gratefully appreciated ..

    Thanks.
     
  10. viverlymercado

    viverlymercado

    Joined:
    Aug 8, 2015
    Posts:
    2
    Hello, I'm having the same problem.... The scene animation looks different versus the preview.... were you able to fix this?
     
  11. DChap

    DChap

    Joined:
    Dec 24, 2016
    Posts:
    23
    Thought I'd throw my hat in in 2018 and say I'm still having the same issue as well. My character anim looks fine in 3DS Max and the Unity preview window. Bring it into the scene and his shoulders hunch up and head tilts back slightly. My character model, avatar and anims are all coming from the same FBX, Rig system is set to Generic, so I'm having trouble identifying where the disconnect is coming from.
     
  12. glichess

    glichess

    Joined:
    Aug 29, 2018
    Posts:
    1
    Hi, I came here looking for answers to the same problem. My mistake was that I had renamed the animation in Blender and didn't edit the animator controller to match. So if you had previously set up a controller and then edited the file in an external program and re-imported the animation, then maybe you made the same error. If the animation preview looks right but the in-game animation looks different, one source of error could be the animator controller.
     
  13. Miguelfanclub

    Miguelfanclub

    Joined:
    Jun 14, 2015
    Posts:
    49
    Same problem here. After re exportingthe file from maya, animations look good in the preview looks fine, but not ingame. I havent rename anything.
     
  14. punzer_ta

    punzer_ta

    Joined:
    Jun 7, 2015
    Posts:
    3
    Bump. Problem occurs in native Blender format. When I first create a new Blender model and bring it into Unity, I can tweak it in Blender all I want and everything updates fine. When I later reopen the Blender file, make and save changes, then the animations look fine in preview, but are disfunctional in a strange way in scene. I'm wondering if it has to do with the keyframe reduction, but haven't found a solution.
     
  15. SammmZ

    SammmZ

    Joined:
    Aug 13, 2014
    Posts:
    124
    Just willing to share my experience. Using Generic animations with Maya or Blender sources. Original animations are very precise, imported in Unity it have differences. I'm upset to still have this problem in 2019 :(
     
  16. nkyms

    nkyms

    Joined:
    Dec 5, 2016
    Posts:
    5
    Having the same problem. Have always had this problem since 5 years ago :(
     
  17. punzer_ta

    punzer_ta

    Joined:
    Jun 7, 2015
    Posts:
    3
    Almost a year later and surprised to see I already commented on this tread.

    Ran into the problem again, and found one solution that might work for some. The import settings for the animation clip was one frame longer than the recorded action in Blender. There was actually a Unity warning about this in the editor, but I missed it. Using the offered 'clip' function fixed it.

    Using 2018.4
     
  18. Fine3D

    Fine3D

    Joined:
    Dec 13, 2014
    Posts:
    11
    Related to this topic; inside Unity, the animation looks different than the one inside Max. In the attached image the position of the fingers is different in Unity. There is a notification also that seems to be related to the problem but I have no idea how to deal with it.

    Using 2020.3.0f1
     

    Attached Files:

unityunity