Dynamic Overrides Use Case - Giant object-based 'rig' with a few key controlers. #96092

Open
opened 2022-03-01 05:02:49 +01:00 by Ad Morris · 31 comments

Dynamic Overrides are a good candidate to support extreme relationships nightmare involving thousands of objects, like the one in Machine.zip.

Library Overrides cannot realistically handle such a massive amount of IDs/relationships, but Dynamic Overrides could only override the relevant properties of the few key controller objects while keeping everything fully linked, in a similar way to what proxies used to do.


Original report:

System Information
Operating system: Windows-10-10.0.19041-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 3060/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 511.65

Blender Version
Broken: version: 3.0.1, branch: master, commit date: 2022-01-25 17:19, hash: dc2d180181
Worked: 2.9

Short description of error
It's now impossible to use a single control object/bone from a linked rig without creating an override for the entire hierarchy or parent collection. This is completely un-workable for professionals working with rigged assets made up of many hundreds or thousands of parts.

Exact steps for others to reproduce the error
I can't share my scene file as it contains sensitive intellectual property belonging to a client. The issue will be evident for any remotely complex rig however.

In the project I'm currently working on, I have a top level collection of bone controllers that have no parents. Previously I could create a proxy for each controller and use those to animate the linked asset whilst retaining the full functionality of the rig. Now that create proxy has been removed, I can't just override a single controller. Instead I'm forced to unnecessarily create overrides for several thousand objects! An operation which for this rig takes in excess of 30 minutes to run (if at all)! Then after saving the file (once the operation is complete), Blender outright crashes on each attempt to re-open.

So although the new override system works in theory. There's no parity between the two systems yet in terms of the ability to override a single object. And previous functionality has been lost without a viable workaround available. Which in my estimation constitutes a bug.

With this in mind, would you please kindly add the create proxy option back again, until the overrides system is fully functional? I'll personally now have to roll back to 2.9 until this issue is resolved.

Thanks

