Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Bug Animation rigging error: The TransformStreamHandle cannot be resolved

Discussion in 'Animation' started by masta-yoda, Nov 3, 2020.

  1. masta-yoda

    masta-yoda

    Joined:
    Apr 19, 2020
    Posts:
    67
    Animation rigging generates errors on my character's multi-parent constraint. And the constraint itself doesn't work (if I move the source, the constrained object stays in place and continuously controlled by animation):

    shot_201102_175906.png

    shot_201102_180425.png


    Code (CSharp):
    1.  
    2. InvalidOperationException: The TransformStreamHandle cannot be resolved.
    3. UnityEngine.Animations.TransformStreamHandle.CheckIsValidAndResolve (UnityEngine.Animations.AnimationStream& stream) (at <dd504953d81e4c1f9a1b8f7bbfb7fda8>:0)
    4. UnityEngine.Animations.TransformStreamHandle.SetLocalTRS (UnityEngine.Animations.AnimationStream stream, UnityEngine.Vector3 position, UnityEngine.Quaternion rotation, UnityEngine.Vector3 scale, System.Boolean useMask) (at <dd504953d81e4c1f9a1b8f7bbfb7fda8>:0)
    5. UnityEngine.Animations.Rigging.RigSyncSceneToStreamJob+TransformSyncer.Sync (UnityEngine.Animations.AnimationStream& stream) (at Library/PackageCache/com.unity.animation.rigging@0.3.4-preview/Runtime/AnimationJobs/RigSyncSceneToStreamJob.cs:49)
    6. UnityEngine.Animations.Rigging.RigSyncSceneToStreamJob.ProcessAnimation (UnityEngine.Animations.AnimationStream stream) (at Library/PackageCache/com.unity.animation.rigging@0.3.4-preview/Runtime/AnimationJobs/RigSyncSceneToStreamJob.cs:117)
    7. UnityEngine.Animations.ProcessAnimationJobStruct`1[T].Execute (T& data, System.IntPtr animationStreamPtr, System.IntPtr methodIndex, Unity.Jobs.LowLevel.Unsafe.JobRanges& ranges, System.Int32 jobIndex) (at <dd504953d81e4c1f9a1b8f7bbfb7fda8>:0)
    8.  

    As soon as I remove the multi-parent constraint - the error is gone.
    What can be wrong with my animation rigging?
     
    Last edited: Nov 3, 2020
    belarangel likes this.
  2. masta-yoda

    masta-yoda

    Joined:
    Apr 19, 2020
    Posts:
    67
    Turned out that my hierarchy was incorrect. I have to move VRConstraints to the same level as the root.
     
  3. krooq

    krooq

    Joined:
    Jan 30, 2013
    Posts:
    17
    Thanks for solving and sharing this, drove me nuts!
     
    masta-yoda likes this.
  4. AshyB

    AshyB

    Joined:
    Aug 9, 2012
    Posts:
    173
    This was absolutely driving me insane. I had the same issue. In the end it was because my skeletal rig had incorrect child setups.

    For example, I have a humanoid character. On the skeletal rig I made some empty game objects and gave them colliders so that I could create things like physical body parts etc.

    I normally parent one object per bone kind of setup;

    hand
    -collider
    -finger1
    --collider
    --finger2
    ---collider
    ---finger3
    ----collider
    etc.

    The error message was caused by the following;

    hand
    -collider
    --collider1
    --collider2

    -finger1
    --collider
    --finger2
    ---collider
    ---finger3
    ----collider
    etc.

    Apparently, it did not like parenting child colliders multiple times under the hand, I think it liked having bone->object->bone->object

    not bone->object->object

    Once I move collider1 and collider2 up a level so they were all equal children of the hand the problems went away;

    hand
    -collider
    -collider1
    -collider2

    -finger1
    --collider
    --finger2
    ---collider
    ---finger3
    ----collider
    etc.

    For some reason, its like rig builder takes a snapshot of your skeleton and then anything you add after kind of confuses it :p

    p.s. tried the following before hand;
    1. Build generic avatar.
    2. configuring avatar.
    3. Completely destroying, reimporting the mesh and redoing the whole character.
    4. Creating a new project, importing the character, and then copy and pasting the character from the new project to the old one to overwrite.
    5. Upgrading unity version.
    6. Removing and re-add packages.
    Nothing worked except the child setup above, even though the rig constraints I have do not reference any of the collider objects.
     
unityunity