Very strange constraint jiggling not present in blender 3.6.3 #115915
Labels
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
6 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#115915
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Operating system: Windows-10-10.0.19045-SP0 64 Bits
Graphics card: NVIDIA GeForce GTX 1070/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 537.58
Blender Version
Broken: version: 4.1.0 Alpha, branch: main, commit date: 2023-11-25 22:37, hash:
1b6cd937ffc8
Worked: (3.63)
Caused by
6b872079fe
Short description of error
rig jiggles in 4.1alpha, but copy/pasting it into 3.6.3 works fine
Exact steps for others to reproduce the error
open below blend files in the blender version the filename indicates
play back in both.
4.1alpha jiggles
I noticed this whilst updating a 3.63 course to 4.1 by following along in the newer version. The rig was created in 4.1 and then copy/pasted into 3.63. When I originally created the same rig in blender 3.63 last year, the jiggle problem wasn't there either.
Perhaps this is a bug introduced by the recent bug fix that prevented inactive constraints from causing circular dependancies? (I think I heard it mentioned on one of the live streams).
See video below. right is 4.1. Very jiggly hands throughout the animation, and then incorrect placement on first frame. Neither issue present in 3.63
there are no circular dependencies reported, and it only affects the bone overlays. The geometry that's parented to the bones aren't jiggling thankfully.
Can confirm but haven't deep into bissect/regression fact.
This behavior also appears in 4.0
and I am pretty sure it was caused by
0c2afa7c17
Interestingly it works the other way, as in running the hand in IK causes no dependency cycles
Can confirm, will check
Seems this was already broken in
30de3d7c1a
Cant check further atm. since opening the file with
65f91bd53a
or below will render the armature invisible?!For some reason, this also does not trigger with a
lite
buildAh, some sort of issue with the bone layers refactor (layers are not set for any of the bones -- this can be enabled again and I can bisect further)
Caused by
6b872079fe
I havent read through all of #88752 (yet), @nathanvegdahl : mind checking?
Very strange constraint jiggling not present in blender 3.6.3to Very strange constraint jiggling not present in blender 3.6.3 (overlapping IK)Very strange constraint jiggling not present in blender 3.6.3 (overlapping IK)to Very strange constraint jiggling not present in blender 3.6.3I've added it to my todo.
Having said that, @brecht might have more insight here. I don't really have a good handle on the IK code, and the fix I committed that apparently caused this was largely thanks to him figuring it out. (I don't mean that as any kind of blame for this bug, of course. Just acknowledging my lack of expertise.)
Some additional information, discovered while trying to create a minimal repro case:
There is a cyclic constraint chain in the provided repro files:
forearm.L/R
has an IK constraint withik right hand.L/R
as the target.ik right hand.L/R
has a Copy Location constraint withforearm.L/R
as the target.The IK constraints are disabled in the file, but nevertheless present. Removing the disabled IK constraints resolves the issue.
If I recall correctly, cyclic constraint dependencies aren't supported even if one of the constraints in the cycle is disabled. For example, it's trivial to create issues by making two bones with Copy Location constraints to each other, even if one of them is disabled. However, in that case the cyclic dependency is reported in the terminal.
So I'm thinking the bug here may simply be that the cyclic dependency isn't reported, rather than the apparent jiggly misbehavior.
@nathanvegdahl Any idea why this rig has worked fine in previous Blender versions? Only reason I ask is that I've just spent 2 years creating an animation course based on this rig, everything was fine until testing in 4.1 (didn't test in 4.0)
@3di
Edit: sorry, just to make this clear: I haven't finished investigating this, so this is what I think is going on.
In a word, coincidence. When it comes to dependency cycles in a rig, there's no guarantee that they won't behave the way you want nor any guarantee that they will. It's just unsupported, and considered an invalid rig configuration (a little bit like undefined behavior in C/C++ if you're familiar with that). Blender is supposed to catch those cycles and report them, so that users don't end up with invalid rig configurations. But for some reason it didn't in this case. And that is (I think) the actual bug here: it didn't inform you that your rig, although seemingly working, was actually broken to begin with.
Here's a blend file with a much simpler setup that demonstrates the same jiggly behavior: two bones with copy location constraints to each other, with one of those constraints disabled:
cyclic_dependency_with_disabled_constraint.blend
In this case the cyclic dependency is properly reported. (Admittedly, this reporting could and probably should be directly in the user interface to make it obvious, but it's at least reported in the console if you open Blender from a console.)
Some more detail:
IK constraints are different than the other constraints in Blender because they are cooperative on the whole armature. Most constraints just operate on a single bone/object, and are independent of the other constraints in the scene/armature. But the IK constraints that you create as a user are more like markers on the armature, which then serve as the input to a single IK solve on the whole armature at once. This is what allows e.g. branching tree IK to work, among other things.
Because of that, there's a lot more room for bugs to slip in, being a significantly more complex situation than most constraints in Blender. In this case, there was a bug (#88752) where some parts of the IK system were being erroneously ignored by the IK solver, even though they were part of the dependency graph. This resulted in some really nasty jumping-around behavior in certain IK setups.
Part of fixing that bug was slightly tweaking how IK is evaluated in certain situations. This tweak didn't affect valid setups (aside from those we were fixing), but it seems it did affect setups with cyclic dependencies, such as your rig.
Damn, that really sucks. I honestly feel for you.
I'm not sure what we can do on the coding side about this for you. But perhaps it's possible to change your rig to use a valid setup, in a relatively non-disruptive way, that requires re-recording as little as possible?
You could hop on #blender-riggers on blender.chat, and we could try to help you figure out an alternative rig set up there. There's also BlenderArtists, and you could perhaps get some help there.
You could also perhaps specify in your course a maximum Blender version before the relevant fix was introduced, and explain the situation.
Thanks for the detailed response. Wouldn't be possible to re-record the whole course as it's taken 2 years to make, and is around 30 hours of video. The editing for Blender 4.1 has taken 3 months alone! Perhaps when I re-record for Blender 5's new animation system I'll modify the rig. It's not too big of a deal because the bone is never used for parenting, the copy location constraint is just to make sure the IK hands are easy to find and rotate in FK mode, because they still control rotation of the actual hand bone.
Do you think blender will ever respect whether or not bone constraints are disabled, so that rigs that dynamically enable/disable constraints can work properly (as if the disabled one's weren't there)?
Some notes from further investigation:
As far as I can tell from looking at the actually constructed dependency graph (via the Dependency Graph Debug addon), it's not clear to me why there's a jiggle here. There is still conceptually a cyclic dependency here, which I believe still makes this rig setup invalid and unsupported. However, the dependency graph is constructed such that the Copy Location constraint of
ik right hand.L/R
only depends on the pre-IK transform offorearm.L/R
, not the post-IK position. So in theory this set up should still work in current Blender (albeit coincidentally, and not supported).So there may still be something going on here (beyond just not detecting some dependency cycles) that deserves attention. Not sure.
There are tentative plans in the future to add some kind of rigging node system, which would allow the user to have full control over rig evaluation. Such as system would allow this and many other setups that would normally create dependency cycles to be valid, ableit with a bit more work from the rigger.
For future bug reports, please take some time to mimize the example blend file. In this case, there are bone shapes and many bones that are irrlelevant to this particular issue. The Armature contains bone collections that are hidden, which contain more bones that are again irrelevant, yet they are even animated. These things add up, unfortunately, and make it considerably slower to investigate in detail. From the description, it seems that this situation should be reproducible with only a handful of bones (pun very much intended).
To illustrate, here is the resulting dependency graph of the attached example file:
I don't share the "not supported" conclusion here, I think we can investigate further on the Blender side.
Will do, thanks. I guess what needs to happen is that constraints which are turned off should be treated as not there. Easier said than done I'm sure. It's not a massive issue in this case, because the copy location is there only to ensure the IK bone remains in place when the arm is in FK mode because it's still used for rotating the hand bone. It also saves having to use your copy global transform addon to re-position the IK hand each time the arm changes from FK to IK.
Blender's current behaviour has the advantage that 'influence = 0%' and 'turned off' have the same result, and gradually increasing the influence produces smooth motion. Unfortunately this is only possible when the mere existence of the IK constraint already influences the bone.
Still, there's something to be said for the "a disabled constraint should be have as if it does not exist" view on this, as it opens up interesting possibilities for riggers. I'll investigate Brecht's alternative approach he mentioned in #88752 (comment)
That would be awesome, 0 influence and disabled constraints being treated as 'not there' for individual frames would make rigging waaaaay easier, saving riggers from the need to create extremely complex rigs with duplicate arms etc just to avoid the problems caused by disabled constraints causing dependency loops.
@dr.sybren
As you pointed out in our in-person discussion, as long as the enabled/disabled states aren't animated then indeed this seems like something we can support.
However, I'm now recalling that part of what brought me to the "not supported" conclusion is that the enabled/disabled states of the relevant constraints here are (as far as I can tell) effectively serving as an IK/FK switch. And typically IK/FK switching is intended to be animatable.
As long as the intention with this rig is to only ever be in one state or the other for an entire shot, and never animate between the two, then that should be fine. But it's not clear to me that we can support this kind of setup having its IK/FK switches animated, within Blender's current constraint system.
@3di
Just a note from my own experience as a rigger and animator: avoiding dependency loops isn't actually the primary reason for the duplicate-arm setup, at least not in the rigs that I've built. The main reasons are:
The duplicate setup does additionally have the benefit of avoiding dependency cycles, of course. But I would use it in my rigs even if dependency cycles weren't an issue.
Yes, treating the zero influence and enabled/disabled state as 'not there' would need to happen on a frame by frame basis during animation for it to be useful. There are a few unpredictable annoyances during the switch and the keyframed position not matching what's shown in the viewport, but I find there are ways to easily overcome those without the added complexity of separate limbs for FK/IK. I'm just on the verge of releasing a course which touches on those problems, 3 years in the making 🥂 Holiday needed! :)
I've created a minimal repro file:
minimal_repro.blend
I think even more bones can be deleted, and it still exhibits the issue, but it becomes subtle/occasional and harder to see. This is the fewest bones I could get it down to that still obviously exhibits the issue right off the bat.
Lowered priority as discussed in yesterday's Animation & Rigging meeting notes.
Thanks for trying 👍