Fix #110021: Deform modifier binding can go wrong in certain stacks #110095
No reviewers
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
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#110095
Loading…
Reference in New Issue
No description provided.
Delete Branch "lichtwerk/blender:110021"
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?
This affected
Mesh Deform
,Corrective Smooth
andLaplacian Smooth
.Exposed by
57ea827bfb
(e5ec04d73c
).Evaluating the incoming mesh can be different in
BKE_object_handle_data_update
as opposed toobject_force_modifier_update_for_bind
due to differentCustomData_MeshMasks
being used (the former used a handpicked set, thelater was still using
CD_MASK_BAREMESH
). But since moving manyrelevant [to modifiers] data to attributes, this could lead to binding go
wrong (e.g. reporting a vertex count mismatch as reported in #110021
which was due to the fact that creases were not propagated and that
changed the output [also vertex count] of a subdivision modifier in the
stack).
Now use
CD_MASK_DERIVEDMESH
inobject_force_modifier_update_for_bind
to get all relevant attributes for evaluation (this is not used in
BKE_object_handle_data_update
to avoid a big performance impact there).
Also fixes #109626 afaict.
Should probably go into 3.6 LTS (maybe even 3.3 LTS).
Can we have a
CD_MASK_EVAL_VIEWPORT
andCD_MASK_EVAL_RENDER
or something like that, to ensure these stay in sync?Not sure about those names (not deep enough into this to really make an educated call), how about
CD_MASK_EVAL_ATTRIBUTES
(seems closer to what it does on first sight?)Ah, I see the issue now, thanks!
Or maybe we could just use
CD_MASK_DERIVEDMESH
here and avoid the complexity of adding masks manually?CD_MASK_DERIVEDMESH
is looking like it does a lot of things, since we want to have them in sync, this would need to be used inBKE_object_handle_data_update
isnt this performance-critical? [I assume we dont needCD_MASK_PAINT_MASK
orCD_MASK_PREVIEW_MLOOPCOL
or stuff like that here?]I suggested
CD_MASK_EVAL_VIEWPORT
because it is the mask used for viewport evaluation of objects. It's about the purpose rather than its contents. Binding needs the same attributes as viewport evaluation.I guess that's fine too and not a real performance problem. Retrieving the mesh for binding doesn't have to be that fast.
We're getting into edge case territory. Not propagating unused attributes isn't really an optimization we can rely on in the near future anyway, since things are becoming generic and the evaluated state of objects is becoming more visible. And like Brecht says, this isn't performance critical.
Made the changes.
note again that in order to have this consistent,
CD_MASK_DERIVEDMESH
is now used inBKE_object_handle_data_update
(depsgraph update) as well, not just in binding!BKE_object_handle_data_update
should not be changed, doing it there will have a big performance impact.This is what I meant in my previous comment.
OK, will change back (in
BKE_object_handle_data_update
), so this will not really be in sync in these two places then, but at least we get the full set in binding, should be no harm I guess...Fix #110021: Deform modifier binding can go wrong in certain stacks.to Fix #110021: Deform modifier binding can go wrong in certain stacks