Subdivision modifier does not interpolate zero weights. #82771

Open
opened 2020-11-17 05:35:33 +01:00 by Will · 13 comments

System Information
Operating system: Linux
Graphics card: Intel UHD

Blender Version
Broken: 2.90.1
Worked: ???

Short description of error

The subdivision modifier usually interpolates both value and membership across subdivided vertices.

This allows it to be used in non-destructive, modifier-based workflows that operate on or using vertex groups.

It does not do this, however, when vertex weights are equal to zero. The original vertices retain their (zero-weighted) vertex group membership, while new vertices in between them have no vertex group membership.

An example of why this is problematic is screenshotted below, with the file attached:

ZeroWeightSubdiv.png

Each Subdivision'd sphere has a bumpy texture applied using a Displace modifier after a textured VertexWeightMix modifier.

The rightmost sphere has its vertices weighted to 0.01, and interpolates and behaves correctly.

The leftmost sphere has its vertices weighted to 0.00. It intuitively (and, numerically/extrapolatively) should be indistinguishable to the 0.01 sphere. Because its weights aren't correctly interpolated, it instead ends up with a bunch of spikes at each of its original vertices.

The middle sphere has vertices weighted in a gradient from 0.00 to 0.50. It serves as an example of a feasible real-world application which would be broken by this kind of behaviour. Perhaps the original vertex weights act as a sort of base heightmap for a terrain model, and the changes made by the Subdivision and textured VertexWeightMix modifiers add an extra layer of detail. In this case, the clear and useful behaviour would be for behaviour to be continuous in the transition from 0.01 to 0.00. Instead, there is a sharp cutoff at 0.00, and inconsistent and discontinuous behaviour after that.
ZeroWeightSubdiv.blend
Exact steps for others to reproduce the error

Apply a subdivision modifier to a mesh with zero vertex weights, then check the vertex group membership of its vertices afterwards.

Or download and open the attached .blend file.

