Help Me Fix Oversensitive Drag Select

I want to get bitmap selection for box/lasso/circle working better. In 2.8+ the zbuffer, bitmap, near select, whatever you want to call it, selects too many things that are not seen in the viewport. Possibly getting worse over time?

2.79 does things pretty well in this regard. Going to grab the source for 2.79 and hopefully familiarize myself with it quickly so I can see what/where/how it does what I would reasonably expect to happen when I drag select some faces, then get that ported over to 3.2.

I don’t want the unpredictable extra’s you can select on what were non-visible sides of the cube when the selection was performed. Video examples, showing 2.79, then 2.80, then 3.2:

2.79 does what I would like to happen:

How it is in 2.80, some unwanted faces getting grabbed from the sides. When doing a single side, it can be very unpredicable with how much it decides to select.

In 3.20 it’s a bit worse when dragging over multiple sides of the cube, but also very unpredictable when doing one side. Sometimes it’s almost perfect, and then in a near identical situation you get lots of junk faces.

You can get more consistent selection if you go into ortho view, select, then back again to persp, but that is a bit much. If this is some goofy setting I can turn off, or a driver issue that can be worked around, that would make me really happy. I am going into this expecting to do a bit of work editing the source. I have some experience doing that, but would really appreciate a hand. Got anything for me?


It’s a known issue
I made the same bug report ⚓ T88806 Inaccurate Lasso Selection in Perspective View, more Accurate in Orthographic duplicate of this
⚓ T72842 Box and Lasso select is extremely unreliable in Face or Edge select mode (selects non-visible faces or edges)


Thanks for that, it gave me some idea why it is doing what it does. I tried looking around at some things to see what I could figure out, but it is unfamiliar territory. I was hoping that there was something I could tweak to tell Blender, “Hey, don’t be so stupid about drawing stuff you shouldn’t” but it isn’t simple enough for me to just find it and change a couple things and see what happens.

I then thought about polling each faces normal and comparing to the camera or something where if it was some combination of xyz degrees near 90 it would filter those out. I honestly don’t even know the math to use to decide where and how to apply that.

So I forgot about it for about a week until it hit me. Verts work perfectly fine, it’s just edges and faces that are near useless. So, just make a bitmap that is the size of the viewport, and if it can see enough verts in a given face, it is cool for selecting. Was already familiar with doing that since I know how to do fully enclosed faces, seems to be working fine so far.

I cannot simply say if the vertex count of a face = verts visible in viewport that it is all good, it results in the exact same behaviour where you get all kinds of junk faces and edges that are not seen. I had to tell it specifically if you are dealing with a triangle that you need to see all 3 verts, and if it is a quad or ngon that it needs to at least see 4 verts.

This means you get a couple of situational extras, if you can see all 3 verts of a triangle that is unseen, it will probably select it. I demonstrate this towards the end of the video. Ngons might have some exception as well but whatever. Should be easy to avoid tris and ngons. Going to do edges, should be straightforward but you never know.

@mano-wii any thoughts?

1 Like