Pose Bone Selection, Slow Since 2.8 #91253

Closed
opened 2021-09-08 11:06:35 +02:00 by Ovionis · 23 comments

System Information
Operating system: Windows-10-10.0.19041-SP0 64 Bits
Graphics card: NVIDIA GeForce GTX 1650 SUPER/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 471.68

Blender Version
Broken: version: 3.0.0 Alpha, branch: master, commit date: 2021-08-23 15:09, hash: 7d17f2addf
Worked: e92f235283

Short description of error
When you click to select bones in pose mode (without box select), there is a delay in Blender updating.
It's unnoticeable with around 40 bones but if you have like 250+ bones, it because more and more laggy.
It speeds up if you hide bones or use another display type other than envelope.
However even if you set the display type to Wire and used meshes on all the bones, it would still be faster than Octahedral

bones.blend
2021-09-08 03-53-25.mp4
In this video, first I show clicking bones in 2.78 (I don't have 2.79 but I'm sure it works there as well),
then I show clicking Octahedral bones in 3.0/master, with it freezing a couple of times.
Next I show clicking Wire bones, and finally Wire bones with a mesh (based on Octahedral) as their custom shape

I didn't record it but 2.7 is only slow when showing all 3 objects (3x bone count), whereas 3.0 only gets that additional lag when they're all in pose mode (which affects the Wire rigs).

**System Information** Operating system: Windows-10-10.0.19041-SP0 64 Bits Graphics card: NVIDIA GeForce GTX 1650 SUPER/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 471.68 **Blender Version** Broken: version: 3.0.0 Alpha, branch: master, commit date: 2021-08-23 15:09, hash: `7d17f2addf` Worked: e92f235283 **Short description of error** When you click to select bones in pose mode (without box select), there is a delay in Blender updating. It's unnoticeable with around 40 bones but if you have like 250+ bones, it because more and more laggy. It speeds up if you hide bones or use another display type other than envelope. However even if you set the display type to Wire and used meshes on all the bones, it would still be faster than Octahedral [bones.blend](https://archive.blender.org/developer/F10385085/bones.blend) [2021-09-08 03-53-25.mp4](https://archive.blender.org/developer/F10385092/2021-09-08_03-53-25.mp4) In this video, first I show clicking bones in 2.78 (I don't have 2.79 but I'm sure it works there as well), then I show clicking Octahedral bones in 3.0/master, with it freezing a couple of times. Next I show clicking Wire bones, and finally Wire bones with a mesh (based on Octahedral) as their custom shape I didn't record it but 2.7 is only slow when showing all 3 objects (3x bone count), whereas 3.0 only gets that additional lag when they're all in pose mode (which affects the Wire rigs).
Author

Added subscriber: @Phigon

Added subscriber: @Phigon
Author

As a test before I opened 2.7, I made an addon operator to simulate the bone clicking, using the box select operator, and not only does it get back the near-instant click of 2.7, it performs fast when having all 3 rigs in pose mode.

My point being that box/circle/lasso select are fast and bpy.ops.view3d.select / VIEW3D_OT_select is just needlessly slower, and apparently has been since my earliest version of 2.8 (9a85592dde), or at least it's been broken in every version that I've rolled back to for this test.

As a test before I opened 2.7, I made an addon operator to simulate the bone clicking, using the box select operator, and not only does it get back the near-instant click of 2.7, it performs fast when having all 3 rigs in pose mode. My point being that box/circle/lasso select are fast and `bpy.ops.view3d.select` / `VIEW3D_OT_select` is just needlessly slower, and apparently has been since my earliest version of 2.8 (9a85592dde), or at least it's been broken in every version that I've rolled back to for this test.
Ovionis changed title from Pose Bone Selection on Octahedral, Slow Since 2.8 to Pose Bone Selection, Slow Since 2.8 2021-09-08 11:25:07 +02:00
Member

Added subscriber: @Jeroen-Bakker

Added subscriber: @Jeroen-Bakker

Added subscriber: @Jibril-Omukama-Isimbabi

Added subscriber: @Jibril-Omukama-Isimbabi

I have the same problem. Since 2.8 Blender has been becoming more and more unusable. I have the same problem with bone selection, blender progressively slows as you I use it. All of this is not dependent of scene complexity as it happens on simple scenes too

I have the same problem. Since 2.8 Blender has been becoming more and more unusable. I have the same problem with bone selection, blender progressively slows as you I use it. All of this is not dependent of scene complexity as it happens on simple scenes too
Author

