Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.

    Read our full announcement for more information and let us know if you have any questions.

Adjusting update time/order of runtime rigging

Discussion in 'Animation Rigging' started by RobO_HB, Sep 22, 2020.

  1. RobO_HB


    Sep 16, 2013

    We have an existing codebase where we are using FinalIK to adjust, for example, foot positioning for climbing up or down inclines and declines (FinalIK Grounder and Full Body Biped IK). We also have some extra bones in our skeleton to assist with skinning around, for example, the hips. One problem we run into with getting these to look correct is that these extra bones don't know anything about the IK adjustments which have been made, which makes it difficult to maintain volume during an instance where the leg/knee is lifted up to step up a hill or onto an obstacle.

    The Animation Rigging preview package offers some options that would seem to work well for this - for example, setting up a position constraint between the upper leg or knee and the hip bones in question, to allow them to be adjusted based on the position of said bone. However, I'm running into one fundamental problem: FinalIK is updated in LateUpdate, while (as far as I can tell) the rig constraints are updated in Update. So the constraint is updated before FinalIK adjusts the bones, so the constraint does not actually take FinalIK into account either.

    Completely removing FinalIK and replacing all of its functionality with the IK options provided in the Animation Rigging package is likely unfeasible (or at least out of scope for our current cycle). The only reasonable approach I've come up with is to introduce some extra transforms that cache the FinalIK-adjusted bone positions each frame, and then setting those as the source bones in the rig constraints. This will generally work, although will always be lagged by one frame behind the actual final rendered pose of the character, so it's not ideal.

    Is there any way currently, or any plan in the future, to allow any amount of control as to when during the update lifecycle the rig constraints actually update? This would be extremely helpful in making use of Animation Rigging alongside other IK solutions.

  2. simonbz


    Unity Technologies

    Sep 28, 2015

    Animation Rigging is implemented in Animation C# Jobs. it is evaluated in the animation loop using its own PlayableGraph. While that brings in improved performance as post-processing rigs are evaluated in threads, it also means we cannot interact with other scripts. Therefore, it is by design, and will not change.

    I already answered this question before. You can look at this thread for more details:
    colbydanesaddoris likes this.