Free, open-source 3D sculpting for Linux, macOS and Windows: dense meshes, remeshing, painting, built-in AI (image/text to 3D), Send to Unreal, game-ready LODs, Gaussian splats and OpenUSD.
C++ 3d3d-sculptingcppdear-imguidigital-sculptingfbxgame-developmentgaussian-splattinggltfimage-to-3dmcpopenglopenusdsculptingtext-to-3dunreal-engine
Docs: the big-brush performance pass (performance.md with method and before/after, What's New, CHANGELOG)
islandmed4281c4cf13e7
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex da87f601..754ed25e 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -6,6 +6,27 @@ All notable changes to SculptForge are listed here. The format follows## [Unreleased]+### Changed+- Large brushes on dense meshes are faster and stay closer to the pointer. Measured on a 21M-triangle sphere+ with a 200 px brush (`--measure-stroke 3,200`, M1 Pro):++ | | 0.9.6 | Now |+ |---|---|---|+ | Frame | 98 ms | 65 ms |+ | Brush behind the pointer, mean / worst | 293 / 544 px | 137 / 189 px |+ | Press to first dab on screen | 361 ms | 157 ms |+ | Release | 990 ms | 67-130 ms |++ The 33M-triangle benchmark's large Standard dab goes from 44.6 to 41.8 ms; the other rows are unchanged.+ - The stroke queue keeps about 50 ms of dabs, at least 4 (it kept at least 24: a second of work behind the+ pointer at 21M, all placed on release).+ - The BVH refit of a big dab recomputes the ancestors of its leaves in parallel (13 ms on one thread before).+ - A dab's normals are recomputed for the corners of the BVH leaves its queries listed instead of every moved+ vertex's neighbour ring (7 ms a dab on levels made by Divide).+ - The GPU upload sends the changed blocks until three quarters of the mesh changed (it re-sent the whole+ mesh above a quarter: 78 ms a frame against 14-30), and finds them in parallel (3.7 -> 0.4 ms).+ - Starting a stroke no longer re-uploads the whole mesh when there are no LODs.+## [0.9.6] - 2026-10-31The same evening as 0.9.5, the next batch from your reports and from askNK's review: Extract and Mirror And Weld,diff --git a/docs/guide/performance.md b/docs/guide/performance.mdindex 70b85e5d..64dd27f9 100644--- a/docs/guide/performance.md+++ b/docs/guide/performance.md@@ -102,8 +102,8 @@ updating when it should (a driver that misbehaves), start SculptForge with the eOn a very dense mesh a dab can cost more than a frame. The dabs of a stroke then wait in a queue thatSculptForge works through for a few milliseconds each frame, reading the pen or mouse in between, so a fast-curve stays a curve; if the brush falls far behind, every second waiting dab is left out (a wider spacing)-so it catches up. `sculptforge --run "new_sphere" --measure-stroke 3,200` draws a fast circle for three seconds+curve stays a curve; once more than about 50 ms of dabs are waiting, every second waiting dab is left out (a+wider spacing), so the brush stays close to the pointer and stops soon after you lift the pen. `sculptforge --run "new_sphere" --measure-stroke 3,200` draws a fast circle for three secondswith a 200-pixel brush and prints how far the dabs strayed from it and the frame times.`SF_STROKE_IMMEDIATE=1` places every dab as soon as the pointer moves (versions before 0.9.6),`SF_STROKE_BACKLOG=0` never leaves dabs out, and `SF_STROKE_LOG=1` logs the queue each frame.diff --git a/docs/guide/whats-new.md b/docs/guide/whats-new.mdindex b23d9b8a..419858df 100644--- a/docs/guide/whats-new.md+++ b/docs/guide/whats-new.md@@ -5,6 +5,15 @@ chapter opens by itself the first time you start a new version; you can always f**Help > What's New**. Every detail is in the[changelog](https://github.com/islandmed/SculptForge/blob/main/CHANGELOG.md).+## Next version++### Faster big brushes on dense meshes++A large brush on a model of 20 million triangles or more keeps up much better: on a 21-million-triangle sphere+with a 200-pixel brush, the brush now trails the pointer by half as far, a frame takes a third less time, the+first dab appears in half the time, and lifting the pen no longer pauses for up to a second while waiting dabs+are placed. See [Performance](performance.md).+## Version 0.9.6### Extractdiff --git a/docs/performance.md b/docs/performance.mdindex 6f58d362..2856f75d 100644--- a/docs/performance.md+++ b/docs/performance.md@@ -12,6 +12,63 @@ sculptforge-cli --bench ... # the same without the GPU (CI,Machine for all figures: Apple M1 Pro (8 performance + 2 efficiency cores, 32 GB unified memory, 30 GB usableunder Asahi Linux), integrated GPU, Mesa 26.1 (OpenGL 4.6). How the benchmark works is described under v0.5 below.+## Next version: big brushes on dense meshes (feat/perf-pass)++What a user feels on a heavy model is a large brush: how far it trails the pointer, how long a frame takes, and+what happens on press and release. Measured with the stroke the app draws itself (pointer read once per pass of+the loop, as a busy program gets it):++```+sculptforge --run "new_sphere subdivisions=10; subdiv_divide; subdiv_divide" --measure-stroke 3,200+```++A 21M-triangle sphere (10.5M vertices, two levels made by Divide), a 200 px brush (about 3.3M vertices per+dab, X symmetry), a fast two-turn circle in 3 s. M1 Pro, Release build; repeated runs agree within a few ms.++| | 0.9.6 | After |+|---|---:|---:|+| Frame, mean / worst | 98 / 182 ms | **65 / 111 ms** |+| Brush behind the pointer, mean / worst | 293 / 544 px | **137 / 189 px** |+| Press to the first dab on screen | 361 ms | **157 ms** |+| Release | 990 ms | **67-130 ms** |+| Dabs off the circle, worst | 6.9 px | 2.6 px |++Where a frame's time went in 0.9.6 (timers around each step): the dab 50-72 ms (normals 18-29, BVH refit+17-23, brush 14-18), the renderer's sync 28-78 ms, the draw about 1 ms. What changed, in order of what it saved:++1. **The stroke queue's floor.** The backlog limit was about 50 ms of dabs but never fewer than 24; at 45 ms a+ dab that is a second of work behind the pointer, and releasing placed all of it. The floor is 4 now+ (`strokeBacklogLimit`, core/StrokePath.h). Light meshes are unchanged (the time limit allows hundreds).+2. **Upload: changed blocks up to three quarters.** `UploadOrder::dirtyRuns` sent the whole mesh once a quarter+ of the vertices changed; a 200 px brush changes about a third, so every frame re-packed 10.5M vertices+ (cavity included): 78 ms. The changed blocks now: 14-30 ms.+3. **BVH refit.** The leaf boxes were recomputed in parallel but each leaf's ancestors walked up on one thread:+ 6.5 ms per mirror. With 4,096+ leaves the ancestors are flagged in parallel and recomputed from their children+ in parallel subtrees (`BVH::refitAncestors`): BVH 21-23 -> 8.5 ms a dab; at 33M (benchmark, large+ Standard) 5.4 -> 2.9 ms.+4. **Press.** Starting a stroke cleared the LODs even when there were none, which made the renderer treat the+ mesh as new: a full upload of positions and faces before the first dab showed.+5. **Normals.** The vertices to recompute were each moved vertex and its neighbour ring; on levels made by+ Divide the ring is worked out per vertex (7.3 ms of the 22). Now the corners of the triangles in the BVH leaves+ the dab's queries listed (a superset: every triangle with a moved vertex is in one). Frames 71 -> 65 ms.+6. **Upload runs.** `dirtyRuns` walked the changed vertices on one thread (3.7 ms); with 65,536+ it marks the+ GPU blocks in parallel (0.4 ms).++Tried and dropped: keeping each triangle's corners from `clusterBounds`' first pass for its radius pass (the+culling bounds, 9 ms a frame here): no faster (8.7 against 8.8-9.8 ms), the pass is bound by memory, not by the+second read.++33M benchmark (`--bench --bench-sizes 33 --bench-no-project`): large Standard dab 44.6 -> 41.8 ms; every other row+within run-to-run noise (the benchmark's dabs touch 7% of the mesh, so the upload and queue changes don't show+there).++What a frame still costs at 21M with this brush: the dab about 45-50 ms (normals about 15 ms computing, brush+about 17 ms, BVH about 8.5 ms) and the sync about 28 ms (upload about 19 ms, of which the cavity term about a+quarter; culling bounds about 9 ms). Each step is already parallel and scales with the 3.3M vertices under the+brush; the next gains need a sampling profiler (perf) to see where the loops stall. Candidates: the cavity term+computed in the normals pass instead of from each vertex's ring at upload, face normals shared between a+triangle's corners, the double-precision volume in `clusterBounds`.+## v0.9: Make sculptable (feat/sculptable)Splat capture to a sculptable SubTool (`splat_to_mesh`, core/Sculptable.h): the built-in test head capturediff --git a/tests/ui/whats_new.sfui b/tests/ui/whats_new.sfuiindex 74204713..939b0fbe 100644--- a/tests/ui/whats_new.sfui+++ b/tests/ui/whats_new.sfui@@ -4,9 +4,10 @@ click "Help##palette.help"click "What's New##help.whats_new"expect_value guide_open == 1expect_guide whats-new.md+expect_text "Next version"+expect_text "Faster big brushes on dense meshes"expect_text "Version 0.9.6"expect_text "Extract"-expect_text "Mirror And Weld"expect_text "Version 0.9.5"expect_text "Version 0.9.4"expect_text "Version 0.9.3"@@ -20,5 +21,5 @@ expect_text "Version 0.6"expect_text "Version 0.5"expect_text "Version 0.4.2"# The newest section is on screen.-expect_text "Mirror And Weld"+expect_text "Faster big brushes on dense meshes"shot whats-new