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
Merge origin/research/perf-moonshots 2909fd7d: orbit-start hitch fix on slow cores; integrated-graphics benchmark request (fragment keeps only what 0.11.0-beta.1 didn't ship)
islandmed258d6766d5ae
diff --cc changes/perf-moonshots.mdindex 00000000,88a82d6d..16e482f2mode 000000,100644..100644--- a/changes/perf-moonshots.md+++ b/changes/perf-moonshots.md@@@ -1,0 -1,52 +1,19 @@@+ ----highlight: Experimental: Live Move and Background Preview for very dense meshes-whats_new: **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)).-whats_new: **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.-whats_new: **Fast Upload (experimental)**: **Preferences > Performance > Fast Upload**. Sculpted changes reach the- graphics card through shared memory and a copy on the card, instead of a copy by the driver during the frame.-added: Experimental toggles in Preferences > Performance, all off by default. **Live Move**: the GPU draws a- Move drag from the grab's start positions and the whole move is applied once at pen lift (one grab, equal to the- per-frame grabs to 1e-6). It falls back to the normal Move with masks, hidden faces, sculpt layers, micro levels,- Connected Only or View falloff (`SF_LIVE_MOVE=0/1`). **Background Preview**: the predictive preview is drawn for- background dabs (meshes of 2M+ vertices), and the frame no longer waits for a batch; the solver's dabs are- unchanged (`SF_BG_GHOST=0/1`). **Fast Upload**: stroke uploads are packed into persistently mapped staging- buffers (GL_ARB_buffer_storage) and copied on the GPU (`SF_PERSISTENT_UPLOAD=0/1`). The research behind them,- including a design for focus detail on billion-polygon assets, is in docs/design/perf-moonshots.md.+ fixed: Orbiting a dense model right after sculpting no longer hitches on slower processors. The lighter copy that is+ drawn while the view moves was rebuilt in batches that a slow CPU took about 160 ms to finish, so the first frames of+ the orbit froze. Batches are now sized to fit a few milliseconds a frame. After a stroke the copy is also brought up+ to date while the view is still, so the next orbit starts with it ready (15M triangles, simulated integrated-graphics+ profile on slow cores: worst orbit frame 166 -> 24 ms).+ testers:+ - Windows laptops with Intel UHD / Iris Xe or AMD Radeon integrated graphics (also Apple M1 / M2 base on macOS):+ we need your numbers most. Close other apps, plug in power, and run Help > Benchmark > standard-15m twice: once as+ installed, then again with Live Move, Background Preview and Fast Upload switched on in Preferences >+ Performance. Post both result files with the **Benchmark result** issue form on GitHub and name your graphics+ chip and processor. Good: it finishes without crashing. The second run's stroke stays under the pointer in the+ video.+ - Windows laptops with integrated graphics first, any OS: open a model of 10M+ triangles (or Help > Benchmark's+ head), sculpt a long stroke, then orbit straight away. Good: the view turns smoothly from the first frame (no+ freeze at the start of the orbit), and the model sharpens to full detail when you stop.- - Any OS, Live Move: Preferences > Performance > Live Move (Experimental) on. Open Help > Benchmark's dense- head, or any model over 10M triangles. Drag the Move brush big and fast. Good: the bulge follows the pen- smoothly with no stutter, and when you lift the pen the shape stays exactly where the preview left it (no jump- or flicker). Then Ctrl+Z / Ctrl+Shift+Z restores and redoes it in one step.- - Any OS, Live Move with X symmetry on: both sides move in the preview and stay the same after the pen lifts.- With a mask, a hidden part, a sculpt layer or a micro level, Move works exactly as it does with the toggle off.- - Windows (tablet): Live Move with pen pressure and a fast flick. Good: no lag behind the pen, and no gap or- dent where the drag ended.- - Any OS, Background Preview: Preferences > Performance > Background Preview (Experimental) on. Use Clay or- Standard at 200-300 px on a model of 15M+ triangles. Good: the stroke stays under the pen instead of trailing,- lifting the pen is instant, and the result looks the same as the same stroke with the toggle off.- - Any OS, Fast Upload: Preferences > Performance > Fast Upload (Experimental) on, then sculpt on a dense model.- Good: nothing looks different (no flicker, holes, stale patches or black triangles), and strokes feel as fast- or faster. macOS and older Intel drivers may lack the OpenGL feature; there it simply does nothing. Report your- GPU and driver either way.+ ----Research prototypes from docs/design/perf-moonshots.md (ideas 1-8). All three toggles are off by default; the-strokes they commit match the toggles-off result (tests/ui/live_move.sfui, ui_stroke_background_preview,-ui_stroke_persistent_upload with SF_MEASURE_VERIFY).++Orbit-start hitch fix (Renderer::buildProxies batches sized to the frame budget; stale proxies rebuilt on still frames++after a stroke). The experimental toggles shipped in 0.11.0-beta.1; this asks integrated-graphics owners for numbers.diff --cc src/render/Renderer.hindex 6b6aa3ac,7611a713..ff5e7c0f--- a/src/render/Renderer.h+++ b/src/render/Renderer.h@@@ -239,12 -239,15 +239,15 @@@ publicsize_t lastDrawnTriangles() const { return lastDrawn_; }// The last syncScene left motion proxies to build (a few milliseconds of them a frame; the rest draw in full).bool proxiesPending() const { return proxyPending_; }+ // Build stale motion proxies on still frames too (after a stroke, so the next orbit starts with them), at a+ // smaller budget; only for meshes whose proxies were drawn before. The app turns it on when nothing sculpts.+ void setProxyPrebuild(bool on) { proxyPrebuild_ = on; }- // Texture of matcap `index` (sRGB RGBA8, rows bottom-up) for UI previews; 0 if none (or a custom one not+ // Texture of lit sphere `index` (sRGB RGBA8, rows bottom-up) for UI previews; 0 if none (or a custom one not// uploaded yet: the next syncScene or draw does).- GLuint matcapTexture(int index) const;+ GLuint litsphereTexture(int index) const;- // --- Thumbnails (LightBox / pickers) ---+ // --- Thumbnails (Library / pickers) ---// Renders `mesh` alone (not the synced scene, which is left as it was) into a `size` x `size`// top-down RGBA8 image with a transparent background. Keeps the caller's framebuffer and viewport.bool renderMeshThumbnail(Mesh& mesh, const Camera& camera, int size, const RenderSettings& settings,