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
  3. Dismiss Notice

Word of warning

Discussion in 'Animation Rigging' started by crener, Apr 10, 2020.

  1. crener

    crener

    Joined:
    Aug 29, 2015
    Posts:
    27
    Hey, I've been trying to get this system to work for around 2 days now! If you don't have an animation controller assigned it all freaks out. I just wanted some IK for bodies and was happy with them just T-posing for the time being but moving IK targets without the Animation controller didn't work at all (limbs would fly all over the place)...

    ASSIGN ANIMATION CONTROLLERS
    (There should really be a warning in the Rig Builder for this)

    Thank you :)
     
  2. davehunt_unity

    davehunt_unity

    Unity Technologies

    Joined:
    Nov 13, 2017
    Posts:
    32
    Hi crener,

    Thanks for letting us know, and I'm sorry to hear you had a hard time getting it working. It is definitely of interest to us to make sure this is as easy to understand as possible, so we appreciate hearing where it is not achieving this.

    I have a question to understand more about how you got to this problem. Could you me know the steps you took to add RigBuilder component? When I attempted to reproduce this I couldn't because of the following...

    Here are several things the tools are already doing to prevent a bad setup (where RigBuilder might exist without an accompanying Animator component)

    1. If you add RigBuilder to an object that doesn't have Animator, an Animator Component gets automatically added.
    2. Note that AnimatorController is not required, just the Animator component itself. See the below video where the Controller field is blank.
    3. If you try to remove the Animator component from a working setup with RigBuilder a pop-up dialog warns you that RigBuilder depends on it.
    Here is a gif to demonstrate how these warnings and systems currently work...

    https://imgur.com/beRCRh8

    If you could help me understand how you got it to break that would be super useful. There may very well be user actions we have not yet accounted for. Thank you!
     
    DrummerB likes this.
  3. Ofx360

    Ofx360

    Joined:
    Apr 30, 2013
    Posts:
    155
    Any chance we get an option for the rig to be auto-built on import in the future?
     
    ProceduralCatMaker likes this.
  4. crener

    crener

    Joined:
    Aug 29, 2015
    Posts:
    27
    @davehunt_unity I don't think you can actually get Unity to add a component which is missing a requirement (RequiredComponentAttribute has been part of Unity for years after all) what i mean is the actual assigned value to the Animator -> Controller (the field) not a missing component!

    upload_2020-4-15_21-6-44.png

    Have a look at how the IK systems behave when this is missing cause it gets real weird!

    I guess as a user I'd either expect something to log an error or just assume the model should be in the default pose as a base then apply the rigs on top of it, the latter would be preferred... :)
     
  5. crener

    crener

    Joined:
    Aug 29, 2015
    Posts:
    27
    Just realised point 2. might be contradicting what I just said... I followed the video from the docs about setting everything up using the latest version from 19.3 which I couldn't get to work properly (still don't know why) then updated to 20.1 with animation rigging 3.3 where I got it to work after assigning the Animator -> Controller.

    I did the left leg like in the video with the serigraph ninja assets to make sure it wasn't some sort of data issue. But if the Animator -> controller wasn't assigned and I moved the target IK transform the model would behave as if there was a scaling issue and move the foot 10-15x the distance that I was moving in editor. As soon as I assigned one of the existing Animation Controllers to the Animator -> Controller field it worked exactly like the video/documentation was showing.

    I've downgraded to 19.3 again because the Editor kept hard crashing while I was debugging so I don't have in a state where I could just make a gif of the behaviour (as I still don't know why 19.3 doesn't work, but I can live with that as long as I know updating the version will fix it in the future)... If you want I could try to reproduce it again as the scene still has the model setup in same way as it was before?
     
    Last edited: Apr 16, 2020
  6. simonbz

    simonbz

    Unity Technologies

    Joined:
    Sep 28, 2015
    Posts:
    295
    Hi,
    You don't need to provide an animator controller to the animator for Animation Rigging to evaluate. The RigBuilder creates a separate PlayableGraph that evaluates after the state machine does in the animator.

    contraints without animator controller.gif

    I can't really tell you what is wrong in your case, but I can guess that setting an animator controller animates properties that are required in your constraint setup. Maybe try adding RigTransform components to game objects in your hierarchy if they're not directly influenced by your constraints.

    Refer to the RigTransform section in the manual: https://docs.unity3d.com/Packages/com.unity.animation.rigging@0.3/manual/RiggingWorkflow.html
     
  7. crener

    crener

    Joined:
    Aug 29, 2015
    Posts:
    27
    Ok, I've gone and recreated it See gif:
    example22.gif

    As you can see it works perfectly fine while the animation controller is set but once it is removed the rig goes crazy. So I need to make a bug report or is the gif enough?
     
    DrummerB likes this.