Sculpt Performance Regression in 2.81 #71434

Closed
opened 3 years ago by Foaly · 15 comments
Foaly commented 3 years ago

System Information
Operating system: Windows 10 64 bit
Graphics card: Nvidia GTX 750 Ti

Blender Version
Broken: blender-2.81 eefd806afc
Worked: blender-2.81 aff6446e06

Short description of error

Sculpting Performance is noticeably worse.
Especially switching brushes lags.

Exact steps for others to reproduce the error
slow_sculpt.blend

  1. Open attached file.
  2. Apply the modifiers on the mesh to get a dense mesh.
  3. Enter sculpt mode.
  4. Start sculpting and switch between brushes with keyboard shortcuts.
  5. Experience lag with the newer version.
**System Information** Operating system: Windows 10 64 bit Graphics card: Nvidia GTX 750 Ti **Blender Version** Broken: blender-2.81 eefd806afc15 Worked: blender-2.81 aff6446e064f **Short description of error** Sculpting Performance is noticeably worse. Especially switching brushes lags. **Exact steps for others to reproduce the error** [slow_sculpt.blend](https://archive.blender.org/developer/F7992862/slow_sculpt.blend) 1. Open attached file. 2. Apply the modifiers on the mesh to get a dense mesh. 3. Enter sculpt mode. 4. Start sculpting and switch between brushes with keyboard shortcuts. 5. Experience lag with the newer version.
Foaly commented 3 years ago
Poster

Added subscriber: @Foaly

Added subscriber: @Foaly
Collaborator

#71457 was marked as duplicate of this issue

#71457 was marked as duplicate of this issue
Collaborator

Added subscriber: @PabloDobarro

Added subscriber: @PabloDobarro
Collaborator

The PBVH rebuilds each time the brush radius changes and while modifying mesh properties. This is probably one of the reasons. 2019-11-09 01-03-16.mp4

I think the problem is in ##BKE_sculpt_update_object_before_eval##. Why is the mesh data updated when changing the brush radius?

The PBVH rebuilds each time the brush radius changes and while modifying mesh properties. This is probably one of the reasons. [2019-11-09 01-03-16.mp4](https://archive.blender.org/developer/F7994005/2019-11-09_01-03-16.mp4) I think the problem is in ##BKE_sculpt_update_object_before_eval##. Why is the mesh data updated when changing the brush radius?

Added subscriber: @Tyler-Foo

Added subscriber: @Tyler-Foo
brecht commented 3 years ago
Owner

Added subscriber: @Thura

Added subscriber: @Thura
ideasman42 was assigned by brecht 3 years ago

Added subscriber: @ebarranco

Added subscriber: @ebarranco

Added subscriber: @jfmatheu

Added subscriber: @jfmatheu
Owner

As noted in D6219 this is caused by 79b703bb63.

Whats happening now is "technically" correct.

  • Brushes & UnifiedPaint request undo.
  • The radial control operator also is flagged to undo.
  • Before writing the memfile undo: sculpt data is flushed to the mesh,
otherwise memfile undo would store & load old mesh data, loosing the users sculpt.

Previously sculpt mode prevented all other undo systems from being used, so even when a change required memfile undo to be written, the undo step was written as a sculpt step which did nothing.


It seems users prefer undo to be disabled for brushes (#60640) so here is a patch that disables that D6240: Avoid undo pushes on brush & unified-paint data (addresses #71434).

From my own testing this works without storing undo steps when changing brush/scene/object settings.

Although operators that enable OPTYPE_UNDO and don't use sculpt-undo will write memfile steps.


Note that the fix for #69822 (Undo is making objects to disappear in sculpt mode) could be reverted, although this re-introduces errors selecting objects while sculpting which mixes up sculpt objects and their undo steps, crashing in some cases.

As noted in [D6219](https://archive.blender.org/developer/D6219) this is caused by 79b703bb63. Whats happening now is "technically" correct. - Brushes & UnifiedPaint request undo. - The radial control operator also is flagged to undo. - Before writing the memfile undo: sculpt data is flushed to the mesh, ``` otherwise memfile undo would store & load old mesh data, loosing the users sculpt. ``` Previously sculpt mode prevented all other undo systems from being used, so even when a change required memfile undo to be written, the undo step was written as a sculpt step which did nothing. ---- It seems users prefer undo to be disabled for brushes (#60640) so here is a patch that disables that [D6240: Avoid undo pushes on brush & unified-paint data (addresses #71434)](https://archive.blender.org/developer/D6240). From my own testing this works without storing undo steps when changing brush/scene/object settings. Although operators that enable `OPTYPE_UNDO` and don't use sculpt-undo will write memfile steps. ---- Note that the fix for #69822 (Undo is making objects to disappear in sculpt mode) could be reverted, although this re-introduces errors selecting objects while sculpting which mixes up sculpt objects and their undo steps, crashing in some cases.
Collaborator

This issue was referenced by c7b7722254

This issue was referenced by c7b77222542ce2e4eda548c51aa33013dddc0480
Owner

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
ideasman42 closed this issue 3 years ago
Leha commented 3 years ago

Added subscriber: @Leha

Added subscriber: @Leha
Leha commented 3 years ago

This problem still exists when changing brush in sculpt mode. Changing brush size is good now.
Changing brush was fast in 2.80 and now its laggy
Exact steps for others to reproduce the error:
Open high poly mesh in sculpt mode and try changing brush

This problem still exists when changing brush in sculpt mode. Changing brush size is good now. Changing brush was fast in 2.80 and now its laggy **Exact steps for others to reproduce the error:** Open high poly mesh in sculpt mode and try changing brush
Owner

Committed changes so brush changes don't perform undo pushes bcff803712 9fff74f144

Committed changes so brush changes don't perform undo pushes bcff803712 9fff74f144
Leha commented 3 years ago

Thanks! Working good now! The only thing is the undo of the first stroke after entering sculpt mode is lagging. If you enter sculpt mode for high poly mesh and make one stroke and then undo is lagging. Don't know if its worth checking

Thanks! Working good now! The only thing is the undo of the first stroke after entering sculpt mode is lagging. If you enter sculpt mode for high poly mesh and make one stroke and then undo is lagging. Don't know if its worth checking
ThomasDinges added this to the 2.81 milestone 2 days ago
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/Collada
Interest/Compositing
Interest/Core
Interest/Cycles
Interest/Dependency Graph
Interest/Development Management
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/Modeling
Interest/Modifiers
Interest/Motion Tracking
Interest/Nodes & Physics
Interest/Overrides
Interest/Performance
Interest/Performance
Interest/Physics
Interest/Pipeline, Assets & I/O
Interest/Platforms, Builds, Tests & Devices
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
legacy module/Animation & Rigging
legacy module/Core
legacy module/Development Management
legacy module/Eevee & Viewport
legacy module/Grease Pencil
legacy module/Modeling
legacy module/Nodes & Physics
legacy module/Pipeline, Assets & IO
legacy module/Platforms, Builds, Tests & Devices
legacy module/Python API
legacy module/Rendering & Cycles
legacy module/Sculpt, Paint & Texture
legacy module/Triaging
legacy module/User Interface
legacy module/VFX & Video
legacy project/1.0.0-beta.2
legacy project/Asset Browser (Archived)
legacy project/BF Blender: 2.8
legacy project/BF Blender: After Release
legacy project/BF Blender: Next
legacy project/BF Blender: Regressions
legacy project/BF Blender: Unconfirmed
legacy project/Blender 2.70
legacy project/Code Quest
legacy project/Datablocks and Libraries
legacy project/Eevee
legacy project/Game Animation
legacy project/Game Audio
legacy project/Game Data Conversion
legacy project/Game Engine
legacy project/Game Logic
legacy project/Game Physics
legacy project/Game Python
legacy project/Game Rendering
legacy project/Game UI
legacy project/GPU / Viewport
legacy project/GSoC
legacy project/Infrastructure: Websites
legacy project/LibOverrides - Usability and UX
legacy project/Milestone 1: Basic, Local Asset Browser
legacy project/Nodes
legacy project/OpenGL Error
legacy project/Papercut
legacy project/Pose Library Basics
legacy project/Retrospective
legacy project/Tracker Curfew
legacy project/Wintab High Frequency
Meta/Good First Issue
Meta/Papercut
migration/requires-manual-verification
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 & Devices
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 Information 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
9 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#71434
Loading…
There is no content yet.