How to cause a Cycle Warning

Ragdoll doesn’t like cycles. At all. If you see one, run.

So this is sort of an anti-tutorial. How to do something bad, in order to understand what it is, what causes it and how to avoid it.

Active & Passive Rigids

Cycles can come from anywhere, including Ragdoll. The typical cause of cycles related to Ragdoll comes from passive child, active parent.

Here’s what I mean by that.

ragdollcycle1

Here’s a tail setup with dynamic controls. So far so good. But now look what happens when I try and make the tip passive.

ragdollcycles2

The cycle warning might not show up in the Script Editor, which is worse because now you don’t know it happens. All you see is this odd-looking motion at the tip of the tail. What is that?!


Where Cycles Come From

The problem is that the passive rigid tries telling Ragdoll where the tip of the tail is, but in order to figure that out it must first find where its parent it. The parent is active, so it must first be simulated. And around we go!

So what can we do?


Solution

First, ask yourself what you would like to have happen. In this case, I want the tip to remain fixed in space. For the tail to act like a hangbridge.

Ok, then we need to separate that fixed position from the overall hierarchy and avoid a cyclic relationship. We could unparent the tip. But that’s often not good enough, especially if the rig is referenced.

So instead, we’ll get our position from elsewhere, rather than the child tip itself. For that, we’ll use the Kinematic Control.

ragdollkinematic3

Success!

Notice how a new transform was created. This is now where the final position and orientation comes from, rather than the tip itself. And as a result, no cycles.

Here’s what the flow of information looks like with this technique.


Roadmap

This problem isn’t always obvious. Especially not in complex rigs with lots of pre-existing animation. Sometimes, there are cycles already present in the original rig, cycles that can safely be ignored. In that case, it would be increasingly difficult to spot whether Ragdoll is struggling.

What I’d like to have happen is for more visibility of the problem. I’d like for Ragdoll to shout at you whenever it’s having this problem, and tell you about what can be done to solve it.

Perhaps even better would be to accept that there is a cycle, and interpret what the animator wants; such as a hangbridge effect like in this example. Although that can get a little dicey if what the animator wanted is different than what actually happened.

To be continued!