Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Twisting bone issuer in humanoid rig mod

Discussion in 'Animation' started by mr_Necturus, Feb 4, 2015.

  1. mr_Necturus

    mr_Necturus

    Joined:
    May 17, 2010
    Posts:
    2,956
    Hey guys.

    This is not the first time I experience an issue when hand bone suddenly twist one or more times when I convert character into "humanoid rig. This is happens in time when in 3D MAX (my original files) and other Mecanim rig types (legacy and general) the issue doesn't exist.

    Please take a look on two videos bellow. First shows humanoid with issue. Second show same animation in generic without the issue.





    Until this time I fixed all in MAX by changing hand position and making animation less accurate usually.
    But this time the issue related to many of my assets and I need to work much time to fix and re-upload.

    I am sure this issue somehow related to Mecanim internal mechanic.

    Did someone meet such problem and find appropriate solution? Not to afflict original animation I mean.

    Thanks!
     
  2. medhue

    medhue

    Joined:
    Aug 24, 2014
    Posts:
    176
    Maybe, what you should do, is look at the animation, in Unity, and inspect it's keyframes. It might be a result of optimization options in the FBX exporter, or some optimization in Unity. Keyframing all the bones in every frame will likely fix your issues, but it will add lots of data to your fbx file.
     
  3. mr_Necturus

    mr_Necturus

    Joined:
    May 17, 2010
    Posts:
    2,956
    Thank yo medhue. These options I already considered. I always bake animations before export. So have key per bone frame. I played with animation optimization settings in Unity with no result in this case. ;(

    Something works wrong in "humanoid" mode in Mecanim.
     
  4. Mecanim-Dev

    Mecanim-Dev

    Joined:
    Nov 26, 2012
    Posts:
    1,675
    Hi mr_Necturus,

    You are right, we found an issue with bone that are rotating more than 360 degree in the whole animation, we did a fix in 5.0.

    Log a bug with your project and send me your case number, we will check if it does fix your issue.
     
    hopeful likes this.
  5. mr_Necturus

    mr_Necturus

    Joined:
    May 17, 2010
    Posts:
    2,956
    Thank you Mecanim.Dev! You help is very appreciated.

    I will send bug report.
     
    Last edited: Feb 5, 2015
  6. Mecanim-Dev

    Mecanim-Dev

    Joined:
    Nov 26, 2012
    Posts:
    1,675
    On window it under the top menu Help/Report a bug.

    Just make sure to clean up your project first, we just need the avatar file with the animation.
     
  7. mr_Necturus

    mr_Necturus

    Joined:
    May 17, 2010
    Posts:
    2,956
    I sent it already. I am afraid with textures...
     
  8. Mecanim-Dev

    Mecanim-Dev

    Joined:
    Nov 26, 2012
    Posts:
    1,675
    Send me your case number when you get it
     
  9. mr_Necturus

    mr_Necturus

    Joined:
    May 17, 2010
    Posts:
    2,956
    PMed it thanks!
     
  10. Mecanim-Dev

    Mecanim-Dev

    Joined:
    Nov 26, 2012
    Posts:
    1,675
    Since 4.5 we did a lot of improvement on this side.

    We did a test in 5.0 and with the new algo it work.

    Unfortunately there is no workaround in 4.3 for you.
    I don't know if it possible for you but you could update to 4.5 and see if your issue is fixed?
    Best regards
     
  11. mr_Necturus

    mr_Necturus

    Joined:
    May 17, 2010
    Posts:
    2,956
    I am very glad to hear it, will upgrade my Unity tomorrow and test it.

    Thank you!
     
  12. Griffo

    Griffo

    Joined:
    Jul 5, 2011
    Posts:
    700
    I'm in 4.6.1f1 and its NOT fixed :(

    Hi Mr Necturus I'm the one who has been emailing you, with the video link of the problem.
     
  13. mr_Necturus

    mr_Necturus

    Joined:
    May 17, 2010
    Posts:
    2,956
    If it not work with 4.5 I will change animation. And will send FBX to you...
     
  14. Griffo

    Griffo

    Joined:
    Jul 5, 2011
    Posts:
    700
    OK, Thank you.
     
  15. mr_Necturus

    mr_Necturus

    Joined:
    May 17, 2010
    Posts:
    2,956
    Unfortunately Unity 4.5.5.f makes same error with those animations.
     
  16. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    I know it was stated this is a bug, but I wonder if adjusting the rotation limits on the limbs - in the per muscle settings could be a temporary work around?
     
  17. Mecanim-Dev

    Mecanim-Dev

    Joined:
    Nov 26, 2012
    Posts:
    1,675
    Unfortunately no, in fact it would be worse because it would widen the range of motion for this muscle.

    One thing that could help is to split your take of 6400 frame into different take or different file for each animation.
    Try to split in your authoring tools your problematic animation clip like from 2612 to 2652.

    We do have a special algo that try to minimize bone twist like that when we do import a clip. The algo try to find the minimum value for each muscle and start to unroll the muscle from this value. Since the clip is really long, 6400 frame, the range of motion for each muscle is really wide.

    The algo perform better on short clip than on long clip.
     
  18. mr_Necturus

    mr_Necturus

    Joined:
    May 17, 2010
    Posts:
    2,956
    Thank you guys.

    I already changed problematic animations and sen't it to Griffo.