Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Question Weird animation twitches after transferring motion to skeleton.

Discussion in 'Animation Rigging' started by Gyro_Zeppeli, Jan 14, 2021.

  1. Gyro_Zeppeli

    Gyro_Zeppeli

    Joined:
    Dec 27, 2017
    Posts:
    12
    See the video:


    Using Unity 2020.2.0f1.

    I'm using damped transforms to animate a scarf to have a believable animation. Since the scarf is meant to follow the player character, it cannot have the animation rig active constantly (I tried, and seeing it being dragged around is not ideal), so having animation clips seemed like the ideal solution. However, when transferring the motion to the skeleton, the animation sometimes bugs out and the object starts twitching/teleporting (you can see it pretty well in the video).
    These weird twitches are not actually present in the animation and don't happen if I go frame by frame, they just happen at random while the animation is playing in preview or play mode.

    Am I doing something wrong? The scarf is a simple 3d model rigged in Blender. I suspect it has something to do with the model/rigging or import settings since the same thing doesn't seem to happen with simple cubes.
     
  2. simonbz

    simonbz

    Unity Technologies

    Joined:
    Sep 28, 2015
    Posts:
    295
    So, if I understand well, these don't necessarily happen only when baking the animation? Can you see the same twitches when playing back the animation in the animation window or in playmode?

    If so, I would try and simplify the problem first to see how the transform hierarchy itself behaves when using damped transforms. If you say this works well with a hierarchy of cubes, there is no reason why it shouldn't work on a skinned hierarchy.
     
  3. Gyro_Zeppeli

    Gyro_Zeppeli

    Joined:
    Dec 27, 2017
    Posts:
    12
    Thanks for the answer!
    They only happen when the baked animation is playing (both in preview or play mode). What do you mean by simplifying the problem?
     
  4. simonbz

    simonbz

    Unity Technologies

    Joined:
    Sep 28, 2015
    Posts:
    295
    I meant trying to remove the skinned mesh renderer out of the equation to see if baking to the transform hierarchy would work as intended. If you're saying it's working without SkinnedMeshRenderer, then can you reproduce the same issue with your animated rig and animation without its SkinnedMeshRenderer.

    You're saying you only have the issues after having baked the animation, then it means there is a frame where you didn't capture the right pose.

    Do you have the same hiccup frame every time you bake to skeleton?

    You can submit a bug to us using the Unity Bug Reporter if you want us to look at the scene. It might be a bug in how we use the GameObjectRecorder.
     
  5. Gyro_Zeppeli

    Gyro_Zeppeli

    Joined:
    Dec 27, 2017
    Posts:
    12
    I tried removing the skinned mesh renderer and baking the animation again but I still get the hiccups. I don't have the same hiccup frame every time the animation gets baked, they seem to be in random points, different each time I play the animation. The animation seems fine if I play it frame by frame in the preview.

    I'll try to submit a bug, thanks!