Fix #120761: Tag all PBVH nodes for needing a visibility update when using hide tools #120798
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
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#120798
Loading…
Reference in New Issue
No description provided.
Delete Branch "Sean-Kim/blender:fix-120761"
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 PR changes behavior in the Sculpt mode Hide Gesture tools to always tag every PBVH node for a visibility update to avoid faces not updating when they are on the boundary of different nodes.
Alternate Approaches
I think this is actually an important optimization. Changing visibility should feel very snappy, even with meshes that have millions of faces. This requires rebuilding the GPU buffers for every single PBVH node. For reference, the change was made in
4e66769ec0
, and a significant part of the performance improvement comes from not rebuilding the GPU buffers.It's not just that this optimization in particularly is that important though, but I think it helps us to learn about how to do these operations in a non-global way. Some ideas:
face_hide_update
)Testing which of those is fastest for cases like hiding a small portion of a 16 million vertex mesh might be fun. I can take this over though if it sounds like too much.
Thanks for the further context on the GPU side of things. I wasn't aware of the follow up changes that this would cause - I can try tackling & thinking about the different approaches.
In general, one of the things about this area of code that I'd like to try and minimize is needing to remember to tag the PBVH node for visibility updates in the higher level operator code since that seems like an area that can easily have regressions. This makes me not inclined to explore 2. in a lot of depth as I feel like that goes in the opposite direction, but I'd be interested in hearing your thoughts on this too.
Edit: Didn't mean to link to that random issue.
I agree with not requiring visibility updates outside of
vert_hide_update
. But I don't think option 2 requires that.vert_hide_update
would just contain a second loop over nodes and would run the vertex -> face visibility propagation there, tagging the node if anyhide_poly
value changed.I should have explained my reasoning a bit further - my thoughts were a bit incomplete when I made that comment. I believe that duplicating / mirroring logic that exists inside the
bke::mesh_hide_vert_flush
function intovert_hide_update
seems like an unnecessary amount of overlap in functionality.Checkout
From your project repository, check out a new branch and test the changes.