Ngon triangulation error #31807

Closed
opened 2012-06-12 22:51:13 +02:00 by Martin Hedin · 9 comments

%%%When triangulating a cube, with one face sudivided twice, the connections are not as expected. Faces with 0 area are created, and edges of these faces are coincident with the adjacent penpendicular faces.

Blender 2.63 - Ve:8 - Fa:6 - Ob:1-3 - La:1 - Mem:7,45M (0,1m) - Cube
r46461:46487M

  1. Load factory settings.
  2. Select cube -> Edit mode
  3. Sudivide one face twice (W -> Subdivide, 2 times)
  4. Select all faces, triangulate. (A -> CTRL+T)
  5. Pull vertices to reveal 0 area faces.%%%
%%%When triangulating a cube, with one face sudivided twice, the connections are not as expected. Faces with 0 area are created, and edges of these faces are coincident with the adjacent penpendicular faces. Blender 2.63 - Ve:8 - Fa:6 - Ob:1-3 - La:1 - Mem:7,45M (0,1m) - Cube r46461:46487M 1. Load factory settings. 2. Select cube -> Edit mode 3. Sudivide one face twice (W -> Subdivide, 2 times) 4. Select all faces, triangulate. (A -> CTRL+T) 5. Pull vertices to reveal 0 area faces.%%%
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

%%%Would like to comment that this bug makes exporting to game engines, especially Cryengine in my case very difficult, since this error appears very easily, and with conversion to, for example; CGF format, as it can only be done with regular triangulated polygons, and exporter does not accept coincident edges, and faces with 0 area.

(In my case, conversion of DAE to CGF fails, with RC.exe tool supplied with Cryengine3. The DAE contains the errors from the triangulation in the exporting process Blender -> DAE)%%%

%%%Would like to comment that this bug makes exporting to game engines, especially Cryengine in my case very difficult, since this error appears very easily, and with conversion to, for example; CGF format, as it can only be done with regular triangulated polygons, and exporter does not accept coincident edges, and faces with 0 area. (In my case, conversion of DAE to CGF fails, with RC.exe tool supplied with Cryengine3. The DAE contains the errors from the triangulation in the exporting process Blender -> DAE)%%%
Author
%%%Discussed here: http://blenderartists.org/forum/showthread.php?257705-Ngon-triangulation%%%

%%%Here is a patch, which I believe solves the reported problem. Could only test it over a few simple cases, so would be nice if you could stress it with a bit more complex models.

Also, would be nice to compare its quickness with previous code (from official 2.63, e.g.) in a very huge model, didn’t yet made any measurements, new code will be slower but can say how much… :/%%%

%%%Here is a patch, which I believe solves the reported problem. Could only test it over a few simple cases, so would be nice if you could stress it with a bit more complex models. Also, would be nice to compare its quickness with previous code (from official 2.63, e.g.) in a very huge model, didn’t yet made any measurements, new code will be slower but can say how much… :/%%%

%%%Just did a small test, and for a 50700 mesh (Suzanne array-duplicated 100 times):

  • old code: 0.40s
  • new code: 0.27s

I’m a bit surprised here… but even with ngons object (test cube as described in this report, array-duplicated 500 times, makes 14500 vertices), I have:

  • old code: 0.13s
  • new code: 0.09s (more when it has to spit out many printf, as in current patch!).

So it seems performances will definitively not be a problem! :D%%%

%%%Just did a small test, and for a 50700 mesh (Suzanne array-duplicated 100 times): * old code: 0.40s * new code: 0.27s I’m a bit surprised here… but even with ngons object (test cube as described in this report, array-duplicated 500 times, makes 14500 vertices), I have: * old code: 0.13s * new code: 0.09s (more when it has to spit out many printf, as in current patch!). So it seems performances will definitively not be a problem! :D%%%

%%%Well, since nobody seems to want/be able to test…

Campbo, assigning to you as you are the ref man for bmesh, here. ;)

The (updated) patch I attached seems to do the job quite well, as far as I have tested it, but I’m absolutely not sure I didn’t miss something important. Anyway, this is a temp fix, as I think there is a GSOC working on a serious triangulation solution?%%%

%%%Well, since nobody seems to want/be able to test… Campbo, assigning to you as you are the ref man for bmesh, here. ;) The (updated) patch I attached seems to do the job quite well, as far as I have tested it, but I’m absolutely not sure I didn’t miss something important. Anyway, this is a temp fix, as I think there is a GSOC working on a serious triangulation solution?%%%
Author

%%%Sorry,

I am newbie and I am packing for changing country during the summer. Could not test at the moment :(%%%

%%%Sorry, I am newbie and I am packing for changing country during the summer. Could not test at the moment :(%%%

%%%fixed in r48243.

Thanks for reporting!%%%

%%%fixed in r48243. Thanks for reporting!%%%

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
2 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#31807
No description provided.