Sculpt: Add fast solver option for trim operations #119699

Merged
Hans Goudey merged 4 commits from Sean-Kim/blender:fast-trim-option into main 2024-03-26 17:25:16 +01:00
Contributor

This PR introduces the ability for users to switch between boolean solvers while using the sculpt Trim tools (Box Trim & Lasso Trim) much like the mesh boolean modifier and geometry node. Because the Exact solver has performance issues with larger meshes, the Fast solver is set to be the default.

In my very rough timing tests on my laptop on a mesh with 1.7m vertices, a Trim operation with the Fast solver finishes in roughly 20 seconds as opposed to still being in progress after five minutes with the Exact solver.

fast-trim.gif

Addresses part of #84229

This PR introduces the ability for users to switch between boolean solvers while using the sculpt *Trim* tools (*Box Trim* & *Lasso Trim*) much like the mesh boolean modifier and geometry node. Because the *Exact* solver has performance issues with larger meshes, the *Fast* solver is set to be the default. In my very rough timing tests on my laptop on a mesh with **1.7m** vertices, a *Trim* operation with the *Fast* solver finishes in roughly 20 seconds as opposed to still being in progress after five minutes with the *Exact* solver. ![fast-trim.gif](/attachments/0d2fe819-14c0-4169-bb55-35af2f823337) Addresses part of #84229
Sean Kim added 1 commit 2024-03-20 15:56:06 +01:00
buildbot/vexp-code-patch-darwin-x86_64 Build done. Details
buildbot/vexp-code-patch-darwin-arm64 Build done. Details
buildbot/vexp-code-patch-linux-x86_64 Build done. Details
buildbot/vexp-code-patch-windows-amd64 Build done. Details
buildbot/vexp-code-patch-coordinator Build done. Details
fd4a3308fe
Sculpt: Add fast solver option for trim operations
Sean Kim requested review from Hans Goudey 2024-03-20 15:56:48 +01:00
Sean Kim requested review from Daniel Bystedt 2024-03-20 15:57:07 +01:00
Iliya Katushenock added this to the Sculpt, Paint & Texture project 2024-03-20 16:07:21 +01:00
Member

@blender-bot package

@blender-bot package
Member

Package build started. Download here when ready.

Package build started. [Download here](https://builder.blender.org/download/patch/PR119699) when ready.
Member

Excellent! This works like a charm. I like that you set the fast bool mode as default, since it really speeds up things.

Excellent! This works like a charm. I like that you set the fast bool mode as default, since it really speeds up things.
Daniel Bystedt approved these changes 2024-03-26 00:21:53 +01:00
Sean Kim added 1 commit 2024-03-26 00:56:36 +01:00
Hans Goudey approved these changes 2024-03-26 03:31:57 +01:00
Dismissed
Hans Goudey reviewed 2024-03-26 03:33:17 +01:00
@ -608,1 +639,4 @@
nullptr);
RNA_def_enum(
ot->srna, "trim_solver_mode", solver_modes, int(SolverMode::Fast), "Solver Mode", nullptr);
Member

How about just trim_solver instead of adding mode at the end? That would be more consistent with the equivalent property on the boolean node and modifier.

How about just `trim_solver` instead of adding `mode` at the end? That would be more consistent with the equivalent property on the boolean node and modifier.
Sean-Kim marked this conversation as resolved
Sean Kim added 1 commit 2024-03-26 06:44:23 +01:00
Hans Goudey reviewed 2024-03-26 14:14:29 +01:00
@ -608,1 +639,4 @@
nullptr);
RNA_def_enum(
ot->srna, "trim_solver", solver_modes, int(SolverMode::Fast), "Solver Mode", nullptr);
Member

Sorry I wasn't clearer, I think the property name should just be "Solver" too

Sorry I wasn't clearer, I think the property name should just be "Solver" too
Sean-Kim marked this conversation as resolved
Sean Kim added 1 commit 2024-03-26 17:21:06 +01:00
Hans Goudey approved these changes 2024-03-26 17:22:39 +01:00
Hans Goudey merged commit 881178895b into main 2024-03-26 17:25:16 +01:00
Sean Kim deleted branch fast-trim-option 2024-03-26 17:27:09 +01:00
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
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 Assignees
4 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#119699
No description provided.