Selectability in Solid Xray Mode #56915

Closed
opened 2018-09-25 12:18:16 +02:00 by Julien Kaspar · 21 comments
Member

Blender Version
Broken: a933293f11

Short description of error
When enabling xray in solid mode, it is currently way harder or even impossible at times to select objects that are obscured. When in wireframe mode instead with xray enabled it's way easier and always works.

Stack a few different objects behind each other and try selecting them on different mouse positions.

**Blender Version** Broken: a933293f111 **Short description of error** When enabling xray in solid mode, it is currently way harder or even impossible at times to select objects that are obscured. When in wireframe mode instead with xray enabled it's way easier and always works. Stack a few different objects behind each other and try selecting them on different mouse positions.
Author
Member

Added subscriber: @JulienKaspar

Added subscriber: @JulienKaspar

Added subscriber: @brecht

Added subscriber: @brecht

This is a bit vague, can you give a more specific example? I can't tell if you are referring to a bug, or a design issues in solid X-Ray mode.

With X-Ray in solid mode and for example a small cube in a bigger cube, then indeed you can't select the small cube directly. You have to click a second time to cycle to the next object. The problem is there are 4 faces overlapping the same pixel, and it's not obvious which is the one to prioritize. With wireframes you don't get this overlap.

Maybe we can find a better way to prioritize objects, though the general case seems difficult to do well.

This is a bit vague, can you give a more specific example? I can't tell if you are referring to a bug, or a design issues in solid X-Ray mode. With X-Ray in solid mode and for example a small cube in a bigger cube, then indeed you can't select the small cube directly. You have to click a second time to cycle to the next object. The problem is there are 4 faces overlapping the same pixel, and it's not obvious which is the one to prioritize. With wireframes you don't get this overlap. Maybe we can find a better way to prioritize objects, though the general case seems difficult to do well.
Member

Added subscriber: @JacquesLucke

Added subscriber: @JacquesLucke
Member

I can confirm that there is an issue.
selection.gif

It works at first but when I change the view slightly I can click as often as I want and the selection does not change.
selection.blend

[EDIT] I have not found a way to reproduce it 100% of the time yet unfortunately.. just click on the same pixel a couple of times, rotate the view, and click again multiple times. Repeat that until it does not work anymore. (it takes me at most 10 s)

I can confirm that there is an issue. ![selection.gif](https://archive.blender.org/developer/F4813734/selection.gif) It works at first but when I change the view slightly I can click as often as I want and the selection does not change. [selection.blend](https://archive.blender.org/developer/F4813751/selection.blend) [EDIT] I have not found a way to reproduce it 100% of the time yet unfortunately.. just click on the same pixel a couple of times, rotate the view, and click again multiple times. Repeat that until it does not work anymore. (it takes me at most 10 s)

Ok, I can confirm that it sometimes stops working. Also the order of selection seems unreliable, depends if you look at it from the left or right. I would expect from near to far.

Ok, I can confirm that it sometimes stops working. Also the order of selection seems unreliable, depends if you look at it from the left or right. I would expect from near to far.
Clément Foucault was assigned by Brecht Van Lommel 2018-09-26 19:12:18 +02:00

Added subscriber: @fclem

Added subscriber: @fclem

@fclem, could you take a look at this?

Wireframe seems to have the same issues. I'm not sure if this is a recent regression or something that needs to be finished. But right now it's quite difficult for the animators to reliably select stuff.

@fclem, could you take a look at this? Wireframe seems to have the same issues. I'm not sure if this is a recent regression or something that needs to be finished. But right now it's quite difficult for the animators to reliably select stuff.

Added subscriber: @nokipaike

Added subscriber: @nokipaike

I just noticed this yesterday ... there is no wireframe mode no x-ray but the front selection is not highlighted (mostly), while the part hidden in the background yes

Screenshot (25).png

I just noticed this yesterday ... there is no wireframe mode no x-ray but the front selection is not highlighted (mostly), while the part hidden in the background yes ![Screenshot (25).png](https://archive.blender.org/developer/F4825522/Screenshot__25_.png)

@nokipaike, that's unrelated to this task, let's stay on topic of the specific bug here.

@nokipaike, that's unrelated to this task, let's stay on topic of the specific bug here.

@brecht
sorry I thought it was relevant

@brecht sorry I thought it was relevant

Seems like clicking in some areas is not reliable but other is. Maybe it's the caching mechanism that is buggy. Will take a look at it.

Seems like clicking in some areas is not reliable but other is. Maybe it's the caching mechanism that is buggy. Will take a look at it.

Added subscriber: @ideasman42

Added subscriber: @ideasman42

After some searching it's caused by the "select wire first" that happens in xray. We do picking in 2 passes. One for wires and one for surfaces. If no hits in the first one we do the second.

It's because the non meshes are selectable in this pass too. This include the object center. So if you click near the object center it gets priority and we don't pick any surface.

My first thought was to just exclude the non meshes from the first pass. But that leads to all non meshes not being selectable if in front or behind a wireframe object in xray mode.

Second thought was to always do both pass (wires + surface and non meshes) and merge their hit masks but that means we loose the wire preemption.

I'll have to give it a bit more thinking but any help is welcome @brecht @ideasman42

After some searching it's caused by the "select wire first" that happens in xray. We do picking in 2 passes. One for wires and one for surfaces. If no hits in the first one we do the second. It's because the non meshes are selectable in this pass too. This include the object center. So if you click near the object center it gets priority and we don't pick any surface. My first thought was to just exclude the non meshes from the first pass. But that leads to all non meshes not being selectable if in front or behind a wireframe object in xray mode. Second thought was to always do both pass (wires + surface and non meshes) and merge their hit masks but that means we loose the wire preemption. I'll have to give it a bit more thinking but any help is welcome @brecht @ideasman42

I think the object origin getting priority is not a problem in itself. That's potentially confusing but also helpful in other situations I think.

The problem I see is that it stops the selection selection cycling from working, where you click multiple times in the same spot and it selects the next one. I'm not sure how that is implemented currently, but it somehow should take into account both passes.

Besides that, selection order seems wrong regardless of the origins or X-Ray setting. It should at least be front to back within the wireframe and solid passes.

I think the object origin getting priority is not a problem in itself. That's potentially confusing but also helpful in other situations I think. The problem I see is that it stops the selection selection cycling from working, where you click multiple times in the same spot and it selects the next one. I'm not sure how that is implemented currently, but it somehow should take into account both passes. Besides that, selection order seems wrong regardless of the origins or X-Ray setting. It should at least be front to back within the wireframe and solid passes.

No the problem is that it stop cycling because the active object origin is getting selected in the 1st pass (the one that is supposed to select wires in priority) .

But since only wires (and non meshes) are rendered in this pass, it does not consider the surfaces and select the active object again because of the origin. If you click anywhere else where the object origins are not it will cycle through the objects correctly.

The problem is that non meshes will also trigger this bug. If you put a camera or empty in front of the objects in Xray it won't cycle through them.

Selection order seems fine here.

No the problem is that it stop cycling because the active object origin is getting selected in the 1st pass (the one that is supposed to select wires in priority) . But since only wires (and non meshes) are rendered in this pass, it does not consider the surfaces and select the active object again because of the origin. If you click anywhere else where the object origins are not it will cycle through the objects correctly. The problem is that non meshes will also trigger this bug. If you put a camera or empty in front of the objects in Xray it won't cycle through them. Selection order seems fine here.

I think I found a workaround. Will commit soon.

I think I found a workaround. Will commit soon.

To repro the selection order, what I do is:

  • Open selection.blend from above
  • Press numpad 3 (right ortho)
  • Selection order is Cube > Sphere > Suzanna > Cylinder (front to back)
  • Press numpad 9 (left ortho)
  • Selection order is still Cube > Sphere > Suzanna > Cylinder (back to front)
To repro the selection order, what I do is: * Open selection.blend from above * Press numpad 3 (right ortho) * Selection order is Cube > Sphere > Suzanna > Cylinder (front to back) * Press numpad 9 (left ortho) * Selection order is still Cube > Sphere > Suzanna > Cylinder (back to front)

This issue was referenced by a3fea39724

This issue was referenced by a3fea397244406e2f60c388ea651a200e5b3681c

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
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#56915
No description provided.