WIP: Mesh: Improve and simplify modifier evaluation logic #119968

Draft
Hans Goudey wants to merge 19 commits from HooglyBoogly/blender:fix-modifier-eval-geometry-set-improve into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
Member

Fixes #119938

Make use of GeometrySet and implicit sharing to significantly
simplify the handling of mesh evaluation in the modifier stack.
I've tried doing this refactor a few times over the past years.
We may finally be in a good place to do it because face corner
normals are now lazy caches.

TODO: Proper description, testing, resolve edit mesh ownership

One thing to check is whether it's actually okay to store mesh_input
as a read-only mesh in the evaluated geometry set. I would hope so,
but we may be required to store it separately and add some complexity
back, I'm not sure.

Fixes #119938 Make use of GeometrySet and implicit sharing to significantly simplify the handling of mesh evaluation in the modifier stack. I've tried doing this refactor a few times over the past years. We may finally be in a good place to do it because face corner normals are now lazy caches. TODO: Proper description, testing, resolve edit mesh ownership One thing to check is whether it's actually okay to store mesh_input as a read-only mesh in the evaluated geometry set. I would hope so, but we may be required to store it separately and add some complexity back, I'm not sure.
Hans Goudey added 1 commit 2024-03-27 16:48:04 +01:00
115b3f858f Mesh: Improve and simplify modifier evaluation logic
Fixes #119938

Make use of GeometrySet and implicit sharing to significantly
simplify the handling of mesh evaluation in the modifier stack.

TODO: Proper description, testing

One thing to check is whether it's actually okay to store mesh_input
as a read-only mesh in the evaluated geometry set. I would hope so,
but we may be required to store it separately and add some complexity
back, I'm not sure.
Hans Goudey added 3 commits 2024-03-28 04:50:56 +01:00
Hans Goudey added 2 commits 2024-03-28 21:43:24 +01:00
buildbot/vdev-code-daily-lint Build done. Details
buildbot/vdev-code-daily-linux-x86_64 Build done. Details
buildbot/vdev-code-daily-darwin-x86_64 Build done. Details
buildbot/vdev-code-daily-windows-amd64 Build done. Details
buildbot/vdev-code-daily-darwin-arm64 Build done. Details
buildbot/vdev-code-daily-coordinator Build done. Details
90c53d265b
Cleanup: Outliner: Return early, reduce variable scope
Hans Goudey added 2 commits 2024-03-29 02:38:44 +01:00
Hans Goudey added 10 commits 2024-04-03 04:25:52 +02:00
buildbot/vexp-code-patch-lint Build done. Details
buildbot/vexp-code-patch-linux-x86_64 Build done. Details
buildbot/vexp-code-patch-darwin-x86_64 Build done. Details
buildbot/vexp-code-patch-darwin-arm64 Build done. Details
buildbot/vexp-code-patch-windows-amd64 Build done. Details
buildbot/vexp-code-patch-coordinator Build done. Details
f1cf6c22d9
Mesh: Remove unnecessary wrapper_type_finalize logic
After some discussions and investigation over the last couple months,
it's not clear what the "wrapper type finalize" logic is necessary for.
For edit meshes and regular meshes, normals are calculated lazily when
building the draw cache.

Apart from the unnecessary complication for mesh GPU draw data
extraction, this code also causes normals to always be calculated
when turning an edit mesh wrapper into a regular mesh. However, those
normals are immediately discared since the edit deform cache is deleted
in the next line.

Beyond the obvious simplification, the motivation for this change is to
avoid requesting write access on the evaluated mesh and cage mesh. This
works better with implicit sharing, allowing other improvements.
Hans Goudey added 2 commits 2024-04-23 21:09:24 +02:00
Hans Goudey changed title from Mesh: Improve and simplify modifier evaluation logic to WIP: Mesh: Improve and simplify modifier evaluation logic 2024-04-24 22:11:21 +02:00
This pull request is marked as a work in progress.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u fix-modifier-eval-geometry-set-improve:HooglyBoogly-fix-modifier-eval-geometry-set-improve
git checkout HooglyBoogly-fix-modifier-eval-geometry-set-improve
Sign in to join this conversation.
No reviewers
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
1 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#119968
No description provided.