I have encountered problems with animations appearing one way in the editor, while being represented in another way during runtime. This is often the case with IK. I have found two issues that I am trying to figure out how to problem solve. 1. Often when I create an animation using IK, I finish the animation with proper poses. Bake and save. Then return to the animation to find the IK calculation to have changed, completely posing the rig incorrectly. (This issue not shown in the pictures) 2. The animation I've made is correctly displayed and runs in the editor. Running the animation at runtime calculates the positions differently. (shown below)
This particular rig was trying to prevent incorrect calculations of the limb by using a Point To knee helper, and a Set Position helper for the foot. But even that is not providing expected results.
Thank you for the really detailed post.
Thanks to your article, we were able to review this issue.
We did some tests.
Based on the results, we would like to explain the production method we recommend.
Before explaining, let's talk about what caused this issue and what our intentions were to develop it.
We also used IK in 3Ds Max before.
As you said, in a complex coordinate system like 3D, it is more intuitive to use the Helper than to set IK using angles.
Conversely, however, we found it much more intuitive to use angles in a 2D coordinate system.
In 2D, an angle property is one-dimensional, so unlike angles in 3D, there is no ambiguity.
So, we made IK work by actively utilizing the Angle Constraint rather than the complicated method in 3D.
So, the situation where there are two or more IK Controllers in one IK Chain is excluded from development.
In other words, it is more accurate to say that this issue is an out-of-spec specification rather than a bug.
Also, the results in the editor and runtime look different due to "continuity of IK", which will be explained below.
We tested it like this:
We created a "Helper Knee" that orients the knee due to IK.
And we connected the "Helper Knee" by setting the "Position" type IK Controller on the bone of the Calf (not the Thigh).
In the same way, we created a "Helper Ankle" that corresponds to the position of the foot, set an IK Controller of type "Position" for the foot, and connected it to the helper.
It's probably the same as your setup.
We created an animation where the knee bends once forward and once backward.
When we bake the character and play it back, it seems to play mostly the same.
Of course, if you look closely, the character's knees are slightly less curved in the back.
This is due to the "continuity of IK".
AnyPortrait's IK Controller utilizes previous results to calculate IK while an animation is running.
So, if the character's bones move violently in the opposite direction of the previous result, the result of IK changes somewhat smoothly.
Without this "smoothing" process, IK results will sometimes have "spikes".
So, back to the first topic, let's check if this only happens at runtime.
We modified the animation to make the leg bend back and forth more violently.
First of all, IK seems to work without much problem in the editor.
(1) Move the animation's time slider forward a little and play the animation.
(2) when the second keyframe is reached,
(3) the result of the IK is not what was intended.
The leg was not bent backward!
The more continuous the animation is, the more IK will refer to previous results.
So, smoothing tends to work more strongly when playing back in the editor than when editing, and at runtime than in the editor.
In fact, you can see similar results at runtime.
Therefore, it would be more accurate to say "the results differ according to the IK tendency" rather than "the results in the editor and the runtime are different".
You might be wondering what it's like to get rid of IK's smoothing.
Then you'll see horrendous results, such as glitches in the game (e.g. a game character's corpse's limbs trembling).