Search Unity

Animation transition causes model to sink in ground and deform

Discussion in 'Animation' started by karina_mady, Mar 16, 2014.

  1. karina_mady

    karina_mady

    Joined:
    Mar 16, 2014
    Posts:
    18
    Hello,

    I am working on a project that would allow me to play some animations in a row.
    I attached some screenshots of my blend tree and other helpful images


    I am trying to go from my idle state, which is the default idle in the Mecanim tutorial, to my own animation rigged in Blender to a mannequin character.

    $blend tree.png
    $mesh rig.png

    I have tried the solutions online that ask me to set the rig to Humanoid and copy the avatar definition from Dude avatar, but this causes the body to deform when it transitions to my animation. It looks like it sinks into the ground and deforms to a central point.

    $animation transition.png
    $deformation.png


    I don't know what to do, this is my final year project in University and I am pretty much desperate at this point.

    Before switching the Rig to Humanoid, after the transition, the avatar would just sink half into the ground , stuck in a T pose, but the body would not deform.

    The collider is set as in the Mecanim tutorial, so I don't think the problem lies with it.

    $sink.png

    Please help!:(
     
  2. Alf203

    Alf203

    Joined:
    Dec 7, 2012
    Posts:
    461
    Its hard to say what is wrong but I think it could be related to your animations ? I don't use blender but maybe the bones or even just the model doesn't have the correct orientation. If you post a Unity package that includes a sample scene with the character and one of the animations that makes the model sink into the ground, I could take a look at it.
     
  3. karina_mady

    karina_mady

    Joined:
    Mar 16, 2014
    Posts:
    18
    I have tried uploading a package with all the stuff in it but it won't allow me. I tried different browsers, computers, etc. Any way I could send the package to you personally?

    Thanks,
    Karina
     
  4. Alf203

    Alf203

    Joined:
    Dec 7, 2012
    Posts:
    461
    I would suggest using dropbox and just posting the public link here. That way more people will be able to help in case I can't find what is causing it.
     
  5. karina_mady

    karina_mady

    Joined:
    Mar 16, 2014
    Posts:
    18
  6. Alf203

    Alf203

    Joined:
    Dec 7, 2012
    Posts:
    461
    Ok, your stickman is extremely tiny by the way...

    Your stickman skeleton or hierarchy doesn't match with the dude's that is why I think it fails when you use the dude's avatar definition. It seems it cant find the hips….

    Also maybe due to the size problem on the stickman, it might also be responsible for the bone length warnings when you use the dude's avatar definition.

    Solution:

    You will need to create the avatar definition from your stickman instead of using the dude's avatar definition. If you do that it will work.
     
    Last edited: Mar 17, 2014
  7. karina_mady

    karina_mady

    Joined:
    Mar 16, 2014
    Posts:
    18
    Thanks for all the help, it works now.
    I have another question, I've been trying to trigger the animations in my blend tree automatically.
    So , in other words, when one animation ends, go to the next one.
    Now , I've tried to use this :

    private Animation animation;
    ...
    yield WaitForSeconds(animation["warmup2"].length);
    anim.SetBool ("NextWarmup", true);

    but it looks like it doesn't like the animation["warmup2"].length bit.
    Any idea why?

    I am using this several times with different animations.

    Thanks again!
     
  8. karina_mady

    karina_mady

    Joined:
    Mar 16, 2014
    Posts:
    18
    Any help on this question above please?

    Thanks
     
    Last edited: Mar 30, 2014
  9. karina_mady

    karina_mady

    Joined:
    Mar 16, 2014
    Posts:
    18