UV editor "Select Overlap" doesn't select identical faces #85508

Closed
opened 2021-02-09 19:43:43 +01:00 by Luka Glisic · 13 comments

System Information
Operating system: Windows-10-10.0.18362-SP0 64 Bits
Graphics card: GeForce GTX 1070 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 457.51

Blender Version
Broken: version: 2.93.0 Alpha, branch: master, commit date: 2021-02-08 23:42, hash: eab9165c25

Short description of error
When in the UV editor "Select Overlap" doesn't work if the UV islands are exactly the same.

Exact steps for others to reproduce the error
*Open attached .blend file
*In the UV Editor, Select -> Select Overlap

Bug.blend

**System Information** Operating system: Windows-10-10.0.18362-SP0 64 Bits Graphics card: GeForce GTX 1070 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 457.51 **Blender Version** Broken: version: 2.93.0 Alpha, branch: master, commit date: 2021-02-08 23:42, hash: `eab9165c25` **Short description of error** When in the UV editor "Select Overlap" doesn't work if the UV islands are exactly the same. **Exact steps for others to reproduce the error** *Open attached .blend file *In the UV Editor, Select -> Select Overlap [Bug.blend](https://archive.blender.org/developer/F9753635/Bug.blend)
Author

Added subscriber: @LG787

Added subscriber: @LG787
Member

Added subscriber: @filedescriptor

Added subscriber: @filedescriptor
Member

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

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

I can confirm this on the latest 2.92.0 Beta, branch: master, commit date: 2021-02-10 00:16, hash: f617782fc1.

I can confirm this on the latest 2.92.0 Beta, branch: master, commit date: 2021-02-10 00:16, hash: `f617782fc1`.
Member

Added subscriber: @ideasman42

Added subscriber: @ideasman42
Member

It looks to me as though the code explicitly excludes the case of endpoint overlap:

bool result = (
          /* Don't use 'isect_tri_tri_v2' here
           * because it's important to ignore overlap at end-points. */
          isect_seg_seg_v2_point_ex(t1[0], t1[1], t2[0], t2[1], endpoint_bias, vi) == 1 ||
          isect_seg_seg_v2_point_ex(t1[0], t1[1], t2[1], t2[2], endpoint_bias, vi) == 1 ||
          isect_seg_seg_v2_point_ex(t1[0], t1[1], t2[2], t2[0], endpoint_bias, vi) == 1 ||
          isect_seg_seg_v2_point_ex(t1[1], t1[2], t2[0], t2[1], endpoint_bias, vi) == 1 ||
          isect_seg_seg_v2_point_ex(t1[1], t1[2], t2[1], t2[2], endpoint_bias, vi) == 1 ||
          isect_seg_seg_v2_point_ex(t1[1], t1[2], t2[2], t2[0], endpoint_bias, vi) == 1 ||
          isect_seg_seg_v2_point_ex(t1[2], t1[0], t2[0], t2[1], endpoint_bias, vi) == 1 ||
          isect_seg_seg_v2_point_ex(t1[2], t1[0], t2[1], t2[2], endpoint_bias, vi) == 1 ||
          isect_point_tri_v2(t1[0], t2[0], t2[1], t2[2]) != 0 ||
          isect_point_tri_v2(t2[0], t1[0], t1[1], t1[2]) != 0);

Which is weird because it is unclear why. I would expect the operator to handle this case as well... Maybe it would be good to add an option like "Include boundary" (not the best name) so the user can choose to select what's "inside" or additionally what's "exactly overlapping".
@ideasman42 what are your thoughts here?

It looks to me as though the code explicitly excludes the case of endpoint overlap: ``` bool result = ( /* Don't use 'isect_tri_tri_v2' here * because it's important to ignore overlap at end-points. */ isect_seg_seg_v2_point_ex(t1[0], t1[1], t2[0], t2[1], endpoint_bias, vi) == 1 || isect_seg_seg_v2_point_ex(t1[0], t1[1], t2[1], t2[2], endpoint_bias, vi) == 1 || isect_seg_seg_v2_point_ex(t1[0], t1[1], t2[2], t2[0], endpoint_bias, vi) == 1 || isect_seg_seg_v2_point_ex(t1[1], t1[2], t2[0], t2[1], endpoint_bias, vi) == 1 || isect_seg_seg_v2_point_ex(t1[1], t1[2], t2[1], t2[2], endpoint_bias, vi) == 1 || isect_seg_seg_v2_point_ex(t1[1], t1[2], t2[2], t2[0], endpoint_bias, vi) == 1 || isect_seg_seg_v2_point_ex(t1[2], t1[0], t2[0], t2[1], endpoint_bias, vi) == 1 || isect_seg_seg_v2_point_ex(t1[2], t1[0], t2[1], t2[2], endpoint_bias, vi) == 1 || isect_point_tri_v2(t1[0], t2[0], t2[1], t2[2]) != 0 || isect_point_tri_v2(t2[0], t1[0], t1[1], t1[2]) != 0); ``` Which is weird because it is unclear why. I would expect the operator to handle this case as well... Maybe it would be good to add an option like "Include boundary" (not the best name) so the user can choose to select what's "inside" or additionally what's "exactly overlapping". @ideasman42 what are your thoughts here?

Added subscriber: @deadpin

Added subscriber: @deadpin

I was the author of this functionality. I think this can be addressed by having an additional, final, check to see if all the verts of the 2 tris are equal to each other but I have not tried it out yet (will have to account for vertex ordering differences).

Generally we have to ignore colinear edges and endpoints because verts/edges are shared between faces normally and we shouldn't detect an overlap in those cases.

I was the author of this functionality. I think this can be addressed by having an additional, final, check to see if all the verts of the 2 tris are equal to each other but I have not tried it out yet (will have to account for vertex ordering differences). Generally we have to ignore colinear edges and endpoints because verts/edges are shared between faces normally and we shouldn't detect an overlap in those cases.
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

Adding Modeling as the high-level module

Adding Modeling as the high-level module
Member

@deadpin Right that would make sense. I would still add it as an option, so the user can choose to do the additional computation only if they want to.

@deadpin Right that would make sense. I would still add it as an option, so the user can choose to do the additional computation only if they want to.

This issue was referenced by 2d252b6d26

This issue was referenced by 2d252b6d26f90f81f2a2dc7a3031c407dc8a643c

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Campbell Barton self-assigned this 2021-02-10 22:36:06 +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#85508
No description provided.