powroupi / blender_mmd_tools

mmd_tools is a blender addon for importing Models and Motions of MikuMikuDance.
GNU General Public License v3.0
1.83k stars 277 forks source link

Keyframe animation of IK toggle doesn't respond updating of frame. #259

Closed gGradest closed 4 years ago

gGradest commented 4 years ago

Hi. I want to make bone animation based on FK motion capture data(especially mixamo's) that often don't use IK. I can start IK motion following FK motion by manually hitting an FK to IK keyframe and using animated IKtoggle. However, now the IK bone doesn't be reflected in the bones unless clicking and move it. Bones responsoing this IK by this way are reset when timeline goes back to the FK area, so animation of this IKtoggle does not work in baking physical and exporting alembic. How can I transition animation from FK to IK in this process?

nathanvasil commented 4 years ago

Blender's auto IK doesn't actually keyframe anything, even though it has the potential to affect multiple bones.

If you want to export your animation to something (or even just render it in Blender), you need to keyframe all bones involved in the auto IK. With typical use, that would mean setting autoIK, moving the foot bone, add selecting the calf and thigh bone, then registering keyframes for all of them. (Tested in 2.79, because I'm not even sure if 2.81 supports auto IK-- if it does, I don't know how to do it.)

This isn't a "true" IK. It doesn't create the same behavior as true IK, which interpolates differently, and which needs to be baked to keyframes (one for every frame) for use in an engine that doesn't support IK. Auto IK is kind of a hack. For true IK behavior, you need to edit the rig to give it an IK bone and then bake the animation to visual keyframes. You would animate the IK constraint influence to control the FK/IK switch. If you needed an IK/FK snap, that would be even more work, requiring more controls. (One-way would be pretty easy; two-way requires scripting or addons.)

gGradest commented 4 years ago

Thank you for your accurate reply! I didn't understand "Auto" IK, so now I understand limitation of that. I will try baking method abouit it.

powroupi commented 4 years ago

For latest mmd_tools, you will need to enable Property Drivers under MMD Display panel to use animated IKToggles. Also, [Blender Preferences] -> [Save & Load] -> [Auto Run Python Scripts] needs to be enabled for Drivers to work properly. :smile: