Page MenuHome

Small object are not selected with Box Select tool
Open, NormalPublic


System Information
Operating system: Windows-10-10.0.17134 64 Bits
Graphics card: GeForce GTX 970/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 388.13

Blender Version
Broken: version: 2.80 (sub 53), branch: blender2.7, commit date: 2019-04-02 19:53, hash: rBa813e259d630
Worked: 2.79 official

Short description of error
Objects that are too small to be visible in the viewport don't get selected with Select Box tool. Other selection tools like Circle Select or Laso Select work as expected. The problem exist in all viewing modes (wireframe, solid, eevee). In Blender 2.79 all objects get selected no matter how small they are.

Exact steps for others to reproduce the error

  1. Open the attached blend file. There are two cubes, one with scale 10, the second with scale 0.01.
  2. Zoom out to see the larger cube.
  3. Select the large cube to make it active.
  4. Box Select both cubes. The small cube does not get selected.
  5. Select the small cube to make it active.
  6. Box Select both cubes. Both cubes get selected.



Event Timeline

Sebastian Parborg (zeddb) lowered the priority of this task from Needs Triage by Developer to Confirmed, Medium.

@Brecht Van Lommel (brecht) who to assign this to?

Brecht Van Lommel (brecht) raised the priority of this task from Confirmed, Medium to Confirmed, High.

Not sure if this is for @Campbell Barton (campbellbarton), @Clément Foucault (fclem) or someone one else. Or if this is some known limitation of new selection code.

This is a limitation in OpenGL Queries (2.7x has this issue too).

Setting as low priority since it's not a regression in occlusion queries.

Possible solutions I can think of aren't especially nice:

  • Draw vertices & edges when selecting (not just the surface geometry).

    While this guarantees correct selection, it's extra drawing to support this corner case.

    Patch for mesh drawing:
    1diff --git a/source/blender/draw/modes/object_mode.c b/source/blender/draw/modes/object_mode.c
    2index ee2c660ca06..9e81ccc6930 100644
    3--- a/source/blender/draw/modes/object_mode.c
    4+++ b/source/blender/draw/modes/object_mode.c
    5@@ -3196,6 +3196,19 @@ static void OBJECT_cache_populate(void *vedata, Object *ob)
    6 }
    7 }
    8 }
    10+ if (!is_edit_mode && DRW_state_is_select()) {
    11+ if (me->totvert && me->totedge) {
    12+ /* Check edges because we may have already drawn loose verts. */
    13+ GPUBatch *geom = DRW_cache_mesh_all_verts_get(ob);
    14+ DRW_shgroup_call_object_add(sgl->points, geom, ob);
    15+ }
    16+ if (me->totedge && me->totpoly) {
    17+ /* Check totpoly because we may have already drawn loose edges. */
    18+ GPUBatch *geom = DRW_cache_mesh_all_edges_get(ob);
    19+ DRW_shgroup_call_object_add(sgl->wire, geom, ob);
    20+ }
    21+ }
    22 break;
    23 }
    24 case OB_SURF: {
  • Enable 'Center Points' for unselected objects.
  • Detect object bounding boxes that approach 1x px screen-space scale and use a different drawing method when selecting.
Campbell Barton (campbellbarton) lowered the priority of this task from Confirmed, High to Confirmed, Low.

Low priority? Really? This behavior can have severe, sometimes even devastating effects when unnoticed.

When you spend for example significant amount of time cleaning up some complex imported model, miss out on a few small pieces, do not notice and either save file and reopen after or run out of the undo steps, you may end up having wasted up to hours of work.

Agree, this is big bug. Unacceptable for stable release.

Issue came up in T65856 as well, just wanted to note we have T64282, where T64281 (Option to lasso-select using geometry instead of object centers) was added.
So maybe we should add the opposite there as well? [selecting object centers with box select]

Campbell Barton (campbellbarton) raised the priority of this task from Confirmed, Low to Normal.EditedJul 3 2019, 2:00 AM

@Clément Foucault (fclem) mentioned conservative rasterization would solve this, however I could only find a reference to the nvidia extension.

We could enable the extension on nvidia & use a geometry shader for drivers which don't support this, however this adds a performance penalty for all selection, so we'd need to see if it's significant or not.

again another report by me, found ^ this original report this evening now,

as I'm working with blender it IS really an annoying problem which needs to be fixed, and causes serious problems while f.e. grabbing selections

pls close my report as duplicate of this one:

Hello, I have to agree with the people above.
This bug results in a lot of mistakes and lost objects.

Really appreciate the work you are doing with the software though!! :)

If we're not likely to get conservative rasterization done for 2.81, a simpler solution could be to use the existing geometry batch to draw wires (even though it's GPU_PRIM_TRIS).

Then at least we wouldn't have to create new batches just to draw edges.