Mesh Deform Modifier Vertex Count Error #110021

Closed
opened 2023-07-12 19:21:20 +02:00 by Jaggz H · 9 comments

System Information
Operating system: Debian Stable
Graphics card: Nvidia Geforce 3090

Blender Version
Broken: 4.0.0 Alpha, branch: main (modified), commit date: 2023-06-29 23:21, hash: f47eed749e, type: Release
Broken: 3.4
Worked: 3.3 LTS

Caused by 57ea827bfb

Short description of error
Mesh Deform has multiple bugs. This post addresses one:

  • Vertex counts change immediately upon Binding

Exact steps for others to reproduce the error

  1. Load .blend
  2. Click Unbind then Bind again
  3. See vertex count mismatch error

** Additional notes: **

  1. Apply Mirror modifier
  2. Unbind and Bind again
  3. See no verts_num mismatch error
**System Information** Operating system: Debian Stable Graphics card: Nvidia Geforce 3090 **Blender Version** Broken: 4.0.0 Alpha, branch: main (modified), commit date: 2023-06-29 23:21, hash: f47eed749eaf, type: Release Broken: 3.4 Worked: 3.3 LTS Caused by 57ea827bfb28eb697b74dbc606facbc133e10fab **Short description of error** Mesh Deform has multiple bugs. This post addresses one: * Vertex counts change immediately upon Binding **Exact steps for others to reproduce the error** 1. Load .blend 2. Click Unbind then Bind again 3. See vertex count mismatch error ** Additional notes: ** 1. Apply Mirror modifier 2. Unbind and Bind again 3. See no verts_num mismatch error
126 KiB
Jaggz H added the
Type
Report
Status
Needs Triage
Priority
Normal
labels 2023-07-12 19:21:21 +02:00
Member

3.3 LTS seems fine, will check when behavior changed

3.3 LTS seems fine, will check when behavior changed
Philipp Oeser added
Status
Confirmed
and removed
Status
Needs Triage
labels 2023-07-13 08:46:35 +02:00
Member

Thanks for the report. Can confirm. As far as I can see, object only has 320 vertices. Not sure why it shows 342
I might be missing something. Will leave this report for others to triage.

edit: Did not refresh the page before commenting 😅

~~Thanks for the report. Can confirm. As far as I can see, object only has 320 vertices. Not sure why it shows 342 I might be missing something. Will leave this report for others to triage.~~ edit: Did not refresh the page before commenting 😅
Member

Seems the subd modifier is responsible for the vertex count mismatch (if Use Creases is used)

Seems the subd modifier is responsible for the vertex count mismatch (if `Use Creases` is used)
Member

Caused by 57ea827bfb

CC @HooglyBoogly

Caused by 57ea827bfb28eb697b74dbc606facbc133e10fab CC @HooglyBoogly
Philipp Oeser added
Module
Modeling
Priority
High
and removed
Priority
Normal
labels 2023-07-13 10:16:21 +02:00
Hans Goudey self-assigned this 2023-07-13 19:44:59 +02:00
Hans Goudey removed their assignment 2023-07-13 19:46:52 +02:00
Member

This is because the mirror modifier deleted the crease before that commit. Now that it doesn't delete the crease, the results of the subdivision surface modifier are different. But that's just an unfortunate consequence of the changed (fixed) behavior. Though obviously we try to avoid it, sometimes changes in Blender will change the number of vertices generated. The way that interacts with binding is unfortunate but I don't think we can do anything about it in this case.

This is because the mirror modifier deleted the crease before that commit. Now that it doesn't delete the crease, the results of the subdivision surface modifier are different. But that's just an unfortunate consequence of the changed (fixed) behavior. Though obviously we try to avoid it, sometimes changes in Blender will change the number of vertices generated. The way that interacts with binding is unfortunate but I don't think we can do anything about it in this case.
Blender Bot added
Status
Archived
and removed
Status
Confirmed
labels 2023-07-13 19:49:45 +02:00
Member

Hold on, are you saying we cannot use this kind of modifier stack anymore?
Because it also doesnt work if you unbind/bind - or even delete and a re-add - the mesh deform modifier.

Hold on, are you saying we cannot use this kind of modifier stack anymore? Because it also doesnt work if you unbind/bind - or even delete and a re-add - the mesh deform modifier.
Blender Bot added
Status
Needs Triage
and removed
Status
Archived
labels 2023-07-13 20:13:02 +02:00
Member

I don't know how it worked before then, or even how we expect the mesh deform modifier to work when there are "generative" modifiers that change the vertex count before it. Anyway, it seems like if that commit actually did change this behavior, the only reason is because the mesh deform modifier can't handle this situation, but it just happened to work before.

I don't know how it worked before then, or even how we expect the mesh deform modifier to work when there are "generative" modifiers that change the vertex count before it. Anyway, it seems like if that commit actually did change this behavior, the only reason is because the mesh deform modifier can't handle this situation, but it just happened to work before.

Possibly related: #108819

Possibly related: https://projects.blender.org/blender/blender/issues/108819
Member

I don't know how it worked before then, or even how we expect the mesh deform modifier to work when there are "generative" modifiers that change the vertex count before it. Anyway, it seems like if that commit actually did change this behavior, the only reason is because the mesh deform modifier can't handle this situation, but it just happened to work before.

This should all work with generative modifiers before it.
The reason the commit broke the behavior is that 57ea827bfb (and later e5ec04d73c) changed the CustomData_MeshMasks in BKE_object_handle_data_update, but not in object_force_modifier_update_for_bind (this was still using CD_MASK_BAREMESH -- which is probably not appropriate anymore since moving so many relevant [to modifiers] data to attributes).

This not only affected the Mesh Deform modifier btw., but also Corrective Smooth and Laplacian Smooth (if Bind Coords are used)

Will put up a PR that fixes this by matching the masks in both places.

> I don't know how it worked before then, or even how we expect the mesh deform modifier to work when there are "generative" modifiers that change the vertex count before it. Anyway, it seems like if that commit actually did change this behavior, the only reason is because the mesh deform modifier can't handle this situation, but it just happened to work before. This should all work with generative modifiers before it. The reason the commit broke the behavior is that 57ea827bfb (and later e5ec04d73c78) changed the `CustomData_MeshMasks` in `BKE_object_handle_data_update`, but not in `object_force_modifier_update_for_bind` (this was still using `CD_MASK_BAREMESH` -- which is probably not appropriate anymore since moving so many relevant [to modifiers] data to attributes). This not only affected the `Mesh Deform` modifier btw., but also `Corrective Smooth` and `Laplacian Smooth` (if Bind Coords are used) Will put up a PR that fixes this by matching the masks in both places.
Philipp Oeser added
Status
Confirmed
and removed
Status
Needs Triage
labels 2023-07-14 10:44:51 +02:00
Philipp Oeser self-assigned this 2023-07-14 10:44:55 +02:00
Hans Goudey added
Type
Bug
and removed
Type
Report
labels 2023-07-16 05:17:00 +02:00
Blender Bot added
Status
Resolved
and removed
Status
Confirmed
labels 2023-07-17 09:32:31 +02:00
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
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
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
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#110021
No description provided.