Triangulate faces sometimes produces degenerate triangle faces #103913

Closed
opened 2023-01-16 11:35:29 +01:00 by Jesse Yurkovich · 5 comments

System Information
Operating system: Windows-10-10.0.19044-SP0 64 Bits
Graphics card: NVIDIA GeForce GTX 1070 with Max-Q Design/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 511.09

Blender Version
Broken: version: 3.5.0 Alpha, branch: master, commit date: 2023-01-04 23:36, hash: a7cc6e015c
Broken: version: 3.3.2, branch: master, commit date: 2022-12-06 18:19, hash: bf24652e38
Broken: version: 2.93.10, branch: master, commit date: 2022-08-02 18:21, hash: 0a65e1a8e7
Broken: version: 2.79 ...
Worked: n/a

Short description of error
While investigating #103707 (UV Select Overlap incorrectly detects some faces as overlaps) we noticed bad triangulation coming from BLI_polyfill_calc. Sure enough, I can reproduce the effect using regular geometry editing as well.

Exact steps for others to reproduce the error
triangulate_faces.blend

  • Load attached .blend or create an ngon face similar to screen shot 1
  • Triangulate the face (CTRL+T) using the ngon "CLIP" mode (Beauty mode does not have the issue). Notice that while there's 6 faces, only 5 can be seen (screen shot 2)
  • 1 of them is degenerate and can be seen if you pull a vertex away (screen shot 3)

[Shot 1]
image.png

[Shot 2]
image.png

[Shot 3]
image.png

**System Information** Operating system: Windows-10-10.0.19044-SP0 64 Bits Graphics card: NVIDIA GeForce GTX 1070 with Max-Q Design/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 511.09 **Blender Version** Broken: version: 3.5.0 Alpha, branch: master, commit date: 2023-01-04 23:36, hash: `a7cc6e015c` Broken: version: 3.3.2, branch: master, commit date: 2022-12-06 18:19, hash: `bf24652e38` Broken: version: 2.93.10, branch: master, commit date: 2022-08-02 18:21, hash: `0a65e1a8e7` Broken: version: 2.79 ... Worked: n/a **Short description of error** While investigating #103707 (UV Select Overlap incorrectly detects some faces as overlaps) we noticed bad triangulation coming from `BLI_polyfill_calc`. Sure enough, I can reproduce the effect using regular geometry editing as well. **Exact steps for others to reproduce the error** [triangulate_faces.blend](https://archive.blender.org/developer/F14152681/triangulate_faces.blend) - Load attached .blend or create an ngon face similar to screen shot 1 - Triangulate the face (CTRL+T) using the ngon "CLIP" mode (Beauty mode does not have the issue). Notice that while there's 6 faces, only 5 can be seen (screen shot 2) - 1 of them is degenerate and can be seen if you pull a vertex away (screen shot 3) [Shot 1] ![image.png](https://archive.blender.org/developer/F14152690/image.png) [Shot 2] ![image.png](https://archive.blender.org/developer/F14152692/image.png) [Shot 3] ![image.png](https://archive.blender.org/developer/F14152694/image.png)
Author
Member

Added subscriber: @deadpin

Added subscriber: @deadpin

Added subscriber: @mano-wii

Added subscriber: @mano-wii

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

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

It is known that some of Blender's triangulation methods can create degenerate triangles.
This is old stuff and as far as I know it's not considered bug.

We have to be careful changing something so ingrained in Blender's code.

I'll let the #modeling team decide what to do here.

It is known that some of Blender's triangulation methods can create degenerate triangles. This is old stuff and as far as I know it's not considered bug. We have to be careful changing something so ingrained in Blender's code. I'll let the #modeling team decide what to do here.
Blender Bot added
Status
Resolved
and removed
Status
Needs Info from Developers
labels 2023-02-08 07:11:17 +01:00

@deadpin committed a fix however this is an edge case, had there been significant down-sides or slow-downs to avoiding the case in this report, then I think it would be reasonable to close. Even with the fix - near zero area faces are still possible so from a user perspective the problem may still exist in some situations.

This is the reason "Beauty" is the default tessellation method when triangulating N-Gons, as noted in code-comments, more work could be done to avoid small faces but this would take extra computation. In cases where this is needed the caller might as well use beauty-tessellation. The main reason to keep ear-clip is that it matches tessellation used in the 3D view-port.

@deadpin committed a fix however this is an edge case, had there been significant down-sides or slow-downs to avoiding the case in this report, then I think it would be reasonable to close. Even with the fix - *near* zero area faces are still possible so from a user perspective the problem may still exist in some situations. This is the reason "Beauty" is the default tessellation method when triangulating N-Gons, as noted in code-comments, more work could be done to avoid small faces but this would take extra computation. In cases where this is needed the caller might as well use beauty-tessellation. The main reason to keep ear-clip is that it matches tessellation used in the 3D view-port.
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Code Documentation
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
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
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
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
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
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
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
3 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#103913
No description provided.