Search Unity

Root motion mesh deform issue

Discussion in 'Scripting' started by GFFG, Jul 3, 2015.

  1. GFFG

    GFFG

    Joined:
    Nov 13, 2014
    Posts:
    224
    My character has a root motion script. I baked movement animation from maya and exported the character as an .fbx file.

    The character moves well in Unity with the right animations but regardless of what bone I choose as "Root bone" under Rig in the inspector, there's part of my mesh that deforms and moves either ahead or falls behind the character as she moves forward.

    Does anyone have experience with this issue or know what could cause this and how to fix it? Thnx
     
  2. LeftyRighty

    LeftyRighty

    Joined:
    Nov 2, 2012
    Posts:
    5,148
    does the problem happen without having root motion turned on?
     
  3. GFFG

    GFFG

    Joined:
    Nov 13, 2014
    Posts:
    224
    No but the character doesn't move forward if root motion is not turned on. Only the animations start playing while the character remains in place.
     
  4. GFFG

    GFFG

    Joined:
    Nov 13, 2014
    Posts:
    224
    Can anyone help me please?
     
  5. GFFG

    GFFG

    Joined:
    Nov 13, 2014
    Posts:
    224
    My character mesh is split into two, unity says, because i have over 65K vertices. could that be the problem?

    This hasn't been a problem for other levels though where i don't use root motion but merely the standard 3rd person script..
     
  6. GFFG

    GFFG

    Joined:
    Nov 13, 2014
    Posts:
    224
    Here's a screenshot of my characters mesh deformation. If I tick bake into pose in animation wether it's root node position or original, the character doesn't deform but she only moves forward for the duration of the animation the loops from the starting point.

    PLEASE can anybody help??



    Screen Shot 1_00000.png
     
  7. GFFG

    GFFG

    Joined:
    Nov 13, 2014
    Posts:
    224
    Anyone?
     
  8. LeftyRighty

    LeftyRighty

    Joined:
    Nov 2, 2012
    Posts:
    5,148
    having over 65k vertices on a simple character is definitely going to cause issues... no idea if it's causing this one though. You really need to look at low poly models with high poly bump maps in the modelling tool of your choice. It's more work but it really improves performance.
     
  9. GFFG

    GFFG

    Joined:
    Nov 13, 2014
    Posts:
    224
    Ok.
     
  10. coolbird22

    coolbird22

    Joined:
    Mar 20, 2014
    Posts:
    38
    There seems to be double transformation being applied to your facial bones.. Make sure your facial bones are in the same hierarchy and that there is only one hierarchy in all. There seems to be a group or a set of facial bones that are outside the hierarchy, to which the root motion is also being wrongfully applied.

    I dont think it has anything to do with modelling and high poly count but I may be wrong about this part.
     
  11. GFFG

    GFFG

    Joined:
    Nov 13, 2014
    Posts:
    224
    Thank you, I fixed the problem. It was a simple matter of exporting controllers I added to the face that weren't a part of the original rig. Your right about the polycount not being the issue.