Multiple IK chains influencing the same bone don't work #73051

Closed
opened 2020-01-11 22:28:48 +01:00 by Novice · 34 comments

System Information
Operating system: Windows-10-10.0.17763 64 Bits
Graphics card: Intel(R) UHD Graphics 620 Intel 4.5.0 - Build 25.20.100.6472

Blender Version
Broken: version: 2.81 (sub 16), branch: master, commit date: 2019-11-20 14:27, hash: 26bd5ebd42
Worked: 2.79

Short description of error
I have a rig for a human. In blender 2.81 I set IK constraint (chain length 5) on the wrist and when I move it the finger bones follow. I set another on the thumb (chain length 4). Now when I move the wristIK the thumb bones stay where they are, they don’t follow. If I lower the chain length to 3 the thumb bones start to follow the wrist.

Exact steps for others to reproduce the error
Open this file with blender version 2.81a:

#73051-multiple-IK-constraints.blend

Select wristIK and move it around. The bones that are the thumb (finger1-1.R, finger1-2.R, finger1-3.R) doesn't move.
Select finger1-3.R and set chain length to 3. Now when the wristIK is moved around the bones follow.

blender281_rig_support.jpg
blender281_rig_support_chain_length.JPG

Open rig_support_blender2_79.blend rig_support_blender2_79.blend with blender version 2.79b. In this blend file the bones follow when wristIK is moved even when chain length is set to 4 for finger1-3.R.

I hope this is a bug and chain length should work the same between the versions. Because this is an animated character and I was hoping to be able to append it in newer blender versions and get the same result. With this behaviour the vertices gets wrong and if I lower the chain length I have to redo everyting.