Dynamic Overrides are a good candidate to support extreme relationships nightmare involving thousands of objects, like the one in [Machine.zip](https://archive.blender.org/developer/F12894482/Machine.zip). Library Overrides cannot realistically handle such a massive amount of IDs/relationships, but Dynamic Overrides could only override the relevant properties of the few key controller objects while keeping everything fully linked, in a similar way to what proxies used to do. ------------------------------------------ Original report: **System Information** Operating system: Windows-10-10.0.19041-SP0 64 Bits Graphics card: NVIDIA GeForce RTX 3060/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 511.65 **Blender Version** Broken: version: 3.0.1, branch: master, commit date: 2022-01-25 17:19, hash: `dc2d180181` Worked: 2.9 **Short description of error** It's now impossible to use a single control object/bone from a linked rig without creating an override for the entire hierarchy or parent collection. This is completely un-workable for professionals working with rigged assets made up of many hundreds or thousands of parts. **Exact steps for others to reproduce the error** I can't share my scene file as it contains sensitive intellectual property belonging to a client. The issue will be evident for any remotely complex rig however. In the project I'm currently working on, I have a top level collection of bone controllers that have no parents. Previously I could create a proxy for each controller and use those to animate the linked asset whilst retaining the full functionality of the rig. Now that create proxy has been removed, I can't just override a single controller. Instead I'm forced to unnecessarily create overrides for several thousand objects! An operation which for this rig takes in excess of 30 minutes to run (if at all)! Then after saving the file (once the operation is complete), Blender outright crashes on each attempt to re-open. So although the new override system works in theory. There's no parity between the two systems yet in terms of the ability to override a single object. And previous functionality has been lost without a viable workaround available. Which in my estimation constitutes a bug. With this in mind, would you please kindly add the create proxy option back again, until the overrides system is fully functional? I'll personally now have to roll back to 2.9 until this issue is resolved. Thanks
Author

Added subscriber: @AdamMorris

Added subscriber: @AdamMorris
Member

Added subscriber: @Blendify

Added subscriber: @Blendify
Member

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

Changed status from 'Needs Triage' to: 'Resolved'
Aaron Carlisle self-assigned this 2022-03-01 05:17:03 +01:00
Member

Proxies have been removed in 3.0 in favor of overrides,

See https://wiki.blender.org/wiki/Reference/Release_Notes/3.0/Core#Proxy_Removal

Proxies have been removed in 3.0 in favor of overrides, See https://wiki.blender.org/wiki/Reference/Release_Notes/3.0/Core#Proxy_Removal
Member

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

Changed status from 'Resolved' to: 'Needs Triage'
Member

Apologizes I read this at face value and did not see

Then after saving the file (once the operation is complete), Blender outright crashes on each attempt to re-open.

Can you test the upcoming 3.1 release which should bring some performance improvements and we will see if it fixes the crash.

Apologizes I read this at face value and did not see > Then after saving the file (once the operation is complete), Blender outright crashes on each attempt to re-open. Can you test the upcoming 3.1 release which should bring some performance improvements and we will see if it fixes the crash.
Member

Added subscriber: @mont29

Added subscriber: @mont29
Member

Also CCing @mont29 to comment on the parity issue.

Also CCing @mont29 to comment on the parity issue.
Aaron Carlisle removed their assignment 2022-03-01 05:25:17 +01:00

Changed status from 'Needs Triage' to: 'Needs User Info'

Changed status from 'Needs Triage' to: 'Needs User Info'

Added subscriber: @Mets

Added subscriber: @Mets

By default creating overrides creates an override for all objects, however it is possible to override IDs individually, user (or py script) is then responsible to handle relationships between them though...

I think your way of rigging though does not match the 'canonical' way of doing so in Blender - where typically controllers are bones part of the armature, using 'shape' objects to get some form of 'UI' for the animators. But think a rigger might know better here, maybe @Mets can shine in?

In any case, I would indeed recommend trying out at least upcoming 3.1, and maybe even current alpha 3.2, there has been huge improvements in speed (and reliability) regarding overrides in those.

Also, if you cannot provide us with a reproducible case, we cannot investigate that report, so it will have to be closed...

Regarding proxies, they won't be brought back, they had a giant amount of issues creeping all over the codebase, and indeed they are not on feature-parity with overrides - the latter allow much, much more than what was possible with proxies. But indeed liboverrides are not a drop-in replacement of proxies, they may imply some new limitations and some workflows may need to be adapted for them.

By default creating overrides creates an override for all objects, however it is possible to override IDs individually, user (or py script) is then responsible to handle relationships between them though... I think your way of rigging though does not match the 'canonical' way of doing so in Blender - where typically controllers are bones part of the armature, using 'shape' objects to get some form of 'UI' for the animators. But think a rigger might know better here, maybe @Mets can shine in? In any case, I would indeed recommend trying out at least upcoming 3.1, and maybe even current alpha 3.2, there has been huge improvements in speed (and reliability) regarding overrides in those. Also, if you cannot provide us with a reproducible case, we cannot investigate that report, so it will have to be closed... Regarding proxies, they won't be brought back, they had a giant amount of issues creeping all over the codebase, and indeed they are not on feature-parity with overrides - the latter allow much, much more than what was possible with proxies. But indeed liboverrides are not a drop-in replacement of proxies, they may imply some new limitations and some workflows may need to be adapted for them.
Author

OK Allow me to try out the 3.1 and 3.2 builds and get back to you.

As far as following the canonical/conventional method for rigging in Blender. That is the method I use. The controller bones are indeed bones, with custom shapes assigned to them to give the animator a UI. All objects in the rig (which is a mechanical rig i.e. no skins or weights) are constrained to those controller bones using child of constraints etc. However I think in this context that might be a moot point. Especially given that there are no direct hierarchies between object and controller i.e. constraints are used as opposed to hierarchical parenting. Which again makes the need to override the entire linked collection seem very inefficient. With respect however, I don't understand how the system is implemented on the back end.

I will do some test with the new builds and report back.

OK Allow me to try out the 3.1 and 3.2 builds and get back to you. As far as following the canonical/conventional method for rigging in Blender. That is the method I use. The controller bones are indeed bones, with custom shapes assigned to them to give the animator a UI. All objects in the rig (which is a mechanical rig i.e. no skins or weights) are constrained to those controller bones using child of constraints etc. However I think in this context that might be a moot point. Especially given that there are no direct hierarchies between object and controller i.e. constraints are used as opposed to hierarchical parenting. Which again makes the need to override the entire linked collection seem very inefficient. With respect however, I don't understand how the system is implemented on the back end. I will do some test with the new builds and report back.
Author

Right so attempting this with Blender 3.1, there is now an option for Make Library Override Single. This is available exclusively for bones and not empties, so using bone controllers as mentioned above is the assumed preferred workflow.

Running Make Library Override Single on one of the controllers from the Outliner's context menu has no visible effect. Shift + Clicking the object data block (to create a local override) in the object properties panel unexpectedly creates a duplicate of it. As opposed to the override behaviour happening in-place. This duplicate can be then transformed (similar to the result of running the create proxy operation). However, the rig is not effected by the transforms of the new duplicate controller at all. Presumably as the constraints are still pointing at the original controller. Which remains locked and in the position read in from the linked file.

Attempting to run the Make Library Override Hierarchy operation on the full collection unfortunately causes Blender to hang once again. Currently for 15 minutes and counting at the time of writing this.

I will run the same test with 3.2 and follow up shortly.

Right so attempting this with **Blender 3.1**, there is now an option for Make Library Override Single. This is available exclusively for bones and not empties, so using bone controllers as mentioned above is the assumed preferred workflow. Running Make Library Override Single on one of the controllers from the Outliner's context menu has no visible effect. Shift + Clicking the object data block (to create a local override) in the object properties panel unexpectedly creates a duplicate of it. As opposed to the override behaviour happening in-place. This duplicate can be then transformed (similar to the result of running the create proxy operation). However, the rig is not effected by the transforms of the new duplicate controller at all. Presumably as the constraints are still pointing at the original controller. Which remains locked and in the position read in from the linked file. Attempting to run the Make Library Override Hierarchy operation on the full collection unfortunately causes Blender to hang once again. Currently for 15 minutes and counting at the time of writing this. I will run the same test with 3.2 and follow up shortly.
Author

After repeating the same process, Blender 3.2 had exactly the same behaviour as above.

Both versions eventually completed the Make Library Override Hierarchy operation, after leaving them running for nearly an hour. Unlike with 3.0.1 though, the result of this was a complete duplicate of the entire collection with overrides applied (again not an override "in-place") for both 3.1 and 3.2.

After saving new versions from each respective build. Opening the 3.1 file again caused Blender to hang for 2 minutes 53 seconds before eventually loading it. After which the override collection and controllers were fully functional. Opening the 3.2 file again caused Blender to hang for 2 minutes 7 seconds before loading. Again with the override collection and controllers being fully functional thereafter.

With 2.93 on the other hand, with proxies created for each controller. The saved file loads in 7 seconds!

Based on the above. Surely this needs more serious consideration and work, before taking away the proxy system from users?

After repeating the same process, **Blender 3.2** had exactly the same behaviour as above. Both versions eventually completed the Make Library Override Hierarchy operation, after leaving them running for nearly an hour. Unlike with 3.0.1 though, the result of this was a complete duplicate of the entire collection with overrides applied (again not an override "in-place") for both 3.1 and 3.2. After saving new versions from each respective build. Opening the 3.1 file again caused Blender to hang for **2 minutes 53 seconds** before eventually loading it. After which the override collection and controllers were fully functional. Opening the 3.2 file again caused Blender to hang for **2 minutes 7 seconds** before loading. Again with the override collection and controllers being fully functional thereafter. With 2.93 on the other hand, with proxies created for each controller. The saved file loads in **7 seconds!** Based on the above. Surely this needs more serious consideration and work, before taking away the proxy system from users?
Member

Is there a way that you could create a blend-file that shows the issue by redacting any proprietary assets for example by replacing them with other objects?

This way it can be used by developers to profile what it taking so much time and cant point to where developers might want to focus time to speed up the process.

Is there a way that you could create a blend-file that shows the issue by redacting any proprietary assets for example by replacing them with other objects? This way it can be used by developers to profile what it taking so much time and cant point to where developers might want to focus time to speed up the process.
Author

OK could you please send me a private email to adam@renderkick.co.uk so that I can send you a download link?

OK could you please send me a private email to adam@renderkick.co.uk so that I can send you a download link?

@AdamMorris Blender being an open project, we keep communication about it and its issues also open and public, please attach here such a file, indeed you can taint it as much as needed to remove any sensitive information. Or even generate a dummy example for this purpose.

From your comments though, I suspect override hierarchy ends up dealing with many thousands of data-blocks in a single override hierarchy, for some reasons... If that is the case, it might be worth reconsidering your rigging pipeline, or we may have to tweak override creation process to deal better with those specific cases... But quite impossible to go further without a good example file to investigate.

@AdamMorris Blender being an open project, we keep communication about it and its issues also open and public, please attach here such a file, indeed you can taint it as much as needed to remove any sensitive information. Or even generate a dummy example for this purpose. From your comments though, I suspect override hierarchy ends up dealing with many thousands of data-blocks in a single override hierarchy, for some reasons... If that is the case, it might be worth reconsidering your rigging pipeline, or we may have to tweak override creation process to deal better with those specific cases... But quite impossible to go further without a good example file to investigate.
Author

OK understood. Here's a version of the file with zero verts for all objects. It has the same object tree as the original so should hopefully enable you to run some tests.Machine.zip

OK understood. Here's a version of the file with zero verts for all objects. It has the same object tree as the original so should hopefully enable you to run some tests.[Machine.zip](https://archive.blender.org/developer/F12894482/Machine.zip)

OK, so I am not an expert in rigging (@Mets please feel free to share your expertise on this), but am fairly sure this Machine collection is not the expected way of rigging something in Blender. From what I can see, you are essentially not using armatures at all, and are instead using parenting (and some constraints) to 'rig' almost 14 000 objects together! Most of those objects should be replaced by actual bones from a single armature.

Some stats:

  • 13847 Objects (len(D.collections['Machine'].all_objects)).
    • 6 Armatures (len([ob for ob in D.collections['Machine'].all_objects if ob.type == 'ARMATURE']))
      • 6 Bones in total (sum([len(ob.pose.bones) for ob in D.collections['Machine'].all_objects if ob.type == 'ARMATURE'])).
    • 6774 Empties (len([ob for ob in D.collections['Machine'].all_objects if ob.type == 'EMPTY'])).
    • 11049 Parented Objects (len([ob for ob in D.collections['Machine'].all_objects if ob.parent != None])).
    • 577 Constraints (sum([len(ob.constraints) for ob in D.collections['Machine'].all_objects])).
    • 38656 Relationships from all those objects to other data-blocks (sum(len(v) for v in D.user_map(subset=D.collections['Machine'].all_objects).values())).

In any case, this situation is definitively not supported by library overrides, this is simply impossible. Most likely, such situation would work fairly well with future dynamic overrides, although there would likely be some other limitations to take into account.

OK, so I am not an expert in rigging (@Mets please feel free to share your expertise on this), but am fairly sure this `Machine` collection is not the expected way of rigging something in Blender. From what I can see, you are essentially not using armatures at all, and are instead using parenting (and some constraints) to 'rig' almost 14 000 objects together! Most of those objects should be replaced by actual bones from a single armature. Some stats: * 13847 Objects (`len(D.collections['Machine'].all_objects)`). * 6 Armatures (`len([ob for ob in D.collections['Machine'].all_objects if ob.type == 'ARMATURE'])`) * 6 Bones in total (`sum([len(ob.pose.bones) for ob in D.collections['Machine'].all_objects if ob.type == 'ARMATURE'])`). * 6774 Empties (`len([ob for ob in D.collections['Machine'].all_objects if ob.type == 'EMPTY'])`). * 11049 Parented Objects (`len([ob for ob in D.collections['Machine'].all_objects if ob.parent != None])`). * 577 Constraints (`sum([len(ob.constraints) for ob in D.collections['Machine'].all_objects])`). * 38656 Relationships from all those objects to other data-blocks (`sum(len(v) for v in D.user_map(subset=D.collections['Machine'].all_objects).values())`). In any case, this situation is definitively not supported by library overrides, this is simply impossible. Most likely, such situation would work fairly well with future dynamic overrides, although there would likely be some other limitations to take into account.

I will move it under the new #96144 (Dynamic Overrides) task, as some interesting usecase for this project.

I will move it under the new #96144 (Dynamic Overrides) task, as some interesting usecase for this project.
Bastien Montagne changed title from Missing Create Proxy Option (definitely a bug) to Dynamic Overrides Use Case - Giant object-based 'rig' with a few key controlers. 2022-03-03 10:13:23 +01:00

Changed status from 'Needs User Info' to: 'Confirmed'

Changed status from 'Needs User Info' to: 'Confirmed'
Author

Would it not be more reasonable to leave the proxy system available as a fallback (which handles this so called extreme use case without issue) until said dynamic override system is actually complete then?

I believe you will you find a great many users working with CAD data are regularly required to work with object heirarchies of this nature and it isn't as much of a corner case as you think. Regardless of the character centric workflows you're likely more used encountering in the work of the Blender Studio.

Would it not be more reasonable to leave the proxy system available as a fallback (which handles this so called extreme use case without issue) until said dynamic override system is actually complete then? I believe you will you find a great many users working with CAD data are regularly required to work with object heirarchies of this nature and it isn't as much of a corner case as you think. Regardless of the character centric workflows you're likely more used encountering in the work of the Blender Studio.

Added subscriber: @Jeroen-Bakker

Added subscriber: @Jeroen-Bakker

I ran some profiling this morning, unfortunately lost the results before making a screen cap, but 90% of the time is spent in pre/post processing of the last bit of remapping code not moved to new multi-processing code from @Jeroen-Bakker (namely, calls to BKE_libblock_relink_ex). So I'm going to address this, hopefully it will bring performances back into somewhat acceptable area (a few minutes and not tens of minutes). But again, such case, based on relationships between thousands of Objects, is not really supported by Blender, and we cannot guarantee anything when it comes to it.

I ran some profiling this morning, unfortunately lost the results before making a screen cap, but 90% of the time is spent in pre/post processing of the last bit of remapping code not moved to new multi-processing code from @Jeroen-Bakker (namely, calls to `BKE_libblock_relink_ex`). So I'm going to address this, hopefully it will bring performances back into somewhat acceptable area (a few minutes and not tens of minutes). But again, such case, based on relationships between thousands of Objects, is not really supported by Blender, and we cannot guarantee anything when it comes to it.

FYI, D14240: Add 'multiple' variant of ID relink function. brings liboverride creation on Machine collection linked from this file from almost 30 minutes to about 45 seconds on my machine.

FYI, [D14240: Add 'multiple' variant of ID relink function.](https://archive.blender.org/developer/D14240) brings liboverride creation on `Machine` collection linked from this file from almost 30 minutes to about 45 seconds on my machine.
Author

That sounds much more promising :)

That sounds much more promising :)
Contributor

Added subscriber: @Raimund58

Added subscriber: @Raimund58

This issue was referenced by 7e06fc11b7

This issue was referenced by 7e06fc11b7cbf532bd8017b270f53e3a11f21523
Member

@mont29 do you now consider this resolved?

@mont29 do you now consider this resolved?

@Blendify I keep this around more as an extreme corner case reference for general optimization investigations... this is not really a bug, and in that sense there is no 'solving' it.

@Blendify I keep this around more as an extreme corner case reference for general optimization investigations... this is not really a bug, and in that sense there is no 'solving' it.

Added subscriber: @satishgoda1

Added subscriber: @satishgoda1
Philipp Oeser removed the
Interest
Core
label 2023-02-09 14:42:51 +01:00
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
6 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#96092
No description provided.