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
Perf moonshots: merge main, Live Move cavity term, mid-drag UI test, ghost in UI-test frames, notes for 0.10.9, paused report
islandmed11d4e94067da
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 049bfc6c..e3356458 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -6,6 +6,22 @@ All notable changes to SculptForge are listed here. The format follows## [Unreleased]+### Added+- Experimental, off by default (Preferences > Performance): **Live Move** draws a Move drag on the GPU from the grab's+ start positions and applies the whole move once at pen lift (one grab, equal to the per-frame grabs to 1e-6;+ falls back with masks, hidden faces, sculpt layers, micro levels, Connected Only or View falloff;+ `SF_LIVE_MOVE=0/1`); **Background Preview** draws the predictive preview for background dabs and no longer waits+ for a batch within the frame (the solver's dabs are unchanged; `SF_BG_GHOST=0/1`). `SF_PERSISTENT_UPLOAD=1`+ (developers): stroke uploads pack into persistently mapped staging buffers and are copied on the GPU.+ Research and measurements: docs/design/perf-moonshots.md.++### Changed+- Large brushes on dense meshes no longer stall the view: from 2 million vertices a stroke's dabs are placed on the+ stroke thread (the same dabs, in the same order, as the frame loop places them; no preview), so a frame keeps+ drawing while a 240 px dab moves millions of vertices, and a light batch is still waited for within the frame.+ On the standard scene's 240 px brush the slowest frames drop from 139 ms (15M) and 306 ms (33M) to about 30 ms in+ first runs, and lifting the pen no longer waits (162 ms at 33M). `SF_BACKGROUND_DABS=0` turns it off.+## [0.10.8] - 2026-11-02### Fixed@@ -16,11 +32,6 @@ All notable changes to SculptForge are listed here. The format follows## [0.10.7] - 2026-11-01### Changed-- Large brushes on dense meshes no longer stall the view: from 2 million vertices a stroke's dabs are placed on the- stroke thread (the same dabs, in the same order, as the frame loop places them; no preview), so a frame keeps- drawing while a 240 px dab moves millions of vertices, and a light batch is still waited for within the frame.- On the standard scene's 240 px brush the slowest frames drop from 139 ms (15M) and 306 ms (33M) to about 30 ms in- first runs, and lifting the pen no longer waits (162 ms at 33M). `SF_BACKGROUND_DABS=0` turns it off.- The membership card at launch is redesigned: the cube mark and the promise up top, the three memberships side byside with their perks checked off and one bold button each (Insider highlighted), and the members' Discord in thefooter. It takes the current look's colours and opens in 150 ms. "Maybe later" now hides it for 30 days, updatesdiff --git a/REPORT.md b/REPORT.mdindex d6fa0a32..03af3445 100644--- a/REPORT.md+++ b/REPORT.md@@ -1,10 +1,10 @@-# research/perf-moonshots: PAUSED (usage stop), not pushed, NOT green-verified-Status: 0.10.8 slice built (Release build OK), committed locally; no full ctest, no benchmarks yet (load never < 2).-Done: three flagged prototypes on top of perf/bigbrush-p99 (merged in): Live Move (Prefs > Performance "Live Move (Experimental)", SF_LIVE_MOVE; GPU draws the Move drag via GhostKind::Move, one exact grab at release), Background Preview (Prefs toggle, SF_BG_GHOST; ghost on the background-dab path, frame no longer waits), Persistent upload (SF_PERSISTENT_UPLOAD only; GL_ARB_buffer_storage staging + glCopyBufferSubData + fences). Prefs saved in ui.json, Spanish strings, UiTest values live_move/background_preview.-Tests: unit live_move_matches_the_grab passes (preview 1e-5, single grab vs per-frame 1e-6); ghost tests pass. NOT yet run: tests/ui/live_move.sfui, ui_stroke_background_preview, ui_stroke_persistent_upload (CMakeLists.txt), full ctest.-Doc: docs/design/perf-moonshots.md (research with citations, ideas 1-8 incl. Focus Detail, ZBrush public-docs comparison); MEASUREMENTS and RECOMMENDATION placeholders still to fill.-Next steps to resume:-1. `cd build && SDL_APP_ID=sculptforge-agent nice -n 19 ionice -c3 ctest -R "ui_live_move|ui_stroke_background|ui_stroke_persistent|ghost" --output-on-failure`; fix, then full ctest -j3 (one machine-wide).-2. At load < 2: scratchpad bench.sh pattern = `--benchmark standard-33m --benchmark-no-video` for A (no env), SF_BG_GHOST=1, SF_LIVE_MOVE=1, SF_PERSISTENT_UPLOAD=1, all; interleave A/all twice. Fill docs MEASUREMENTS/RECOMMENDATION (expect: Move fps, preview_lag_px vs lag_px, commit ms). Keep persistent upload env-only unless it gains.-3. CHANGELOG [Unreleased] + What's New 0.10.8 lines (two Experimental toggles, off by default), push branch when green, update this report with numbers + SHA, message coordinator.-Coordination: focusdetail agent (research/focus-detail) owns idea 8 data side; asked it to expose FocusDetail::tileLevel(tri) and report promotion latency/RSS/GPU MB at 1B.+# research/perf-moonshots: PAUSED by coordinator (not in 0.10.9), local commits only, not pushed+Status: branch = perf/bigbrush-p99 + origin/main (merged 11-02) + three flagged prototypes. Last full build OK before the final fix; the last edit (runRecording calls buildGhost) is NOT yet built or tested.+Done: Live Move + Background Preview as "(Experimental)" toggles in Preferences > Performance (off by default; SF_LIVE_MOVE / SF_BG_GHOST override); SF_PERSISTENT_UPLOAD env-only. Live Move preview now has the cavity term. UI test `stroke ... hold` verb (Demo::stroke hold) for mid-drag checks. CHANGELOG [Unreleased] + What's New "## Version 0.10.9" + guide performance.md rows + TESTERS.md written (bigbrush's notes moved out of the released 0.10.7/0.10.8 sections, since its code isn't on main).+Tests passed: unit live_move_matches_the_grab, ghost tests; ui_live_move (3x, before the hold step), ui_stroke_background(_preview), ui_stroke_persistent_upload, ui_performance, ui_stroke_path. NOT run: full ctest; benchmarks (load never < 2).+Open bug found: UI tests' loop (App::runRecording) never called buildGhost, so the mid-drag screenshot showed no preview; fixed in source (App.cpp, after updateMouseCursor), unverified. The real app's run() loop already calls it.+Doc: docs/design/perf-moonshots.md: research + ideas 1-8 + Focus Detail with focusdetail's measured data (6184559); MEASUREMENTS / RECOMMENDATION placeholders remain.+Resume:+1. `cd build && ~/Work/.sf/heavy.sh cmake --build . -j3`, then `SDL_APP_ID=sculptforge-agent ~/Work/.sf/heavy.sh ctest -R "ui_live_move|ui_stroke_" --output-on-failure`; LOOK at ui-shots/live_move/live_move_dragging.png (preview must match live_move.png), then full ctest via heavy.sh.+2. At load < 2: `--benchmark standard-33m --benchmark-no-video` A vs SF_BG_GHOST=1 / SF_LIVE_MOVE=1 / SF_PERSISTENT_UPLOAD=1 / all, interleaved; fill doc numbers; move the What's New lines to the target version.+3. Push when green, update this report with SHA, message the coordinator.diff --git a/TESTERS.md b/TESTERS.mdnew file mode 100644index 00000000..7a8cf6f4--- /dev/null+++ b/TESTERS.md@@ -0,0 +1,5 @@+# Testers (0.10.9): experimental performance toggles (Preferences > Performance, both off by default)+- **Live Move**: turn it on, use the Move brush on a dense model (Help > Benchmark's head, or anything over ~10M triangles), drag big and fast. The drag should follow the pen smoothly; after you lift, the shape must stay exactly where the preview left it (no jump). Try with X symmetry, then undo / redo.+- **Live Move fallbacks**: with a mask, hidden parts, a sculpt layer or a micro level, Move should behave exactly as before (no preview, no errors).+- **Background Preview**: turn it on, sculpt with a 200-300 px Clay / Standard brush on a 15M+ model. The stroke should stay under the pen instead of trailing; lifting the pen should be instant and the final result look the same as with it off.+- Report: GPU and driver, triangle count, anything that flickers, vanishes for a frame, or looks different after the pen lifts (a screenshot of the area helps).diff --git a/docs/design/perf-moonshots.md b/docs/design/perf-moonshots.mdindex 1d197dc0..922277fb 100644--- a/docs/design/perf-moonshots.md+++ b/docs/design/perf-moonshots.md@@ -135,6 +135,12 @@ micro level (or compressed on disk), and the GPU draws each tile at its own leve(docs/performance.md: Standard 64 px on 1.02B Micro 5 is 39 ms a step, 300 px 283 ms); drawing stays boundedby the screen. **A billion-triangle asset, editable locally at interactive rates on a 16 GB laptop**, is theclaim to test; nothing here is measured yet, so no public claim until it is.+- **Measured on the data side** (`research/focus-detail` @ 6184559, docs/design/focus-detail.md §5.1; 1B+ triangles, shared machine, load ~4): promoting one tile 0.041 ms p50 / 0.051 ms p99, 65.5K tiles/s in parallel;+ RSS 1147 MB with the focus on against 1526 MB with every tile at full level; GPU memory (estimated) 3130 MB with+ today's renderer against 597 MB with per-tile resident levels (`FocusDetail::tileLevel(tri)` is in). So+ promotion is far below a frame (a few hundred tiles a frame while orbiting is ~10 ms on one thread, ~5 ms spread+ over the pool); the GPU side (per-tile levels in the MicroRenderer) is what turns the estimate into the 5x saving.- **Difference from (c)**: the focus follows the brush automatically (no mode to enter), the coarse remainder isthe same surface at a lower micro level (not a separate HD layer), and GPU memory follows focus + screen.diff --git a/docs/guide/performance.md b/docs/guide/performance.mdindex 47777c06..fe4a5a4c 100644--- a/docs/guide/performance.md+++ b/docs/guide/performance.md@@ -40,6 +40,8 @@ Open **Preferences** and click **Performance**.| **Fast Navigation** | While you rotate, pan or zoom a scene bigger than the hardware profile's motion proxy threshold (see below), draw it without antialiasing and draw big meshes as a lighter version with about a fifth of their triangles, so the view keeps up. The full mesh, smooth again, is back as soon as the view stops. On by default || **Predictive Strokes** | The brush is worked out on its own thread while the view keeps drawing at full speed. The dabs it hasn't finished show at once as a preview on the surface, and the brush cursor and the stroke's head are drawn where the pen is about to be, so on a heavy mesh the surface moves under the pen straight away and lifting the pen never waits. The finished sculpt is exactly the same as with it off. On by default (painting, masking, dynamic topology, Move, Tendril and the drag strokes work as before) || **Draft Strokes** | With Predictive Strokes: while you sculpt, the brush only moves the surface, the moved part is shaded from its facets, and the smooth shading, the cavities and the rest are worked out once when you lift the pen. Lighter on laptops and on battery. Inflate and the plane brushes use the surface's direction from the stroke's start, so the result can differ slightly from a full stroke. Off by default |+| **Live Move** (experimental) | The Move brush's drag is drawn by the graphics card from where the surface started, so it follows the pen at the view's frame rate on any mesh size; the move is applied once, exactly, when you lift the pen. Not with masks, hidden parts, sculpt layers, micro levels, Connected Only or View falloff (Move works as before there). Off by default |+| **Background Preview** (experimental) | On meshes of 2 million vertices or more a big brush is worked out on its own thread; with this on, the dabs still being worked out show as a preview under the pen. The finished sculpt is exactly the same either way. Off by default || **Multithreading** | Run brushes, normal and picking updates and project saving on every core (the number of threads is shown beside it). The results are exactly the same with it off; turn it off only to compare speeds or rule it out when something goes wrong || **Last stroke** | What your last stroke cost per dab: **Brush** (finding and moving the vertices), **Normals** (shading), **BVH** (the structure that finds the surface under the cursor), and the **GPU upload** per frame || **Memory** | What the scene holds: the meshes, the BVHs, the subdivision levels kept for stepping between them, the undo history (up to 1 GB; the oldest steps are dropped beyond that) and, roughly, the graphics card's buffers |diff --git a/docs/guide/whats-new.md b/docs/guide/whats-new.mdindex fa262573..ebcc9d3e 100644--- a/docs/guide/whats-new.md+++ b/docs/guide/whats-new.md@@ -5,12 +5,21 @@ 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).-## Version 0.10.8+## Version 0.10.9- **Big brushes stay smooth on dense meshes**: on models from about 4 million triangles a stroke's dabs are workedout beside the view, so a 240 px brush on 33 million triangles no longer freezes the view for a third of asecond at a time (slowest frames about 35 ms instead of 300), and letting go of the pen is instant. The strokeitself comes out the same.+- **Live Move (experimental)**: Preferences > Performance > Live Move. The graphics card draws the Move brush's+ drag from where the surface started, so it keeps up with the pen on any mesh size, and the move is applied once,+ exactly, when you lift the pen ([Performance](performance.md)).+- **Background Preview (experimental)**: Preferences > Performance > Background Preview. On dense meshes the dabs a+ big brush is still working out show as a preview under the pen, so the stroke no longer trails behind it. The+ finished sculpt is the same either way.++## Version 0.10.8+- **Tablets in mouse mode work again**: on some Windows tablets with **Mouse mode** on (Preferences > Tablet) thebrush stopped following the pen in 0.10.7. When the system can't say where its cursor is, the pen now moves thebrush by how far it moves, from where it was (#72).diff --git a/src/app/App.cpp b/src/app/App.cppindex bff37ffa..3aaf0c87 100644--- a/src/app/App.cpp+++ b/src/app/App.cpp@@ -625,6 +625,7 @@ int App::runRecording() {demo_->drawOverlay();ImGui::Render();updateMouseCursor();+ buildGhost(); // (the stroke preview, as run() draws it)syncScene();++frames;@@ -3408,3 +3409,4 @@ void App::drawBrushCursor() {}} // namespace sf+diff --git a/src/app/AsyncStroke.cpp b/src/app/AsyncStroke.cppindex 0b9e13a7..36089b01 100644--- a/src/app/AsyncStroke.cpp+++ b/src/app/AsyncStroke.cpp@@ -596,3 +596,4 @@ bool App::verifyStroke(uint64_t before, const std::vector<glm::vec2>& dabs, cons}} // namespace sf+diff --git a/src/app/Demo.cpp b/src/app/Demo.cppindex f86c6464..d8b0f578 100644--- a/src/app/Demo.cpp+++ b/src/app/Demo.cpp@@ -370,7 +370,7 @@ void Demo::click(const std::string& label) {wait(0.25f);}-void Demo::stroke(std::function<ImVec2(float u)> path, float seconds, bool invert) {+void Demo::stroke(std::function<ImVec2(float u)> path, float seconds, bool invert, bool hold) {// Glide to the start, press, follow the path, release.auto started = std::make_shared<bool>(false);auto from = std::make_shared<ImVec2>();@@ -381,7 +381,7 @@ void Demo::stroke(std::function<ImVec2(float u)> path, float seconds, bool invermouseMotion(from->x + (p.x - from->x) * u, from->y + (p.y - from->y) * u);return t >= 0.35f;});- steps_.push_back([this, path, seconds, invert, started](float t) {+ steps_.push_back([this, path, seconds, invert, hold, started](float t) {if (!*started) {app_.invertToggle_ = invert;mouseButton(true, SDL_BUTTON_LEFT);@@ -390,7 +390,7 @@ void Demo::stroke(std::function<ImVec2(float u)> path, float seconds, bool inverconst ImVec2 p = path(std::min(t / seconds, 1.0f));mouseMotion(p.x, p.y);if (t >= seconds) {- mouseButton(false, SDL_BUTTON_LEFT);+ if (!hold) mouseButton(false, SDL_BUTTON_LEFT); // (held: a later release lets go)app_.invertToggle_ = false;*started = false;return true;diff --git a/src/app/Demo.h b/src/app/Demo.hindex 075ab826..8c88fd40 100644--- a/src/app/Demo.h+++ b/src/app/Demo.h@@ -81,7 +81,7 @@ private:void moveTo(float x, float y, float seconds);void moveToItem(const std::string& label, float seconds = 0.6f);void click(const std::string& label); // move to the item and click it- void stroke(std::function<ImVec2(float u)> path, float seconds, bool invert = false);+ void stroke(std::function<ImVec2(float u)> path, float seconds, bool invert = false, bool hold = false); // hold: the button stays downvoid orbit(float dx, float dy, float seconds); // right-drag on the backgroundvoid type(char* buffer, size_t size, const std::string& text, float seconds);void run(std::function<void()> action);diff --git a/src/app/UiTest.cpp b/src/app/UiTest.cppindex 58bca4ce..6bf96c25 100644--- a/src/app/UiTest.cpp+++ b/src/app/UiTest.cpp@@ -940,13 +940,15 @@ bool Demo::parseStep(int line, const std::vector<std::string>& w, std::string& e});} else if (verb == "stroke") {if (!need(4)) return false;+ // stroke u0 v0 u1 v1 [seconds] [hold]: hold keeps the button down at the end (the release verb lets go)const float u0 = num(1, 0), v0 = num(2, 0), u1 = num(3, 0), v1 = num(4, 0), seconds = num(5, 0.6f);+ const bool hold = w.size() > 6 && w[6] == "hold";auto ends = std::make_shared<std::pair<ImVec2, ImVec2>>();run([this, ends, u0, v0, u1, v1] { *ends = {onModel(u0, v0), onModel(u1, v1)}; });stroke([ends](float u) {return ImVec2(ends->first.x + (ends->second.x - ends->first.x) * u,ends->first.y + (ends->second.y - ends->first.y) * u);- }, seconds);+ }, seconds, false, hold);run([this] { SDL_SetModState(held_); });wait(0.1f);} else if (verb == "view_drag") {diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cppindex 46c59dda..7d90befc 100644--- a/src/render/Renderer.cpp+++ b/src/render/Renderer.cpp@@ -153,6 +153,7 @@ vec3 ghostMove(vec3 x, vec3 n, int first, int end, inout vec3 g, inout float lapvec3 gw = (ghostStart - c) * (s * F.y * inv);x += an * (s * f);g += gw * (cn / max(1.0 + dot(gw, an), 1e-3));+ lap += cn * s * radialLap; // (the height change along the normal, as Standard's)} else if (kind == 9) { // Trim: what sticks out above a plane cut offfloat h = dot(x - (ac - an * (sgn * r * 0.02 * s)), an);if (sgn * h > 0.0) {@@ -3518,3 +3519,4 @@ bool Renderer::renderSubtoolThumbnail(uint32_t id, float yaw, float pitch, int s} // namespace sf+diff --git a/tests/ui/live_move.sfui b/tests/ui/live_move.sfuiindex a1bbb34f..1b8eb2ba 100644--- a/tests/ui/live_move.sfui+++ b/tests/ui/live_move.sfui@@ -41,6 +41,18 @@ shot live_movekey ctrl+zexpect_value moved == 0+# Mid-drag: the graphics card draws the move, the mesh itself hasn't moved yet; letting go applies it.+snapshot+stroke 0.86 0.5 0.98 0.38 0.6 hold+wait 0.3+expect_value moved == 0+shot live_move_dragging+release+expect_value moved_sum > $plain*0.999+expect_value moved_sum < $plain*1.001+key ctrl+z+expect_value moved == 0+# Twice in a row, then both undone.stroke 0.86 0.5 0.98 0.38stroke 0.80 0.6 0.90 0.7@@ -50,8 +62,7 @@ key ctrl+zexpect_value moved == 0# Background Preview: on and off again; Live Move off again.-click "Preferences##palette.preferences"-click "Performance##preferences.performance"+click "Preferences##palette.preferences" # (Performance stays open from before)expect_value background_preview == 0click "Background Preview (Experimental)"expect_value background_preview == 1