Decimate modifier doesn't decimate evenly #112025

Closed
opened 2023-09-06 14:01:43 +02:00 by Robert S · 5 comments

System Information
Operating system: Windows-10-10.0.19045-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 3090/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 536.23

Blender Version
Broken: version: 3.6.2, branch: blender-v3.6-release, commit date: 2023-08-14 14:05, hash: ffe93138751e
Worked: (newest version of Blender that worked as expected)

Short description of error
Decimate modifier result:
image

Decimate modifier vertex group content:
image

In other parts of the map, the decimate doesn't do much at all, while in some parts it reduces too much.
image

Exact steps for others to reproduce the error

  1. Download this example .blend file.
  2. Look at the Decimate modifier with vertex group results.
  3. Compare it to the actual vertex group contents.

Expected: Decimation should be "even" across the entire vertex group content.

Actual: Decimation is extremely unevenly distributed, seemingly doing massive decimations in a corner of the model while ignoring the rest.

**System Information** Operating system: Windows-10-10.0.19045-SP0 64 Bits Graphics card: NVIDIA GeForce RTX 3090/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 536.23 **Blender Version** Broken: version: 3.6.2, branch: blender-v3.6-release, commit date: 2023-08-14 14:05, hash: `ffe93138751e` Worked: (newest version of Blender that worked as expected) **Short description of error** Decimate modifier result: ![image](/attachments/d6cdec10-a842-458e-bcea-ee30e26699fe) Decimate modifier vertex group content: ![image](/attachments/b85def6d-4ab9-4dbe-ab30-58896f9b110d) In other parts of the map, the decimate doesn't do much at all, while in some parts it reduces too much. ![image](/attachments/f2cd8080-4c98-4235-b3cc-eb85ecb08cbc) **Exact steps for others to reproduce the error** 1. Download [this example .blend](https://we.tl/t-GpN3UHnIVW) file. 2. Look at the Decimate modifier with vertex group results. 3. Compare it to the actual vertex group contents. Expected: Decimation should be "even" across the entire vertex group content. Actual: Decimation is extremely unevenly distributed, seemingly doing massive decimations in a corner of the model while ignoring the rest.
Robert S added the
Priority
Normal
Type
Report
Status
Needs Triage
labels 2023-09-06 14:01:44 +02:00
Member

Can confirm, will check

Can confirm, will check
Philipp Oeser added
Status
Confirmed
Module
Modeling
Interest
Modifiers
and removed
Status
Needs Triage
labels 2023-09-08 12:26:33 +02:00
Member

Hm, upon having a first look at BM_mesh_decimate_collapse it turns out that this is extremely sensitive to normals (slight bumps hills in the map)

This is also the case with not using vertex groups at all

image
image

If you make the whole Ukraine planar, it collapses quite evenly
image

Without digging (much) deeper, I cannot tell why it is so "drastic", @ideasman42 might know better (#37121 might be related).

It might not be considered a bug, will still leave open since it is rather unexpected behavior.

That said, you could alternatively use the Weld modifier, this does not try to preserve the original exact shape so much and is probably more in line of what you would expect here? (instead of tweaking the Ratio, you would need to adjust the weld Distance)
image

Hm, upon having a first look at `BM_mesh_decimate_collapse` it turns out that this is extremely sensitive to normals (slight bumps hills in the map) This is also the case with not using vertex groups at all ![image](/attachments/0ec6073f-7148-47d8-b567-112f75256122) ![image](/attachments/bee9d126-4986-43ff-a743-fc17e14e448a) If you make the whole Ukraine planar, it collapses quite evenly ![image](/attachments/fe990925-ec84-4577-a773-f2a946ebc1e2) Without digging (much) deeper, I cannot tell why it is so "drastic", @ideasman42 might know better (#37121 might be related). It might not be considered a bug, will still leave open since it is rather unexpected behavior. That said, you could alternatively use the Weld modifier, this does not try to preserve the original exact shape so much and is probably more in line of what you would expect here? (instead of tweaking the `Ratio`, you would need to adjust the weld `Distance`) ![image](/attachments/bfd1b16b-c863-4c50-a545-1e747bf864c7)
Philipp Oeser changed title from Decimate modifier using Vertex Group doesn't decimate evenly to Decimate modifier doesn't decimate evenly 2023-09-08 13:22:19 +02:00

What has always confused me is that the decimate modifier count percentage is always calculated across all vertices of the model number, not the given group number.
As a result, percentage amount is very sensitive if the model is heavy and group is relatively small.
This may have some impact here as well.
What will happen if to detach vertex group and apply the modifier to separated part?

Also, is the scale applied?

What has always confused me is that the decimate modifier count percentage is always calculated across all vertices of the model number, not the given group number. As a result, percentage amount is very sensitive if the model is heavy and group is relatively small. This may have some impact here as well. What will happen if to detach vertex group and apply the modifier to separated part? Also, is the scale applied?
Member

What will happen if to detach vertex group and apply the modifier to separated part?

Dont think that makes a difference (wrt the "uneven" result), this is still influenced most by the shape (not so much by the percentage -- your suggestion might make sense though, having the ratio for just the parts that are part of the vertex group)

> What will happen if to detach vertex group and apply the modifier to separated part? Dont think that makes a difference (wrt the "uneven" result), this is still influenced most by the shape (not so much by the percentage -- your suggestion might make sense though, having the ratio for just the parts that are part of the vertex group)

Checked on this file and I don't consider this is a bug.

  • Entirely flat surfaces will decimate before other slightly flat surfaces.
  • This results in some regions not being decimated when they have some subtle curvature.

What you might be after is a decimate that prioritizes uniform geometry density (at the expense of quality), but this is a feature, not an error in the current logic.

Checked on this file and I don't consider this is a bug. - Entirely flat surfaces will decimate before other slightly flat surfaces. - This results in some regions not being decimated when they have some subtle curvature. What you might be after is a decimate that prioritizes uniform geometry density (at the expense of quality), but this is a feature, not an error in the current logic.
Blender Bot added
Status
Archived
and removed
Status
Confirmed
labels 2023-09-12 15:18:24 +02: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
4 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#112025
No description provided.