**System Information** Operating system: Windows-10-10.0.17763 64 Bits Graphics card: Intel(R) UHD Graphics 620 Intel 4.5.0 - Build 25.20.100.6472 **Blender Version** Broken: version: 2.81 (sub 16), branch: master, commit date: 2019-11-20 14:27, hash: `26bd5ebd42` Worked: 2.79 **Short description of error** I have a rig for a human. In blender 2.81 I set IK constraint (chain length 5) on the wrist and when I move it the finger bones follow. I set another on the thumb (chain length 4). Now when I move the wristIK the thumb bones stay where they are, they don’t follow. If I lower the chain length to 3 the thumb bones start to follow the wrist. **Exact steps for others to reproduce the error** Open this file with blender version 2.81a: [#73051-multiple-IK-constraints.blend](https://archive.blender.org/developer/F8291785/T73051-multiple-IK-constraints.blend) Select wristIK and move it around. The bones that are the thumb (finger1-1.R, finger1-2.R, finger1-3.R) doesn't move. Select finger1-3.R and set chain length to 3. Now when the wristIK is moved around the bones follow. ![blender281_rig_support.jpg](https://archive.blender.org/developer/F8270490/blender281_rig_support.jpg) ![blender281_rig_support_chain_length.JPG](https://archive.blender.org/developer/F8270492/blender281_rig_support_chain_length.JPG) Open rig_support_blender2_79.blend [rig_support_blender2_79.blend](https://archive.blender.org/developer/F8270500/rig_support_blender2_79.blend) with blender version 2.79b. In this blend file the bones follow when wristIK is moved even when chain length is set to 4 for finger1-3.R. I hope this is a bug and chain length should work the same between the versions. Because this is an animated character and I was hoping to be able to append it in newer blender versions and get the same result. With this behaviour the vertices gets wrong and if I lower the chain length I have to redo everyting.
Author

Added subscriber: @BlenderAmateur

Added subscriber: @BlenderAmateur

#67232 was marked as duplicate of this issue

#67232 was marked as duplicate of this issue

#61621 was marked as duplicate of this issue

#61621 was marked as duplicate of this issue

#63136 was marked as duplicate of this issue

#63136 was marked as duplicate of this issue

#73262 was marked as duplicate of this issue

#73262 was marked as duplicate of this issue

Added subscriber: @mano-wii

Added subscriber: @mano-wii

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'

I can confirm.
In blender 2.79 this used to work.
And it's broken since the early versions of 2.80

I can confirm. In blender 2.79 this used to work. And it's broken since the early versions of 2.80

Added subscriber: @dr.sybren

Added subscriber: @dr.sybren

Changed status from 'Confirmed' to: 'Archived'

Changed status from 'Confirmed' to: 'Archived'
Sybren A. Stüvel self-assigned this 2020-01-13 16:36:38 +01:00

The finger1-1.R bone is not connected to its parent. The IK section of the manual states:

The IK chain can only extend from a child to a parent bone if the child is connected to it.

As far as I can see, this has been in the manual for three+ years.

The fact that something used to work in 2.79 is thus mere coincidence. You could argue that an unconnected chain shouldn't even be allowed, and that the user interface should show a warning about this, but that would be a new feature and not a bug fix.

The `finger1-1.R` bone is not connected to its parent. [The IK section of the manual](https://docs.blender.org/manual/en/dev/animation/armatures/posing/bone_constraints/inverse_kinematics/introduction.html) states: > The IK chain can only extend from a child to a parent bone if the child is connected to it. As far as I can see, this has been in the manual for three+ years. The fact that something used to work in 2.79 is thus mere coincidence. You could argue that an unconnected chain shouldn't even be allowed, and that the user interface should show a warning about this, but that would be a new feature and not a bug fix.

Added subscriber: @vasiln

Added subscriber: @vasiln

@dr.sybren Please take another look. The issues remain if you connect finger1-1.R to its parent. If you need, I've done this for you in the attached file.

Note the behavior in the file: moving the IK target for the thumb isn't a problem, but moving the IK target for the hand leads to the thumb becoming disconnected.

In playing with this trying to troubleshoot BlenderAmateur's problem, I noticed some weird twitchy behavior that looks like Blender's behavior when faced with dependency loops, although the console shows none. The IKs seem to fighting rather than equally contributing, with whichever being manipulated most recently taking precedence. Given this and when the issue arose, I would suspect a bug in the dependency code.

rig_support_blender2_81_16(1).blend

@dr.sybren Please take another look. The issues remain if you connect finger1-1.R to its parent. If you need, I've done this for you in the attached file. Note the behavior in the file: moving the IK target for the thumb isn't a problem, but moving the IK target for the hand leads to the thumb becoming disconnected. In playing with this trying to troubleshoot BlenderAmateur's problem, I noticed some weird twitchy behavior that looks like Blender's behavior when faced with dependency loops, although the console shows none. The IKs seem to fighting rather than equally contributing, with whichever being manipulated most recently taking precedence. Given this and when the issue arose, I would suspect a bug in the dependency code. [rig_support_blender2_81_16(1).blend](https://archive.blender.org/developer/F8275973/rig_support_blender2_81_16_1_.blend)

And, in anticipation....

allconn.blend

All bones connected (about three seconds of work), issue persists. Tested in 2.81 release, 2.81a release, 2.82 beta hash 0ef881cc57, 2.83 alpha hash f6aac92ab8.

Sorry, every time I type those hashes it does that inappropriate automatic markup, don't know how to tell it not to do that.

And, in anticipation.... [allconn.blend](https://archive.blender.org/developer/F8276071/allconn.blend) All bones connected (about three seconds of work), issue persists. Tested in 2.81 release, 2.81a release, 2.82 beta hash 0ef881cc5782, 2.83 alpha hash f6aac92ab828. Sorry, every time I type those hashes it does that inappropriate automatic markup, don't know how to tell it not to do that.
Author

I also hope you can take a new look and consider what Nathan is writing.

I also hope you can take a new look and consider what Nathan is writing.

Added subscribers: @Mets, @angavrilov

Added subscribers: @Mets, @angavrilov

In #73051#847932, @vasiln wrote:
Sorry, every time I type those hashes it does that inappropriate automatic markup, don't know how to tell it not to do that.

That's not inappropriate, that's a link to the actual commit. Very helpful for us.

In #73051#848263, @BlenderAmateur wrote:
I also hope you can take a new look and consider what Nathan is writing.

We always consider what people are writing.

In #73051#847795, @vasiln wrote:
@dr.sybren Please take another look. The issues remain if you connect finger1-1.R to its parent. If you need, I've done this for you in the attached file.

Thanks for that.

In playing with this trying to troubleshoot BlenderAmateur's problem, I noticed some weird twitchy behavior that looks like Blender's behavior when faced with dependency loops, although the console shows none. The IKs seem to fighting rather than equally contributing, with whichever being manipulated most recently taking precedence. Given this and when the issue arose, I would suspect a bug in the dependency code.

This isn't a dependency cycle, but that doesn't necessarily mean it's a supported situation. I've discussed this with our in-house rigger @Mets and he confirmed that two IK constraints influencing the same bone is not a good idea. @angavrilov do you know whether this was ever officially supported?

> In #73051#847932, @vasiln wrote: > Sorry, every time I type those hashes it does that inappropriate automatic markup, don't know how to tell it not to do that. That's not inappropriate, that's a link to the actual commit. Very helpful for us. > In #73051#848263, @BlenderAmateur wrote: > I also hope you can take a new look and consider what Nathan is writing. We always consider what people are writing. > In #73051#847795, @vasiln wrote: > @dr.sybren Please take another look. The issues remain if you connect finger1-1.R to its parent. If you need, I've done this for you in the attached file. Thanks for that. > In playing with this trying to troubleshoot BlenderAmateur's problem, I noticed some weird twitchy behavior that looks like Blender's behavior when faced with dependency loops, although the console shows none. The IKs seem to fighting rather than equally contributing, with whichever being manipulated most recently taking precedence. Given this and when the issue arose, I would suspect a bug in the dependency code. This isn't a dependency cycle, but that doesn't necessarily mean it's a supported situation. I've discussed this with our in-house rigger @Mets and he confirmed that two IK constraints influencing the same bone is not a good idea. @angavrilov do you know whether this was ever officially supported?

Changed status from 'Archived' to: 'Confirmed'

Changed status from 'Archived' to: 'Confirmed'

Added subscriber: @brecht

Added subscriber: @brecht

Checked with @brecht, and this is supposed to work indeed.

Checked with @brecht, and this is supposed to work indeed.
Sybren A. Stüvel changed title from Child bones doesn’t follow parent when setting IK and chain length to a specific value to Multiple IK chains influencing the same bone don't work 2020-01-20 16:58:44 +01:00

I'm still trying to get a grip on what is supported and what is not. Here is a simple test file made in Blender 2.79b:

simple_279.blend

This file has two chains, and the left/right tip bones are IK-targeted to the toruses. As long as both IK chains are equally long (in this case 3, left image), it all works fine. However, when one chain ends in the middle of the other chain (in this case 3 and 4 for resp. the left and right bone, right image) things also break in 2.79b:

#73051-child-parent-IK.png

Opening the above file in current master (2e9d5ba211) also works fine:

image.png

@brecht can you shed some light on what is actually supported and what isn't?

I'm still trying to get a grip on what is supported and what is not. Here is a simple test file made in Blender 2.79b: [simple_279.blend](https://archive.blender.org/developer/F8291991/simple_279.blend) This file has two chains, and the left/right tip bones are IK-targeted to the toruses. As long as both IK chains are equally long (in this case 3, left image), it all works fine. However, when one chain ends in the middle of the other chain (in this case 3 and 4 for resp. the left and right bone, right image) things also break in 2.79b: ![#73051-child-parent-IK.png](https://archive.blender.org/developer/F8291998/T73051-child-parent-IK.png) Opening the above file in current master (2e9d5ba211) also works fine: ![image.png](https://archive.blender.org/developer/F8292010/image.png) @brecht can you shed some light on what is actually supported and what isn't?

Bone parenting should never break like that, so this means there is a bug in 2.79 too.

The IK solver does not support a way to limit the influence of an IK constraint within an tree structure, it will always go all the way to the root of the tree structure. So I think the fix for this is automatically increasing the length of the shorter chain internally, so it goes up to the same root bone.

Bone parenting should never break like that, so this means there is a bug in 2.79 too. The IK solver does not support a way to limit the influence of an IK constraint within an tree structure, it will always go all the way to the root of the tree structure. So I think the fix for this is automatically increasing the length of the shorter chain internally, so it goes up to the same root bone.

Actually I'm not sure about the solution of making the chain lengths the same. In the rig_support_blender2_79.blend file there is useful behavior without that. I believe evaluating it as two separate IK chains one after the other like that was an intentional feature.

The problem in rig_support_blender2_79.blend is in the new dependency graph, if you use --enable-new-depsgraph in 2.79 it fails as well. Seems like a missing dependency, where it's re-evaluating only one of the two required IK chains when moving the wristIK object.

Actually I'm not sure about the solution of making the chain lengths the same. In the `rig_support_blender2_79.blend` file there is useful behavior without that. I believe evaluating it as two separate IK chains one after the other like that was an intentional feature. The problem in `rig_support_blender2_79.blend` is in the new dependency graph, if you use `--enable-new-depsgraph` in 2.79 it fails as well. Seems like a missing dependency, where it's re-evaluating only one of the two required IK chains when moving the `wristIK` object.

The case in simple_279.blend is a bit different in that there is no obvious order in which to evaluate the two IK chains like there is in rig_support_blender2_79.blend. So for that case it probably still makes sense to treat it like a single tree structure, though it's not as important to fix since it's easy to solve manually by tweaking the chain lengths.

I think the most important thing is to fix what seems to be a missing dependency for the rig_support_blender2_79.blend case.

The case in `simple_279.blend` is a bit different in that there is no obvious order in which to evaluate the two IK chains like there is in `rig_support_blender2_79.blend`. So for that case it probably still makes sense to treat it like a single tree structure, though it's not as important to fix since it's easy to solve manually by tweaking the chain lengths. I think the most important thing is to fix what seems to be a missing dependency for the `rig_support_blender2_79.blend` case.

@dr.sybren

That's not inappropriate, that's a link to the actual commit. Very helpful for us.

Markup on the hashes is now gone, but I still have the original page up; on that page, it links not to a build for me, but to a particular issue. First links to Fix #71620: broken particle collisions due to 0666ece2e2 ( https://developer.blender.org/rB0ef881cc57829471c441367ada6bf88119eaf26a ) which, of course, is not relevant to this issue. But of course it doesn't matter, if it links you to what you want, I'll continue to post hashes in the same way in future comments. Just offering because whatever behavior is going on might lead to users posting fewer hashes than they otherwise would, and of course hashes are going to be useful to y'all. (And because there might be some back-linking code setup that joins unrelated issues inappropriately, confusing folks incl. devs.)

@dr.sybren > That's not inappropriate, that's a link to the actual commit. Very helpful for us. Markup on the hashes is now gone, but I still have the original page up; on that page, it links not to a build for me, but to a particular issue. First links to Fix #71620: broken particle collisions due to 0666ece2e2 ( https://developer.blender.org/rB0ef881cc57829471c441367ada6bf88119eaf26a ) which, of course, is not relevant to this issue. But of course it doesn't matter, if it links you to what you want, I'll continue to post hashes in the same way in future comments. Just offering because whatever behavior is going on might lead to users posting fewer hashes than they otherwise would, and of course hashes are going to be useful to y'all. (And because there might be some back-linking code setup that joins unrelated issues inappropriately, confusing folks incl. devs.)

In #73051#855379, @vasiln wrote:
Markup on the hashes is now gone, but I still have the original page up; on that page, it links not to a build for me, but to a particular issue.

I see where the confusion comes from, I agree it's not that clear. It is a particular revision in Git, which fixes that particular issue. And yes, it does sometimes cause links between unrelated things.

if it links you to what you want, I'll continue to post hashes in the same way in future comments.

👍

> In #73051#855379, @vasiln wrote: > Markup on the hashes is now gone, but I still have the original page up; on that page, it links not to a build for me, but to a particular issue. I see where the confusion comes from, I agree it's not that clear. It is a particular revision in Git, which fixes that particular issue. And yes, it does sometimes cause links between unrelated things. > if it links you to what you want, I'll continue to post hashes in the same way in future comments. :+1:

This issue was referenced by 87b551e836

This issue was referenced by 87b551e8365954d03d1c27303b9776deefd4e4d3
Added subscribers: @gentleclockdivider, @Sergey, @SimpleBone, @ZedDB

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'

Added subscribers: @ecv, @JoshuaLeung

Added subscribers: @ecv, @JoshuaLeung
Added subscribers: @SidneyMoraesJr, @ErikFernandes, @GaiaClary

Hello. I was checking the related task and I see it is marked as resolved, but I did a simple test using today's build and the bug still there:

IK_noTarget_Bug.gif

Hello. I was checking the related task and I see it is marked as resolved, but I did a simple test using today's build and the bug still there: ![IK_noTarget_Bug.gif](https://archive.blender.org/developer/F8366432/IK_noTarget_Bug.gif)

@SidneyMoraesJr That seems to be a different issue. Let's continue at #67232.

@SidneyMoraesJr That seems to be a different issue. Let's continue at #67232.

Ok. Thank you.

Ok. Thank you.
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
7 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#73051
No description provided.