**System Information** Operating system: Linux Graphics card: Intel UHD **Blender Version** Broken: 2.90.1 Worked: ??? **Short description of error** The subdivision modifier usually interpolates both value and membership across subdivided vertices. This allows it to be used in non-destructive, modifier-based workflows that operate on or using vertex groups. It does not do this, however, when vertex weights are equal to zero. The original vertices retain their (zero-weighted) vertex group membership, while new vertices in between them have no vertex group membership. An example of why this is problematic is screenshotted below, with the file attached: ![ZeroWeightSubdiv.png](https://archive.blender.org/developer/F9307822/ZeroWeightSubdiv.png) Each Subdivision'd sphere has a bumpy texture applied using a Displace modifier after a textured VertexWeightMix modifier. The rightmost sphere has its vertices weighted to 0.01, and interpolates and behaves correctly. The leftmost sphere has its vertices weighted to 0.00. It intuitively (and, numerically/extrapolatively) should be indistinguishable to the 0.01 sphere. Because its weights aren't correctly interpolated, it instead ends up with a bunch of spikes at each of its original vertices. The middle sphere has vertices weighted in a gradient from 0.00 to 0.50. It serves as an example of a feasible real-world application which would be broken by this kind of behaviour. Perhaps the original vertex weights act as a sort of base heightmap for a terrain model, and the changes made by the Subdivision and textured VertexWeightMix modifiers add an extra layer of detail. In this case, the clear and useful behaviour would be for behaviour to be continuous in the transition from 0.01 to 0.00. Instead, there is a sharp cutoff at 0.00, and inconsistent and discontinuous behaviour after that. [ZeroWeightSubdiv.blend](https://archive.blender.org/developer/F9307820/ZeroWeightSubdiv.blend) **Exact steps for others to reproduce the error** Apply a subdivision modifier to a mesh with zero vertex weights, then check the vertex group membership of its vertices afterwards. Or download and open the attached `.blend` file.
Author

Added subscriber: @WCN

Added subscriber: @WCN

Added subscriber: @mano-wii

Added subscriber: @mano-wii

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

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

Thanks for the report,
I confirm that vertices whose weight value is zero, do not interpolate.

Here is a simplified file:
zero_weight_vgroup_interp_bug.blend

To reproduce the problem in this file:

  • select all vertices of the cube
  • run the subdivide operator
  • deselect all vertices
  • Check which vertices are part of the Vertex Group (by the select option from the vertex group).

Only the "original" vertices remain.

Thanks for the report, I confirm that vertices whose weight value is zero, do not interpolate. Here is a simplified file: [zero_weight_vgroup_interp_bug.blend](https://archive.blender.org/developer/F9313240/zero_weight_vgroup_interp_bug.blend) To reproduce the problem in this file: - select all vertices of the cube - run the subdivide operator - deselect all vertices - Check which vertices are part of the Vertex Group (by the select option from the vertex group). Only the "original" vertices remain.

Added subscriber: @ideasman42

Added subscriber: @ideasman42

Changed status from 'Confirmed' to: 'Needs User Info'

Changed status from 'Confirmed' to: 'Needs User Info'

I don't think modifiers should be using vertex group membership. This is something that we avoided nearly everywhere.

Can you include a simple modifier setup that does this?

I don't think modifiers should be using vertex group membership. This is something that we avoided nearly everywhere. Can you include a simple modifier setup that does this?
Author

@ideasman42 I don't know if there are any modifiers that explicitly use vertex group membership, but the VertexWeightMix modifier definitely seems to implicitly use it in the sense that it will not assign new memberships to vertices that aren't already in a target/output group. As a result, being zero-weighted has a completely different effect compared to not being in a group, which in turn can affect any other modifiers that use its output weights further down the stack.

The file in my original post has this setup. Here's a screenshot, with the displacement modifier disabled:

image.png

The top sphere starts with zero weights across all its vertices. The bottom sphere starts with 0.010 weights across all its vertices. The middle sphere starts with a gradient from zero to 0.5 across the middle.

The Subdivision interpolates vertex weights and group membership only between non-zero vertices. As a result, the VertexWeightMix doesn't operate on the newly generated vertices, with no vertex group membership, in the areas that started with zero weights.

@ideasman42 I don't know if there are any modifiers that *explicitly* use vertex group membership, but the VertexWeightMix modifier definitely seems to implicitly use it in the sense that it will not assign new memberships to vertices that aren't already in a target/output group. As a result, being zero-weighted has a completely different effect compared to not being in a group, which in turn can affect any other modifiers that use its output weights further down the stack. The file in my original post has this setup. Here's a screenshot, with the displacement modifier disabled: ![image.png](https://archive.blender.org/developer/F9320182/image.png) The top sphere starts with zero weights across all its vertices. The bottom sphere starts with 0.010 weights across all its vertices. The middle sphere starts with a gradient from zero to 0.5 across the middle. The Subdivision interpolates vertex weights and group membership only between non-zero vertices. As a result, the VertexWeightMix doesn't operate on the newly generated vertices, with no vertex group membership, in the areas that started with zero weights.
Author

Also, IMHO, whether or not modifiers actually use vertex group membership is just an example, and not the main point of the issue. The behaviour of subdivision interpolating vertex weights for every value except 0.0 is itself inconsistent, and could thus also lead to other issues elsewhere.

Also, IMHO, whether or not modifiers actually use vertex group membership is just an example, and not the main point of the issue. The behaviour of subdivision interpolating vertex weights for every value except 0.0 is itself inconsistent, and could thus also lead to other issues elsewhere.
Member

Changed status from 'Needs User Info' to: 'Needs Triage'

Changed status from 'Needs User Info' to: 'Needs Triage'
Member

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

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

Added subscriber: @HDMaster84

Added subscriber: @HDMaster84
Member

I don't know the details here, but I just want to add that this might be a performance optimization for the normal usecase of rigging, where there are lots of vgroups with zero weights in most places.

What I do know though is that this is a useful glitch! I don't think there is currently another way to get a vgroup on just the original geometry (is there?)

So I think this should be low prio, as it only happens for the "vertex weight mix/edit modifier" and the user can easily work around this issue with said modifiers.

I don't know the details here, but I just want to add that this might be a performance optimization for the normal usecase of rigging, where there are lots of vgroups with zero weights in most places. What I do know though is that this is a useful glitch! I don't think there is currently another way to get a vgroup on just the original geometry (is there?) So I think this should be low prio, as it only happens for the "vertex weight mix/edit modifier" and the user can easily work around this issue with said modifiers.
Philipp Oeser removed the
Interest
Modeling
label 2023-02-09 15:28:54 +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
5 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#82771
No description provided.