Whenever I have a problem with Blender's operators/ui, I report if it seems unintentional and make a fix/alternative via python until someone maybe decides to fix/change it internally.
If you want, I can give you the code from my addon to do the fast selection. For anything else, I can't help there (unless I made an addon for it)

Whenever I have a problem with Blender's operators/ui, I report if it seems unintentional and make a fix/alternative via python until someone maybe decides to fix/change it internally. If you want, I can give you the code from my addon to do the fast selection. For anything else, I can't help there *(unless I made an addon for it)*

In #91253#1278395, @Phigon wrote:
Whenever I have a problem with Blender's operators/ui, I report if it seems unintentional and make a fix/alternative via python until someone maybe decides to fix/change it internally.
If you want, I can give you the code from my addon to do the fast selection. For anything else, I can't help there (unless I made an addon for it)

Yes please. I'm willing to try anything. Since it works for you, it'll probably work for me. This issue causes me so much time.

> In #91253#1278395, @Phigon wrote: > Whenever I have a problem with Blender's operators/ui, I report if it seems unintentional and make a fix/alternative via python until someone maybe decides to fix/change it internally. > If you want, I can give you the code from my addon to do the fast selection. For anything else, I can't help there *(unless I made an addon for it)* Yes please. I'm willing to try anything. Since it works for you, it'll probably work for me. This issue causes me so much time.

Added subscribers: @ideasman42, @mano-wii

Added subscribers: @ideasman42, @mano-wii

Changed status from 'Needs Triage' to: 'Needs Developer To Reproduce'

Changed status from 'Needs Triage' to: 'Needs Developer To Reproduce'

This seems to be related to the "OpenGL Depth Picking" option (On by default from 2.80 onwards).
Comparing 2.79 with 3.2: selection in 2.79 with with "OpenGL Depth Picking" is equivalent to the 3.2 with this option disabled.
From fastest to slowest we have this order:

  • 2.79 without OpenGL Depth Picking
  • 2.79 with OpenGL Depth Picking and 2.80 without OpenGL Depth Picking
  • 2.80 with OpenGL Depth Picking

This problem reminds me of this other report -> #95130 (Annoyingly slow selecting (>2 seconds), but everything else is buttery smooth and responsive)
There is also a ToDo related to this issue -> #68989 ( Selection future-proof design)

