Decimate Modifier; Bad geometry when following subsurf with planar decimation on a mesh with holes #47998
Labels
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
5 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#47998
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
OS - Windows 10 64 bit; CPU - Third-gen i7; GPU - ATI HD 7xxx; RAM - 24 gigs
Blender Version
Broken: Blender hash
211b539
Worked: Unknown
Short description of error
You get bad results when adding a subsurf modifier and following it up with planar decimation on a mesh with holes (faces start overlapping the holes and each other).
Exact steps for others to reproduce the error
Open the .blend file and turn the decimate modifier on and off
.blend
BadDecimate.blend
Changed status to: 'Open'
Added subscriber: @Ace_Dragon
Added subscriber: @ignatz
OS - Windows 7 Pro 64-bit
Display: Nvidia GeForce GTX760
Blender Version
Broken:
29bb10e
A bit of extra information.
I get the same bad results on my system if I use the 'Planar' setting in the decimate modifier.
If I set decimate to either 'Collapse'or'Un-subdivide' then I get good (expected) results from the modifier.
Added subscriber: @zeauro
You can also avoïd that by using Delimit options of the modifier.
You can create seams like that.
Or you can have a material or UVs that make sense as demarcation.
Looked into this. The cause of the error is edge-chains (edges following a path) are collapsed without checking:
This could be handled by creating a large polygon with holes (ignoring central edge chains), then using the hole connection code (thats used for booleans -
BM_face_split_edgenet_connect_islands
). While this should work its quite a heavy solution for an operation which in many cases isn't even necessary.Another solution could be to triangulate the ngon, then use the edges of the tessellated triangles to map a shorter path.
But think it would be simpler to treat this as an ear-clipping problem, where collapsing each vertex on an edge chain checks that the face which occupies triangle if formed, has no vertices inside that triangle.
While the overlap checks add some overhead, this can be optimized as is done with
BLI_polyfill2d
(using a KD-Tree), 2d projections can be cached too.There is one gotcha with ear clipping - that is a vertex which prevents clipping, may its self be clipped later on during this process.
Once a vertex is clipped, the faces that used it, and previously weren't able to collapse at least one vertex - will need to re-tested (keeping track of which vertices prevented others from clipping could work too... but probably too much book-keeping to handle such a corner-case).
This issue was referenced by
12b0c03e49
Changed status from 'Open' to: 'Resolved'