I imagine that all these reports should be merged in the ToDo (#68989).
@ideasman42 if I'm not mistaken you worked on the "OpenGL Depth Picking" option, is this regression a Known Issue?

This seems to be related to the "OpenGL Depth Picking" option (`On` by default from 2.80 onwards). Comparing 2.79 with 3.2: selection in 2.79 with with "OpenGL Depth Picking" is equivalent to the 3.2 with this option disabled. From fastest to slowest we have this order: - 2.79 without OpenGL Depth Picking - 2.79 with OpenGL Depth Picking and 2.80 without OpenGL Depth Picking - 2.80 with OpenGL Depth Picking This problem reminds me of this other report -> #95130 (Annoyingly slow selecting (>2 seconds), but everything else is buttery smooth and responsive) There is also a `ToDo` related to this issue -> #68989 ( Selection future-proof design) I imagine that all these reports should be merged in the `ToDo` (#68989). @ideasman42 if I'm not mistaken you worked on the "OpenGL Depth Picking" option, is this regression a Known Issue?
Author

In #91253#1299244, @Jibril-Omukama-Isimbabi wrote:

In #91253#1278395, @Phigon wrote:
Whenever I have a problem with Blender's operators/ui, I report if it seems unintentional and make a fix/alternative via python until someone maybe decides to fix/change it internally.
If you want, I can give you the code from my addon to do the fast selection. For anything else, I can't help there (unless I made an addon for it)

Yes please. I'm willing to try anything. Since it works for you, it'll probably work for me. This issue causes me so much time.

pose_select_fast.zip
I was thinking I could just cut and paste batches of code to make an addon but I didn't feel like backtracking through my code to strip only the needed material, so I just snipped the pose code as an addon and included my module with it.
Install instructions included.

> In #91253#1299244, @Jibril-Omukama-Isimbabi wrote: >> In #91253#1278395, @Phigon wrote: >> Whenever I have a problem with Blender's operators/ui, I report if it seems unintentional and make a fix/alternative via python until someone maybe decides to fix/change it internally. >> If you want, I can give you the code from my addon to do the fast selection. For anything else, I can't help there *(unless I made an addon for it)* > > Yes please. I'm willing to try anything. Since it works for you, it'll probably work for me. This issue causes me so much time. [pose_select_fast.zip](https://archive.blender.org/developer/F12839869/pose_select_fast.zip) I was thinking I could just cut and paste batches of code to make an addon but I didn't feel like backtracking through my code to strip only the needed material, so I just snipped the pose code as an addon and included my module with it. Install instructions included.

In #91253#1299467, @Phigon wrote:

In #91253#1299244, @Jibril-Omukama-Isimbabi wrote:

In #91253#1278395, @Phigon wrote:
Whenever I have a problem with Blender's operators/ui, I report if it seems unintentional and make a fix/alternative via python until someone maybe decides to fix/change it internally.
If you want, I can give you the code from my addon to do the fast selection. For anything else, I can't help there (unless I made an addon for it)

Yes please. I'm willing to try anything. Since it works for you, it'll probably work for me. This issue causes me so much time.

pose_select_fast.zip
I was thinking I could just cut and paste batches of code to make an addon but I didn't feel like backtracking through my code to strip only the needed material, so I just snipped the pose code as an addon and included my module with it.
Install instructions included.

Thank you. I'll try it out

> In #91253#1299467, @Phigon wrote: >> In #91253#1299244, @Jibril-Omukama-Isimbabi wrote: >>> In #91253#1278395, @Phigon wrote: >>> Whenever I have a problem with Blender's operators/ui, I report if it seems unintentional and make a fix/alternative via python until someone maybe decides to fix/change it internally. >>> If you want, I can give you the code from my addon to do the fast selection. For anything else, I can't help there *(unless I made an addon for it)* >> >> Yes please. I'm willing to try anything. Since it works for you, it'll probably work for me. This issue causes me so much time. > > [pose_select_fast.zip](https://archive.blender.org/developer/F12839869/pose_select_fast.zip) > I was thinking I could just cut and paste batches of code to make an addon but I didn't feel like backtracking through my code to strip only the needed material, so I just snipped the pose code as an addon and included my module with it. > Install instructions included. Thank you. I'll try it out

@Phigon can you confirm that disabling "OpenGL Depth Picking" resolves the issue? If so, how much is the performance improved?

@Phigon can you confirm that disabling "OpenGL Depth Picking" resolves the issue? If so, how much is the performance improved?
Author

Disabling it, I can do the Shift+Click rainbow selecting, as attempted in the video.

My eyes aren't fast enough to tell whether or not my box-select addon-version is faster.
I don't know if I'm seeing a lag or I'm imagining it. The only verifiable metric I can say is that it's not slow/freezing on the 900 Octahedral bones I'm selecting.

Disabling it, I can do the Shift+Click rainbow selecting, as attempted in the video. My eyes aren't fast enough to tell whether or not my box-select addon-version is faster. I don't know if I'm seeing a lag or I'm imagining it. The only verifiable metric I can say is that it's not slow/freezing on the 900 Octahedral bones I'm selecting.

@ideasman42 Disabling OpenGL Depth Picking doesn't work for me at all. I've cleared prefs, restarted projects, reinstalled. I even reinstalled my OS

@ideasman42 Disabling OpenGL Depth Picking doesn't work for me at all. I've cleared prefs, restarted projects, reinstalled. I even reinstalled my OS

@Jibril-Omukama-Isimbabi do you mean it isn't faster? or selection doesn't work at all.
If picking doesn't work at all, do other selection methods also fail? (box selection etc).

@Phigon to be clear, when "OpenGL Depth Picking" is disabled, selection is working fast and correctly for you (as you would expect).


Here is a patch to address this issue but would still like to understand the problems you're running into: D13990.

@Jibril-Omukama-Isimbabi do you mean it isn't faster? or selection doesn't work at all. If picking doesn't work at all, do other selection methods also fail? (box selection etc). @Phigon to be clear, when "OpenGL Depth Picking" is disabled, selection is working fast and correctly for you (as you would expect). ---- Here is a patch to address this issue but would still like to understand the problems you're running into: [D13990](https://archive.blender.org/developer/D13990).

In #91253#1299460, @mano-wii wrote:
This problem reminds me of this other report -> #95130 (Annoyingly slow selecting (>2 seconds), but everything else is buttery smooth and responsive)
There is also a ToDo related to this issue -> #68989 ( Selection future-proof design)

I imagine that all these reports should be merged in the ToDo (#68989).
@ideasman42 if I'm not mistaken you worked on the "OpenGL Depth Picking" option, is this regression a Known Issue?

@mano-wii It's known that reading the depth buffer doesn't have great performance, OTOH, there have been changes/refactoring since 2.8 which may have made the situation worse.

I've been looking into this area recently and there are a few ways to improve performance here.

> In #91253#1299460, @mano-wii wrote: > This problem reminds me of this other report -> #95130 (Annoyingly slow selecting (>2 seconds), but everything else is buttery smooth and responsive) > There is also a `ToDo` related to this issue -> #68989 ( Selection future-proof design) > > I imagine that all these reports should be merged in the `ToDo` (#68989). > @ideasman42 if I'm not mistaken you worked on the "OpenGL Depth Picking" option, is this regression a Known Issue? @mano-wii It's known that reading the depth buffer doesn't have great performance, OTOH, there have been changes/refactoring since 2.8 which may have made the situation worse. I've been looking into this area recently and there are a few ways to improve performance here.
Author

In #91253#1299990, @ideasman42 wrote:
@Jibril-Omukama-Isimbabi do you mean it isn't faster? or selection doesn't work at all.
If picking doesn't work at all, do other selection methods also fail? (box selection etc).

@Phigon to be clear, when "OpenGL Depth Picking" is disabled, selection is working fast and correctly for you (as you would expect).


Here is a patch to address this issue but would still like to understand the problems you're running into: D13990.

Okay, I just retested this. My box selection version IS faster. This time, I had a youtube video playing, when trying without OpenGL.

With OpenGL, blender will visibly pause and possibly freeze [Not Responding].
Without OpenGL, while selecting bones fast, blender would pause (not show any visual updates) before updating the selection of like 3-5 bones. It's definitely usable enough to forget it's a problem but it's still a problem.
Whereas using box-select is essentially instant, with or without video playback. (my addon executes box-select then deselects bones, to mimic the click-select)

> In #91253#1299990, @ideasman42 wrote: > @Jibril-Omukama-Isimbabi do you mean it isn't faster? or selection doesn't work at all. > If picking doesn't work at all, do other selection methods also fail? (box selection etc). > > @Phigon to be clear, when "OpenGL Depth Picking" is disabled, selection is working fast and correctly for you (as you would expect). > > ---- > > Here is a patch to address this issue but would still like to understand the problems you're running into: [D13990](https://archive.blender.org/developer/D13990). Okay, I just retested this. My box selection version IS faster. This time, I had a youtube video playing, when trying without OpenGL. With OpenGL, blender will visibly pause and possibly freeze [Not Responding]. Without OpenGL, while selecting bones fast, blender would pause *(not show any visual updates)* before updating the selection of like 3-5 bones. It's definitely usable enough to forget it's a problem but it's still a problem. Whereas using box-select is essentially instant, with or without video playback. *(my addon executes box-select then deselects bones, to mimic the click-select)*

This issue was referenced by 3267c91b4d

This issue was referenced by 3267c91b4d5caab7da8aef071a446dd2e86f86a9

Changed status from 'Needs Developer To Reproduce' to: 'Resolved'

Changed status from 'Needs Developer To Reproduce' to: 'Resolved'
Campbell Barton self-assigned this 2022-02-08 12:19:45 +01:00
Author

I was going to report that it was still slow, even if I disable OpenGL, so it should be at least put on a todo list instead of closed but then I saw that 3.1 ( d1202bd641 ) does not have this commit. Only 3.2.

I was going to report that it was still slow, even if I disable OpenGL, so it should be at least put on a todo list instead of closed but then I saw that 3.1 ( `d1202bd641` ) does not have this commit. Only 3.2.

@Phigon can you confirm this is fixed in daily builds?

@Phigon can you confirm this is fixed in daily builds?
Author

Definitely.
I took it from 320 bones to 2560. It was fast. It was taking too long to duplicate the bones in edit mode so I duplicated the object 3x for 7680. Fast.
In 3.1 it freezes with OpenGL and stutters without. It's even slow selecting the objects.

Just to push it, I duplicated it for 30720 bones, and that's when it starts to lag but that's mostly because of the bones overlapping (and it being harder to find an angle where they aren't, to test it).

Definitely. I took it from 320 bones to 2560. It was fast. It was taking too long to duplicate the bones in edit mode so I duplicated the object 3x for 7680. Fast. In 3.1 it freezes with OpenGL and stutters without. It's even slow selecting the objects. Just to push it, I duplicated it for 30720 bones, and that's when it starts to lag but that's mostly because of the bones overlapping *(and it being harder to find an angle where they aren't, to test it)*.
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#91253
No description provided.