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: v0.6 performance figures from the merged tree (one summary against 0.5, then each branch's report)
islandmedb61671c44a4e
diff --git a/docs/guide/performance.md b/docs/guide/performance.mdindex c275b82c..ad5859c3 100644--- a/docs/guide/performance.md+++ b/docs/guide/performance.md@@ -14,9 +14,9 @@ On a 2021 laptop (Apple M1 Pro, 10 cores, integrated GPU), with X symmetry on an| Mesh | One dab of a medium brush | Turning the view ||---|---|---|-| 4 million triangles | about 1.5 ms | about 350 frames a second |-| 16 million triangles | about 4 ms | about 200 frames a second |-| 33 million triangles | about 6.5 ms | about 115 (4x antialiasing), 300 with Fast Navigation |+| 4 million triangles | about 2 ms | about 350 frames a second |+| 16 million triangles | about 4.5 ms | about 170 frames a second |+| 33 million triangles | about 7.5 ms | about 110 (4x antialiasing), 270 with Fast Navigation |Turning the view stays smooth at 100 million triangles: about 50 frames a second with 4x antialiasing, 100 withFast Navigation. These figures are for closed models (no holes); see "Closed meshes draw faster" below.@@ -24,7 +24,7 @@ Fast Navigation. These figures are for closed models (no holes); see "Closed mesA dab is one step of the brush along the stroke; the app draws several per frame when you move fast. Under16 ms per dab a stroke keeps up with a 60 Hz display. Very large brushes cost more, since they move morevertices: a brush covering a tenth of a 33 million triangle sphere (about a million vertices per dab with-symmetry) takes about 40 ms per dab with Standard, 20 ms with Smooth and 12 ms with Move, of which sending the+symmetry) takes about 45 ms per dab with Standard, 21 ms with Smooth and 15 ms with Move, of which sending thechange to the graphics card is about a third.[Performance figures](https://github.com/islandmed/SculptForge/blob/main/docs/performance.md) has the full@@ -53,8 +53,8 @@ setting is also in the <kbd>F3</kbd> command palette (type "antialiasing", "fastlighter.- **Hide what you're not working on.** Hidden SubTools aren't drawn and hidden parts of a SubTool aren'tsculpted (**Tool > Visibility**). A hidden SubTool costs no drawing time at all.-- **Memory.** A divided model takes about 90 bytes per triangle: about 40 for the sculpting mesh, 17 for its- BVH and 30 for its subdivision levels. A 33 million triangle sculpt with levels needs about 3 GB of memory, a 100+- **Memory.** A divided model takes about 85 bytes per triangle: about 37 for the sculpting mesh, 17 for its+ BVH and 29 for its subdivision levels. A 33 million triangle sculpt with levels needs about 3.4 GB of memory, a 100million one about 9 GB (and a little more while dividing). Opening a project needs only a little more than themodel itself. A mesh without levels (an import, a remesh) takes about 60 bytes per triangle for the mesh. Projectfiles over 4 GB are saved in the ZIP64 format.diff --git a/docs/performance.md b/docs/performance.mdindex cfe39783..986b5e9f 100644--- a/docs/performance.md+++ b/docs/performance.md@@ -1,838 +1,923 @@# Performance figures-Measurements for the v0.5 performance work ("Performance at 20-100M polygons, multithreaded brushes, fast undo").Every number here comes from the benchmark built into SculptForge, so anyone can reproduce it:```-sculptforge --bench [--bench-sizes 4,16,32] [--bench-dabs 40] [--bench-brushes TEXT] [--bench-no-project] [--bench-out report.md]-sculptforge-cli --bench ... # the same without the GPU (CI, servers)+sculptforge --bench [--bench-sizes 4,16,33] [--bench-dabs 40] [--bench-no-project] [--bench-out report.md]+sculptforge --bench-view # only the viewport's costs+sculptforge --bench-brushes large # only the benchmark rows whose name contains "large"+sculptforge-cli --bench ... # the same without the GPU (CI, servers)```-The benchmark (core/Benchmark.cpp, app/Bench.cpp) builds a sphere the way a sculptor gets one: a quad cube-projected onto a sphere and divided (Catmull-Clark) to about 4, 16 and 33 million triangles, so the mesh has-subdivision levels and the vertex numbering of a divided mesh. It then runs a stroke with each brush, with X-symmetry on as in the app, a medium Draw Size (radius 0.12 on the unit sphere, about 64 pixels on a 1080p view-framing the model) and dabs 0.15 radius apart, and times per dab: the brush kernel (finding and moving the-vertices), the normal update, the BVH refit, the pick, and with the GPU the upload of what the dab changed-(`glFinish` included). Per stroke it times the undo record, undo and redo; then stepping subdivision levels,-saving and opening the project, and 120 frames of orbiting in a 1600 x 960 window (no vsync).--Machine: Apple M1 Pro (8 performance + 2 efficiency cores, 32 GB unified memory; 30 GB usable under Asahi-Linux), Mesa 26.1 (OpenGL 4.6). Another process kept one core busy during all runs. "Before" is main at-00c4989 with only the benchmark added (the same instrumentation, no other change); "after" is feat/perf.-GPU runs use 10 dabs per stroke (the old upload made 40 too slow), CPU-only runs 40. The 33M GPU runs skip-the project round trip: opening a second copy of a 33M project next to the first ran out of memory on this-machine before the changes.--## v0.6 (in development)--The v0.6 performance work ran on three branches at once (mesh memory, brushes, viewport), each measured-against main at aac5f68 with `sculptforge --bench --bench-sizes 4,16,33 --bench-dabs 10 --bench-no-project`, on-the same machine as below, one benchmark at a time; every figure is the better of two runs. The sections after-this one (from "Summary") are v0.5's.--### Viewport (feat/view)--"Before" is main at aac5f68 plus the benchmark rows below; "after" is feat/view. The 33M benchmark sphere has a-few cracks on main (makeCube welded badly at 26 quads per side; fixed in feat/mem), so the 33M "after" runs-use that one-line fix, as the merged branches will; without it, the 33M sphere counts as open and draws its back-faces too (last column). 104M ran with `--bench-view` (the full brush suite at that size doesn't fit in memory);-neither 64M nor 104M was drawn before (v0.5 only measured 64M on the CPU). Full reports are at the end.--| | 4M | 16M | 33M | 64M | 104M | 33M, open (no fix) |-|---|---|---|---|---|---|---|-| Orbit, 4x antialiasing (ms) | 4.8 -> **2.9** | 11.4 -> **4.9** | 20.6 -> **8.7** | **14.0** | **19.6** (51 fps) | 15.3 |-| Orbit, no antialiasing | 3.0 -> **1.6** | 8.2 -> **3.2** | 14.3 -> **6.1** | **11.3** | **16.9** (59 fps) | 12.2 |-| Orbit, Fast Navigation (no AA, motion proxy) | 3.0 -> **1.1** | 8.2 -> **1.9** | 14.3 -> **3.2** (314 fps) | **6.5** | **9.9** (101 fps) | 4.6 |-| Triangles drawn after culling (proxy) | 53% (19%) | 49% (19%) | 48% (19%) | 47% (19%) | 46% (19%) | 100% (19%) |-| First GPU upload (ms) | 87 -> **52** | 337 -> **199** | 701 -> **422** | **784** | **1283** | 571 |-| GPU memory, bytes per triangle | 46 -> **14.8** | 46 -> **14.8** | 46 -> **14.8** (1.53 -> 0.49 GB) | **14.8** | **14.8** (1.5 GB) | 14.8 |-| Motion proxy build, first move after an upload (ms) | 16 | 60 | 126 | 241 | 408 | 127 |-| GPU upload per medium dab: Standard / Mask / Paint (ms) | 0.28 / 0.39 / 0.62 -> 0.57 / 0.34 / 0.70 | 0.95 / 1.33 / 2.16 -> 1.19 / 1.05 / 1.76 | 2.19 / 2.89 / 4.64 -> **2.08 / 1.89 / 3.69** | 3.8 / 3.7 / 7.3 | 6.6 / 6.5 / 12.8 | |--"Before" GPU memory is the old buffers' size, which the old renderer didn't report: positions, normals and-curvature as floats (28 bytes per vertex, 14 per triangle), 32-bit indices (12), 32-bit polygroups (4) and, on-meshes with quads like this one, the wireframe's edges, always kept, every edge twice (16): 46 bytes per-triangle (26 without the last two). After: 12-byte vertices with about 10% copies on cluster seams (6.6 per-triangle), 16-bit indices (6), 16-bit polygroups (2), cluster tables (0.1). Polypaint adds 2.2, a mask 0.6,-the motion proxy 1.5 once the view has moved, the wireframe about 4 while it is on.--Targets from the brief: GPU memory down at least a third (down 68%, or 43% against the 26 bytes counted-before); 60 fps at 100M (101 fps with Fast Navigation, 59 without antialiasing, 51 with 4x); orbit at 33M under-about 8 ms with 4x antialiasing (8.7 ms, from 20.6: not quite); first upload at 33M under about 300 ms (422,-from 701: not reached).--#### What changed--- **Clusters** (core/UploadOrder.h). The triangles are cut into runs of 64 consecutive triangles (compact on- any mesh whose triangle order isn't random: a divided mesh keeps each cage face's triangles together), the- runs sorted along a Morton curve of their centres, and every 64 runs make a cluster of up to 4096 triangles.- Each cluster has its own block-aligned range of GPU vertices, numbered by first use, so its indices are 16-bit- with a base vertex; vertices on seams between clusters are copied into each cluster that uses them (about- 10%). The mesh's own vertex numbering is untouched. Without the Morton step, clusters on meshes with small cage- faces (a remesh divided three times) were long strips whose normals point every way: a test sphere culled 9%- of its clusters, 28% with it.-- **Culling** (render/Clusters.h), on the CPU every frame: clusters outside the view, and clusters whose- triangles all face away (a normal cone per cluster against a bounding sphere). Back faces may only be skipped- where they can't show: on a mesh that is closed and wound consistently (every directed edge has its reverse;- found with a 64-bit hash sum while the layout is built, with a fallback that accepts unwelded seams) and- outwards (positive signed volume), with nothing hidden, the eye outside its bounds and nothing reaching into- the near plane's slab. Then every back face lies behind a front face, so the picture is the same; the GPU- also culls the back faces left in clusters along the silhouette. The visible clusters go in one- `glMultiDrawElementsBaseVertex`. About half the triangles of a sphere are drawn.-- **12-byte vertices**: the position on a 21-bit grid over the mesh's bounds plus a margin (one grid for the- whole mesh, so a vertex copied into two clusters decodes to exactly the same point and seams can't crack; a- stroke that leaves the grid re-sends the mesh on a new one), an octahedral normal (2 x 11 bits, within 0.12- degrees) and the curvature (10 bits, square-root companded over its whole range, within 0.001 where the- cavity shading ramps). Polypaint is RGBA8 with gamma 2.2 (decoded in the shader), the mask 8-bit. The- fragment shader works out the view direction from the pixel instead of an interpolated position, so a vertex- passes only a normal and the curvature (plus colour and mask when the mesh has them; shader variants per- feature).-- **Motion proxy**: while a scene of 10M+ triangles moves with Fast Navigation on, each cluster of a mesh of- 256k+ triangles draws a proxy: its vertices snapped to the one nearest the centre of each cell of a grid 2.5- average edges wide, collapsed triangles dropped, seam vertices kept, using the same vertex buffer (indices- only, up to a quarter of the cluster's triangles; 19% in practice). The proxies of a closed mesh form a closed- mesh (a simplicial map of it), so the same culling applies to them with their own normal cones and no- hole can open between clusters. Proxies are built for the clusters that changed, when the view starts moving- (126 ms at 33M after an upload, a few clusters after a stroke). Polygroup and texture display and the- wireframe keep the full mesh.-- **Uploads**: a full upload writes the index buffer straight into the mapped buffer from the threads building- the layout, and whole vertex arrays mapped in parallel; dab uploads gather all their runs in parallel. Each- 128-vertex block keeps a hash of what it last sent: blocks a dab marked but didn't change (paint, mask) aren't- sent again, and clusters whose positions didn't move keep their bounds and proxy.-- **Wireframe** edges are built when the wireframe is first shown, each edge once (from the lowest-numbered- drawn triangle using it), at the opacity two overlapping lines had.-- Per-triangle data (polygroups, texture UVs, baked-normal tangents) is found from `gl_PrimitiveID` plus the- cluster's first drawn triangle, read through `gl_VertexID` (which includes the base vertex) from a table per- vertex block. A start-up check draws one point to see that the driver does include it; where it doesn't, those- meshes draw one cluster at a time with the base as a uniform (`SF_NO_VERTEXID_BASE=1` forces that path).--#### Looks the same--Every UI test's screenshots were compared pixel by pixel with main's, and the benchmark's frames too. The-viewport matches except for: outline pixels of closed meshes, where back faces used to cover a few-antialiasing samples and show as a faint light rim (now the background shows there, as it would with a closed-surface seen exactly edge-on); a few silhouette pixels moved by the position grid (a millionth of the model);-and the wireframe on quad meshes, where line ends overlap a little differently now that each edge is drawn once.-Shelf and LightBox thumbnails differ in the UI tests only because they arrive sooner.--#### Known limits--- Back faces are drawn (twice the work on huge meshes) on open meshes, with hidden polygons, when the eye is- inside the mesh's bounds or the near plane cuts it: the cases where they can show. On a closed mesh, a lobe- pushed through the surface so that it is inside out (winding below zero) would show a hole where its back- faces are culled; ZBrush culls back faces always.-- The proxy is coarse on a mesh with fine detail (detail under 2.5 edges disappears while moving), and the first- move after opening or dividing a big mesh waits for it (126 ms at 33M, 408 ms at 104M).-- 33M orbiting is 8.7 ms with antialiasing: what's left is 16M sub-pixel triangles a frame, which only a level- of detail at rest would remove.-- The first upload at 33M (422 ms) spends most of its time building the layout (about 250 ms: two passes over- every cluster's triangles) and packing vertices (about 100 ms, mostly curvature).-- The per-cluster fallback for drivers without the base vertex in `gl_VertexID` was checked by forcing it on- Mesa; macOS (GL 4.1) wasn't tried on hardware.-- Upload per dab at 4M and 16M is a little slower (0.3-0.6 ms) than before: runs are finer (128 vertices) and- the clusters a dab touches get new bounds.--## Summary--| | 4M triangles | 16M triangles | 33M triangles |-|---|---|---|---|-| Medium brush (Standard), one dab, upload included | 23.6 -> **1.3 ms** | 166 -> **5.9 ms** | 390 -> **10.3 ms** |-| Large brush (radius 0.4: 1.2M vertices per dab at 33M) | 44 -> **13 ms** | 572 -> **43 ms** | 548 -> **93 ms** |-| Vertices uploaded per medium dab (changed: 9k / 37k / 78k) | most of the index range -> **20k** | most of the range -> **60k** | most of the range -> **117k** |-| Orbit, 4x antialiasing | 5.1 -> **5.0 ms** (200 fps) | 12.7 -> **11.8 ms** (85 fps) | 30.4 -> **20.6 ms** (49 fps) |-| Orbit, Fast Navigation (no AA while moving) | **3.1 ms** | **8.0 ms** | **14.0 ms (71 fps)** |-| Undo / redo of a 40-dab medium stroke | 7.7 -> **3.4 ms** | 33 -> **12 ms** | 71 -> **24 ms** |-| Undo of a 40-dab large stroke | 28 -> **11 ms** | 116 -> **38 ms** | 286 -> **77 ms** |-| Lower Res after sculpting (folds the edits into the levels) | 300 -> **175 ms** | 1338 -> **718 ms** | 4245 -> **1539 ms** |-| Higher Res / Lower Res without edits | 2-5 -> **1-5 ms** | 5-20 -> **5-20 ms** | 37-320 -> **10-41 ms** |-| Save project | 768 -> **81 ms** | 3060 -> **321 ms** | 8115 -> **677 ms** (1.9 GB) |-| Open project | 1696 -> **550 ms** | 8130 -> **2278 ms** | 15487 -> **5679 ms** |-| BVH build (open, import, level change without cache) | 693 -> **215 ms** | 2912 -> **829 ms** | 6285 -> **1747 ms** |-| First GPU upload | 98 -> **90 ms** | 514 -> **344 ms** | 907 -> **705 ms** |-| Mesh memory (with topology) | 90 -> **62 bytes per triangle** | | 2990 -> **2062 MB** |+Machine for all figures: Apple M1 Pro (8 performance + 2 efficiency cores, 32 GB unified memory, 30 GB usable+under Asahi Linux), integrated GPU, Mesa 26.1 (OpenGL 4.6). How the benchmark works is described under v0.5 below.-Targets from the brief: a dab under 16 ms at 16M triangles with a medium brush is reached (5.9 ms, and 10.3 ms-at 33M). Orbiting at 60 fps at 32M is reached while the view moves with Fast Navigation (71 fps); with 4x-antialiasing it is 49 fps on this integrated GPU (it was 33).+## v0.6-## What changed+v0.6 is three pieces of work merged together: less memory per triangle (feat/mem), faster brushes on huge+meshes (feat/brush) and a faster, lighter viewport (feat/view). "0.5" is main at aac5f68 (0.5.0 plus the STL+fix) with the same benchmark; "0.6" is the merged tree, measured after the merge. Each branch's own report,+with its before / after tables and known limits, follows the summary.-- **Thread pool** (core/ThreadPool.h): a persistent pool (one thread per core, up to 16) with `poolFor`, which- splits work into fixed blocks of 4096; sums are made per block and added in block order, so results don't- depend on the thread count and a region of one block is computed exactly like before. Ranges under 4 blocks- run inline. It runs every brush kernel (all types, recipes, mask, paint weights), normal updates, the BVH- vertex query (in traversal order, so the vertex list is identical), refits and build, renderer gathers and- project CRCs. Undo records stay serial, in order. `set_multithreading enabled=false` (or the checkbox) runs- everything on one thread; tests compare both bit for bit.-- **Partial GPU updates.** The old renderer uploaded one index range from the lowest to the highest changed- vertex. On a divided mesh, whose vertices are numbered level by level, a dab with symmetry covers most of- that range: every dab re-sent nearly the whole mesh. Meshes now mark changed vertices in a bitset (plus- 2048-vertex blocks to find them fast), and the renderer stores vertices in first-use order of the triangle list- (core/UploadOrder.h), which keeps any region of a divided mesh together; a dab uploads a few 512-vertex- blocks (15-20 `glBufferSubData` calls per array). The same order improves the GPU's vertex cache: orbiting at- 33M went from 30 to 21 ms with the same shaders.-- **Normals** are summed per vertex from its faces (same sums as before) instead of through a per-triangle face- normal cache, which saves 16 bytes per triangle (cache and stamps); the adjacency list no longer keeps- spare capacity (12 bytes per triangle); the renderer no longer keeps a CPU copy of the curvature.-- **Undo** already stored only the touched vertices per stroke; it is faster because the normal and BVH updates- it runs are. The first polypaint stroke on an unpainted mesh no longer copies the whole mesh for undo (it- keeps the empty paint stack): at 33M that copy was over 2 GB.-- **Projects**: the ZIP writer streamed the archive into a second in-memory copy and the reader read the file- through a byte iterator; now entries go straight to the file, are read in place, CRCs use slicing-by-8 in- parallel, and arrays are copied (not converted byte by byte) on little-endian CPUs. Archives over 4 GB use- ZIP64 (the old writer refused them); smaller archives are byte-identical to before.-- **Viewport**: the window has no multisampling; the 3D view draws into its own multisampled target and resolves- it (Renderer::drawView). That allows **Fast Navigation** (scenes of 10M+ triangles drop antialiasing while the- view moves) and falling back to fewer samples when the target can't be allocated. A mesh whose buffers run the- GPU out of memory is skipped with a status message rather than drawn from incomplete buffers.+### Summary (33 million triangles, 7 subdivision levels, 40 dabs per stroke, GPU upload included)-## Memory per triangle (33M benchmark sphere, after)+| | 0.5 | 0.6 |+|---|---:|---:|+| Memory: mesh + BVH + subdivision levels, per triangle | 156 bytes | **83 bytes** |+| Memory: whole process (RSS) | 5.6 GB | **3.4 GB** |+| Graphics card memory, per triangle | 46 bytes | **15 bytes** |+| Turning the view, 4x antialiasing | 20.6 ms (49 fps) | **9.2 ms (109 fps)** |+| Turning the view, Fast Navigation | 14.8 ms (68 fps) | **3.7 ms (270 fps)** |+| Medium brush (Standard), one dab | 11.9 ms (78k vertices) | **7.5 ms** (103k vertices) |+| Large brush (Standard, radius 0.4), one dab | 78.5 ms (1.2M vertices) | **45 ms** (987k vertices) |+| Mask / Paint, one dab | 5.6 / 7.0 ms | **2.5 / 3.5 ms** |+| First GPU upload | 701 ms | **423 ms** |+| Opening the project | 4.7 s | **2.1 s** |+| Lower Res after sculpting | 1588 ms | **829 ms** |+| Largest Divide | 50M (fixed limit) | **from the memory: about 160M on 32 GB** |-| | bytes per triangle |-|---|---|-| Mesh: positions, normals, triangles, quad pairs, polygroups, adjacency (vertex-vertex and vertex-triangle), stamps, dirty bits | 62 (was 90) |-| BVH | 19.5 |-| Subdivision levels (the level stack keeps every level's data, detail and topology) | 75 |-| GPU: positions, normals, curvature per vertex; indices | about 26 |+The vertex counts per dab differ because 0.6 also fixes the benchmark sphere (New Cube left a few vertices+unwelded at some resolutions, see feat/mem below): the same radius now reaches a slightly different number of+vertices. Compare the times per dab, or the per-vertex costs in the full tables.-A 33M sculpt with levels holds about 5.4 GB (RSS); the 64M benchmark sphere 10 GB, where a medium dab still-takes 14.6 ms (without the upload) and undo of a 40-dab stroke 42 ms (last table).+Where 0.6 gives something back: on levels made by Divide the mesh works out its vertex neighbours from the level+topology instead of storing them (about 24 bytes per triangle saved). That makes normal updates on those levels+slower than in feat/brush alone: a large dab at 33M is 45 ms merged against 39 ms on feat/brush. Keeping the+stored lists would win that back for about 10 bytes per triangle; v0.6 keeps the memory.-## Known limits+At 104 million triangles (CPU-side figures in feat/mem, viewport in feat/view) the view turns at 19.6 ms with 4x+antialiasing and 9.9 ms (101 fps) with Fast Navigation.-- The subdivision level stack (75 bytes per triangle) keeps a copy of the current level's positions and- triangles next to the working mesh; sharing them would save about 18 bytes per triangle but needs changes to- the level code. Divide stops at 50M triangles (core/Multires.h).-- Normal updates and refits scale about 2-3x on 10 cores: they read vertices scattered over memory (the same- numbering issue as the uploads), so they wait on memory, not arithmetic.-- Very large brushes on 33M meshes (a tenth of the model per dab) take about 90 ms per dab.-- Opening a project needs about twice the memory of the scene while it loads.+### Merged benchmark (feat/v06)-## Before (main at 00c4989 plus the benchmark)-### CPU only-Threads: 10. Brushes use X symmetry (two dabs per step), radius 0.12 on a unit sphere unless noted, 40 dabs per stroke. Times in milliseconds.+Threads: 10, GPU: Apple M1 Pro (G13S C0), OpenGL 4.6 (Core Profile) Mesa 26.1.8. Brushes use X symmetry (two dabs per step), radius 0.12 on a unit sphere unless noted, 40 dabs per stroke. Times in milliseconds.#### 4.0M triangles (2.0M vertices, 5 subdivision levels)| Setup | ||---|---|-| Divide up to this size | 411 |-| BVH build | 693 |-| Mesh (incl. topology) | 358 MB = 90 B/triangle |-| BVH | 78 MB = 19.5 B/triangle |-| Subdivision levels (stack) | 297 MB = 74 B/triangle |-| Process memory (RSS) | 708 MB (+698 MB) |+| Divide up to this size | 154 |+| BVH build | 233 |+| First GPU upload | 53 |+| GPU memory (buffers) | 59 MB = 14.8 B/triangle |+| Mesh (incl. topology) | 146 MB = 37 B/triangle |+| BVH | 68 MB = 17.1 B/triangle |+| Subdivision levels (stack) | 117 MB = 29 B/triangle |+| Process memory (RSS) | 434 MB (+363 MB = 91 B/triangle) |+| Peak while dividing (RSS) | 406 MB above the start |-| Brush | verts/dab | kernel | normals | BVH refit | pick | **dab total** | stroke end (undo record) | undo | redo | undo step |-|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|-| Standard | 12k | 0.41 | 0.56 | 0.31 | 0.00 | **1.29** | 0.00 | 7.7 | 7.3 | 1.4 MB |-| Standard (large, r 0.4) | 118k | 4.27 | 6.18 | 3.33 | 0.00 | **13.78** | 0.00 | 28.2 | 27.9 | 4.6 MB |-| Clay | 7k | 0.26 | 0.31 | 0.17 | 0.00 | **0.74** | 0.00 | 4.4 | 4.0 | 0.9 MB |-| ClayBuildup | 8k | 0.34 | 0.37 | 0.21 | 0.00 | **0.92** | 0.00 | 4.0 | 3.9 | 0.8 MB |-| Smooth | 5k | 0.21 | 0.21 | 0.11 | 0.00 | **0.53** | 0.00 | 2.6 | 2.5 | 0.6 MB |-| Inflate | 5k | 0.17 | 0.20 | 0.11 | 0.00 | **0.48** | 0.00 | 2.5 | 2.5 | 0.6 MB |-| DamStandard | 4k | 0.17 | 0.19 | 0.11 | 0.00 | **0.47** | 0.00 | 2.4 | 2.3 | 0.5 MB |-| Layer | 5k | 0.25 | 0.20 | 0.11 | 0.00 | **0.56** | 0.00 | 2.6 | 2.5 | 0.6 MB |-| Move | 4k | 0.02 | 0.10 | 0.09 | 0.00 | **0.21** | 0.00 | 0.3 | 0.3 | 0.1 MB |-| Recipe (pattern) | 5k | 0.41 | 0.20 | 0.11 | 0.00 | **0.73** | 0.00 | 2.6 | 2.4 | 0.6 MB |-| Mask | 5k | 0.15 | 0.00 | 0.00 | 0.00 | **0.15** | 0.00 | 0.0 | 0.0 | 0.3 MB |-| Paint | 5k | 0.15 | 0.00 | 0.00 | 0.00 | **0.15** | 0.00 | 0.1 | 0.1 | 0.6 MB |+| Brush | verts/dab | uploaded verts (ranges) | kernel | normals | BVH refit | pick | GPU upload | **dab total** | stroke end (undo record) | undo | redo | undo step |+|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|+| Standard | 12k | 25k (14) | 0.59 | 0.53 | 0.26 | 0.00 | 0.63 | **2.12** | 0.07 | 1.6 | 2.5 | 1.4 MB |+| Standard (large, r 0.4) | 118k | 155k (32) | 1.49 | 1.26 | 0.98 | 0.01 | 2.53 | **7.09** | 0.07 | 4.7 | 4.8 | 4.6 MB |+| Clay | 7k | 16k (9) | 0.40 | 0.41 | 0.14 | 0.01 | 0.54 | **1.58** | 0.03 | 1.7 | 1.6 | 0.9 MB |+| ClayBuildup | 8k | 19k (11) | 0.51 | 0.46 | 0.19 | 0.01 | 1.05 | **2.29** | 0.02 | 1.6 | 1.6 | 0.8 MB |+| Smooth | 5k | 12k (9) | 0.29 | 0.25 | 0.08 | 0.01 | 0.40 | **1.07** | 0.03 | 1.4 | 1.4 | 0.6 MB |+| Smooth (large, r 0.4) | 59k | 84k (23) | 1.32 | 0.89 | 0.45 | 0.01 | 1.45 | **4.54** | 0.06 | 2.6 | 3.0 | 2.6 MB |+| Inflate | 5k | 12k (9) | 0.27 | 0.27 | 0.09 | 0.01 | 0.43 | **1.13** | 0.03 | 1.7 | 1.4 | 0.6 MB |+| DamStandard | 4k | 12k (9) | 0.31 | 0.32 | 0.09 | 0.01 | 0.40 | **1.18** | 0.02 | 1.3 | 1.2 | 0.5 MB |+| Layer | 5k | 12k (9) | 0.33 | 0.26 | 0.08 | 0.01 | 0.45 | **1.18** | 0.03 | 1.4 | 2.1 | 0.6 MB |+| Move | 4k | 10k (8) | 0.05 | 0.28 | 0.08 | 0.01 | 0.36 | **0.82** | 0.01 | 0.3 | 0.4 | 0.1 MB |+| Move (large, r 0.4) | 42k | 63k (20) | 0.21 | 0.79 | 0.34 | 0.01 | 1.10 | **2.73** | 0.03 | 1.5 | 1.1 | 0.7 MB |+| Recipe (pattern) | 5k | 12k (9) | 0.53 | 0.25 | 0.08 | 0.01 | 0.42 | **1.34** | 0.08 | 1.3 | 1.2 | 0.6 MB |+| Mask | 5k | 12k (9) | 0.27 | 0.00 | 0.00 | 0.01 | 0.29 | **0.62** | 0.10 | 0.3 | 0.1 | 0.3 MB |+| Paint | 5k | 12k (9) | 0.27 | 0.00 | 0.00 | 0.01 | 0.38 | **0.72** | 0.03 | 0.2 | 0.2 | 0.6 MB || Operation | ms ||---|---:|-| Lower Res (to 995k, after edits) | 300 |+| Lower Res (to 995k, after edits) | 99 || Higher Res (back up) | 2 || Lower Res again (no edits) | 5 |-| Higher Res again (no edits) | 2 |-| Save project (228 MB) | 768 |-| Open project | 1696 |+| Higher Res again (no edits) | 1 |+| Save project (165 MB) | 53 |+| Open project | 279 |+| Open project: memory (RSS) | +408 MB, peak +453 MB |+| Motion proxy build (first move after an upload) | 17 |+| Orbit: frame time, 4x antialiasing | 2.9 (349 fps) |+| Orbit: frame time, no antialiasing | 1.6 (628 fps) |+| Orbit: triangles drawn | 2.1M (53%) |+| Orbit: frame time, Fast Navigation (no antialiasing, motion proxy) | 1.1 (926 fps) |+| Orbit: triangles drawn (motion proxy) | 766k (19%) |+| GPU memory with the motion proxy | 76 MB = 19.1 B/triangle |#### 15.9M triangles (8.0M vertices, 6 subdivision levels)| Setup | ||---|---|-| Divide up to this size | 1846 |-| BVH build | 2912 |-| Mesh (incl. topology) | 1433 MB = 90 B/triangle |-| BVH | 311 MB = 19.5 B/triangle |-| Subdivision levels (stack) | 1188 MB = 75 B/triangle |-| Process memory (RSS) | 2778 MB (+2377 MB) |+| Divide up to this size | 671 |+| BVH build | 807 |+| First GPU upload | 204 |+| GPU memory (buffers) | 235 MB = 14.8 B/triangle |+| Mesh (incl. topology) | 583 MB = 37 B/triangle |+| BVH | 272 MB = 17.1 B/triangle |+| Subdivision levels (stack) | 470 MB = 29 B/triangle |+| Process memory (RSS) | 1655 MB (+1177 MB = 74 B/triangle) |+| Peak while dividing (RSS) | 1365 MB above the start |-| Brush | verts/dab | kernel | normals | BVH refit | pick | **dab total** | stroke end (undo record) | undo | redo | undo step |-|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|-| Standard | 50k | 1.76 | 2.45 | 1.31 | 0.00 | **5.52** | 0.00 | 33.3 | 32.6 | 5.4 MB |-| Standard (large, r 0.4) | 472k | 17.82 | 27.90 | 16.01 | 0.01 | **61.73** | 0.00 | 116.2 | 114.7 | 18.5 MB |-| Clay | 28k | 0.98 | 1.28 | 0.67 | 0.01 | **2.94** | 0.00 | 20.6 | 20.6 | 3.5 MB |-| ClayBuildup | 33k | 1.34 | 1.56 | 0.82 | 0.01 | **3.73** | 0.00 | 23.1 | 22.7 | 3.8 MB |-| Smooth | 19k | 0.86 | 0.88 | 0.44 | 0.01 | **2.19** | 0.00 | 15.5 | 15.4 | 2.7 MB |-| Inflate | 18k | 0.66 | 0.86 | 0.46 | 0.01 | **1.98** | 0.00 | 15.4 | 14.9 | 2.6 MB |-| DamStandard | 18k | 0.68 | 0.83 | 0.42 | 0.01 | **1.94** | 0.00 | 14.8 | 14.4 | 2.5 MB |-| Layer | 19k | 0.99 | 0.86 | 0.43 | 0.01 | **2.29** | 0.00 | 15.2 | 15.2 | 2.6 MB |-| Move | 16k | 0.07 | 0.41 | 0.36 | 0.01 | **0.87** | 0.00 | 1.1 | 1.1 | 0.3 MB |-| Recipe (pattern) | 19k | 1.73 | 0.89 | 0.43 | 0.01 | **3.07** | 0.00 | 15.2 | 15.2 | 2.6 MB |-| Mask | 19k | 0.57 | 0.00 | 0.00 | 0.01 | **0.58** | 0.00 | 0.3 | 0.2 | 1.3 MB |-| Paint | 19k | 0.58 | 0.00 | 0.00 | 0.01 | **0.59** | 0.00 | 0.5 | 0.3 | 2.6 MB |+| Brush | verts/dab | uploaded verts (ranges) | kernel | normals | BVH refit | pick | GPU upload | **dab total** | stroke end (undo record) | undo | redo | undo step |+|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|+| Standard | 50k | 77k (26) | 0.97 | 0.89 | 0.57 | 0.00 | 1.43 | **4.34** | 0.08 | 5.1 | 5.9 | 5.4 MB |+| Standard (large, r 0.4) | 472k | 564k (63) | 3.42 | 3.84 | 2.89 | 0.01 | 9.02 | **22.09** | 0.18 | 18.7 | 18.3 | 18.5 MB |+| Clay | 28k | 47k (19) | 0.92 | 0.59 | 0.36 | 0.01 | 1.03 | **3.21** | 0.07 | 4.1 | 3.7 | 3.5 MB |+| ClayBuildup | 33k | 54k (21) | 0.97 | 0.70 | 0.39 | 0.01 | 3.21 | **5.61** | 0.04 | 4.1 | 3.7 | 3.8 MB |+| Smooth | 19k | 35k (17) | 1.01 | 0.54 | 0.32 | 0.01 | 0.83 | **2.94** | 0.03 | 3.1 | 3.3 | 2.7 MB |+| Smooth (large, r 0.4) | 233k | 289k (45) | 2.48 | 2.01 | 1.07 | 0.01 | 4.42 | **11.47** | 0.13 | 11.2 | 10.6 | 11.0 MB |+| Inflate | 18k | 34k (17) | 0.85 | 0.58 | 0.37 | 0.01 | 0.86 | **2.91** | 0.08 | 3.1 | 3.2 | 2.6 MB |+| DamStandard | 18k | 33k (17) | 0.86 | 0.54 | 0.35 | 0.02 | 0.83 | **2.82** | 0.03 | 2.9 | 2.9 | 2.5 MB |+| Layer | 19k | 34k (17) | 1.04 | 0.52 | 0.30 | 0.01 | 0.76 | **2.83** | 0.07 | 2.6 | 3.1 | 2.6 MB |+| Move | 16k | 32k (12) | 0.15 | 0.59 | 0.12 | 0.01 | 0.71 | **1.80** | 0.05 | 0.8 | 0.7 | 0.3 MB |+| Move (large, r 0.4) | 168k | 217k (37) | 0.32 | 1.68 | 0.77 | 0.02 | 3.44 | **7.36** | 0.05 | 3.2 | 2.9 | 2.8 MB |+| Recipe (pattern) | 19k | 35k (17) | 1.88 | 0.59 | 0.28 | 0.02 | 0.88 | **3.87** | 0.07 | 3.2 | 2.9 | 2.7 MB |+| Mask | 19k | 33k (17) | 0.60 | 0.00 | 0.00 | 0.01 | 0.63 | **1.44** | 0.03 | 0.7 | 0.6 | 1.3 MB |+| Paint | 19k | 33k (17) | 0.58 | 0.00 | 0.00 | 0.02 | 0.92 | **1.71** | 0.07 | 1.2 | 0.8 | 2.7 MB || Operation | ms ||---|---:|-| Lower Res (to 4.0M, after edits) | 1338 |+| Lower Res (to 4.0M, after edits) | 404 || Higher Res (back up) | 5 |-| Lower Res again (no edits) | 20 |+| Lower Res again (no edits) | 18 || Higher Res again (no edits) | 5 |-| Save project (913 MB) | 3060 |-| Open project | 8130 |+| Save project (658 MB) | 206 |+| Open project | 1030 |+| Open project: memory (RSS) | +1567 MB, peak +1822 MB |+| Motion proxy build (first move after an upload) | 61 |+| Orbit: frame time, 4x antialiasing | 5.8 (172 fps) |+| Orbit: frame time, no antialiasing | 4.1 (243 fps) |+| Orbit: triangles drawn | 7.8M (49%) |+| Orbit: frame time, Fast Navigation (no antialiasing, motion proxy) | 2.2 (454 fps) |+| Orbit: triangles drawn (motion proxy) | 3.1M (19%) |+| GPU memory with the motion proxy | 304 MB = 19.1 B/triangle |#### 33.2M triangles (16.6M vertices, 7 subdivision levels)| Setup | ||---|---|-| Divide up to this size | 4302 |-| BVH build | 6285 |-| Mesh (incl. topology) | 2990 MB = 90 B/triangle |-| BVH | 648 MB = 19.5 B/triangle |-| Subdivision levels (stack) | 2481 MB = 75 B/triangle |-| Process memory (RSS) | 5749 MB (+5268 MB) |+| Divide up to this size | 1362 |+| BVH build | 1666 |+| First GPU upload | 423 |+| GPU memory (buffers) | 490 MB = 14.8 B/triangle |+| Mesh (incl. topology) | 1217 MB = 37 B/triangle |+| BVH | 567 MB = 17.1 B/triangle |+| Subdivision levels (stack) | 980 MB = 29 B/triangle |+| Process memory (RSS) | 3351 MB (+2061 MB = 62 B/triangle) |+| Peak while dividing (RSS) | 2632 MB above the start |-| Brush | verts/dab | kernel | normals | BVH refit | pick | **dab total** | stroke end (undo record) | undo | redo | undo step |-|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|-| Standard | 103k | 3.96 | 5.49 | 2.94 | 0.00 | **12.40** | 0.00 | 70.8 | 71.1 | 11.4 MB |-| Standard (large, r 0.4) | 987k | 39.60 | 60.23 | 35.90 | 0.01 | **135.74** | 0.00 | 286.0 | 283.7 | 38.7 MB |-| Clay | 58k | 2.66 | 3.60 | 1.92 | 0.01 | **8.19** | 0.00 | 51.2 | 50.7 | 7.2 MB |-| ClayBuildup | 66k | 3.29 | 3.96 | 2.13 | 0.02 | **9.41** | 0.00 | 56.5 | 56.7 | 8.0 MB |-| Smooth | 39k | 2.58 | 2.65 | 1.32 | 0.02 | **6.58** | 0.00 | 55.5 | 40.1 | 5.7 MB |-| Inflate | 38k | 1.79 | 2.24 | 1.17 | 0.02 | **5.23** | 0.00 | 39.8 | 40.7 | 5.6 MB |-| DamStandard | 37k | 1.95 | 2.30 | 1.18 | 0.02 | **5.46** | 0.00 | 40.0 | 38.6 | 5.4 MB |-| Layer | 37k | 2.72 | 2.33 | 1.18 | 0.02 | **6.26** | 0.00 | 45.8 | 41.4 | 5.6 MB |-| Move | 33k | 0.23 | 1.27 | 1.19 | 0.02 | **2.78** | 0.00 | 3.1 | 2.9 | 0.5 MB |-| Recipe (pattern) | 38k | 4.32 | 2.29 | 1.11 | 0.02 | **7.74** | 0.00 | 37.2 | 37.8 | 5.4 MB |-| Mask | 39k | 1.23 | 0.00 | 0.00 | 0.02 | **1.25** | 0.00 | 0.7 | 0.6 | 2.7 MB |-| Paint | 39k | 1.30 | 0.00 | 0.00 | 0.02 | **1.32** | 0.00 | 1.3 | 1.1 | 5.5 MB |+| Brush | verts/dab | uploaded verts (ranges) | kernel | normals | BVH refit | pick | GPU upload | **dab total** | stroke end (undo record) | undo | redo | undo step |+|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|+| Standard | 103k | 146k (38) | 1.50 | 1.27 | 0.94 | 0.01 | 2.79 | **7.49** | 0.13 | 11.4 | 11.9 | 11.4 MB |+| Standard (large, r 0.4) | 987k | 1.1M (93) | 6.27 | 8.59 | 5.65 | 0.01 | 18.48 | **45.14** | 0.30 | 39.8 | 38.4 | 38.7 MB |+| Clay | 58k | 87k (28) | 1.18 | 0.91 | 0.53 | 0.02 | 1.76 | **4.97** | 0.09 | 7.2 | 7.1 | 7.2 MB |+| ClayBuildup | 66k | 98k (30) | 1.35 | 1.03 | 0.62 | 0.02 | 6.50 | **10.14** | 0.08 | 7.8 | 7.8 | 8.0 MB |+| Smooth | 39k | 63k (24) | 1.17 | 0.78 | 0.35 | 0.02 | 1.33 | **4.07** | 0.08 | 6.0 | 6.7 | 5.7 MB |+| Smooth (large, r 0.4) | 468k | 556k (64) | 4.04 | 3.79 | 1.86 | 0.03 | 8.59 | **21.28** | 0.18 | 20.2 | 21.1 | 20.5 MB |+| Inflate | 38k | 61k (24) | 0.99 | 0.82 | 0.44 | 0.02 | 1.37 | **4.06** | 0.09 | 6.3 | 5.7 | 5.6 MB |+| DamStandard | 37k | 60k (23) | 1.03 | 0.87 | 0.39 | 0.02 | 1.36 | **4.11** | 0.07 | 5.3 | 5.6 | 5.4 MB |+| Layer | 37k | 60k (23) | 1.46 | 0.82 | 0.33 | 0.02 | 1.25 | **4.32** | 0.08 | 5.6 | 5.6 | 5.6 MB |+| Move | 34k | 55k (23) | 0.18 | 0.95 | 0.22 | 0.02 | 1.29 | **3.11** | 0.10 | 1.8 | 1.4 | 0.5 MB |+| Move (large, r 0.4) | 352k | 440k (49) | 0.57 | 3.03 | 1.57 | 0.04 | 7.22 | **14.76** | 0.06 | 5.3 | 5.3 | 5.8 MB |+| Recipe (pattern) | 38k | 61k (24) | 2.15 | 0.81 | 0.33 | 0.03 | 1.42 | **5.16** | 0.08 | 9.3 | 6.8 | 5.6 MB |+| Mask | 38k | 60k (24) | 0.98 | 0.00 | 0.00 | 0.03 | 1.11 | **2.54** | 0.11 | 1.6 | 1.3 | 2.8 MB |+| Paint | 38k | 60k (24) | 1.35 | 0.00 | 0.00 | 0.03 | 1.66 | **3.47** | 0.08 | 2.0 | 3.0 | 5.7 MB || Operation | ms ||---|---:|-| Lower Res (to 8.3M, after edits) | 4245 |-| Higher Res (back up) | 37 |-| Lower Res again (no edits) | 320 |-| Higher Res again (no edits) | 64 |-| Save project (1905 MB) | 8115 |-| Open project | 15487 |+| Lower Res (to 8.3M, after edits) | 829 |+| Higher Res (back up) | 10 |+| Lower Res again (no edits) | 42 |+| Higher Res again (no edits) | 10 |+| Save project (1373 MB) | 427 |+| Open project | 2132 |+| Open project: memory (RSS) | +3226 MB, peak +3769 MB |+| Motion proxy build (first move after an upload) | 127 |+| Orbit: frame time, 4x antialiasing | 9.2 (109 fps) |+| Orbit: frame time, no antialiasing | 6.9 (146 fps) |+| Orbit: triangles drawn | 15.9M (48%) |+| Orbit: frame time, Fast Navigation (no antialiasing, motion proxy) | 3.7 (270 fps) |+| Orbit: triangles drawn (motion proxy) | 6.4M (19%) |+| GPU memory with the motion proxy | 633 MB = 19.1 B/triangle |-### With the GPU, 4M-Threads: 10, GPU: Apple M1 Pro (G13S C0), OpenGL 4.6 (Core Profile) Mesa 26.1.8. Brushes use X symmetry (two dabs per step), radius 0.12 on a unit sphere unless noted, 10 dabs per stroke. Times in milliseconds.-#### 4.0M triangles (2.0M vertices, 5 subdivision levels)+### Memory per triangle (feat/mem)++Target from the brief: the whole scene under ~60 bytes per triangle at the top level, Divide to 100M+, opening a+33M project in under ~2 s without a 2x peak, and no slower dabs, undo or level stepping. Measured with the same+benchmark (it now also reports the process memory per triangle, the peak while dividing, and the memory and peak+of opening the project). Another agent's builds and benchmarks shared the machine, so every number is the better+of two runs, before and after alternating.++#### Summary (33M benchmark sphere)++| | before (main at aac5f68) | after (feat/mem) |+|---|---|---|+| Scene memory (CPU benchmark, process RSS) | 5.3 GB = 159 bytes per triangle | **3.0 GB = 90 bytes per triangle** |+| Sculpting mesh (with its adjacency) | 62 B/triangle | **39** |+| Subdivision level stack | 75 B/triangle | **29** |+| BVH (feat/brush's) | 19.5 B/triangle | 19.5 |+| Biggest Divide on this machine (30 GB) | 50M triangles (fixed limit) | **about 160M** (104M measured: 9.0 GB, 11 GB peak while dividing) |+| Divide up to 33M (the benchmark's setup) | 2428 ms | **1415 ms** |+| Open project | 4721 ms, the whole 1.9 GB file read into memory first | **2137 ms**, peak 1.15x the scene (+3.5 GB, peak +4.0 GB) |+| Save project | 663 ms, 1.9 GB file | **433 ms, 1.37 GB** |+| Lower Res after sculpting | 1543 ms | **876 ms** |+| Higher / Lower Res without edits | 10 / 40 ms | 8-13 / 43-55 ms |+| Medium dab (Standard), GPU upload included | 11.1 ms | 13.7 ms (CPU-only runs: 9.16 -> 9.09 ms) |+| Large dab (radius 0.4) | 62.6 ms | 64.8 ms |+| Smooth / Clay dab | 5.47 / 6.57 ms | 5.77 / 7.02 ms |+| Undo of a medium / large stroke | 21.8 / 69.1 ms | 25.5 / 70.0 ms (CPU-only: 21.4 -> 21.6 ms) |+| Orbit, 4x antialiasing | 19.7 ms | 20.0 ms |++At 16M the dabs are 0-20% slower (Standard 7.79 -> 7.69 ms, Clay 4.05 -> 4.68, Smooth 2.98 -> 3.50, Mask 1.50 ->+1.71): the rings and triangle lists of implicit adjacency take a few nanoseconds more per vertex than reading+stored lists, which shows in the normal update, the BVH refit, Smooth and the renderer's curvature (part of the+GPU upload). Undo is the same or faster.++#### What changed++- **Generated levels** (core/Multires.h, `SubdivTopology::generated`): a level made by Divide numbers its+ vertices as coarse vertices, then edge points, then face points, and lays its triangles out polygon by polygon+ (`generateFaces`). Such a level stores no triangles or quad pairs (in `SubdivLevel::data`), no child maps and no+ per-triangle parents and corner codes; all of them follow from the coarse polygons. The working mesh gets its+ triangles generated when the level is entered. Levels from Reconstruct Subdiv, imports and older projects whose+ numbering matches are recognised as generated; other levels keep the old path.+- **Details or positions, not both**: a level that isn't stale keeps its positions and no detail; the detail is+ fitted to the positions when a lower level is about to change (before the levels above are marked stale), and+ dropped again once a stale level is evaluated. Folding edits at the current level into the stack no longer+ re-fits every level's detail, which is why Lower Res after sculpting got faster.+- **Coarse topology**: exact capacities (the polygon lists were reserved for all triangles), the quad pairing and+ the UV corner table are derived (a byte per quad says which diagonal it has).+- **Implicit adjacency** (`Mesh::implicitAdjacency`): the working mesh of a generated level (manifold, coarse+ valences up to 32) stores no vertex-vertex or vertex-triangle lists. `Mesh::neighbors` and+ `Mesh::vertexTriangles` return an `IndexRing` (a span-like list, ascending as before) worked out from the+ level's topology: closed forms per kind of fine vertex (corner, edge point, face point; Catmull-Clark and Loop),+ with two small indexes built when the level becomes current (each coarse vertex's polygon corners, each coarse+ edge's sides; about 4.5 bytes per triangle) so most lookups read one or two cache lines and sort at most 4+ values with a branchless network. The lists are identical to the stored ones (tested on quads, mixed+ quads/triangles, open meshes and Loop), so every brush, the normals, undo, the BVH and the renderer give+ bit-identical results. Meshes without levels, non-manifold ones and higher valences keep the stored lists.+- **Project format 6** (core/Project.cpp): generated levels are written without triangles or child maps, and a+ level without a detail takes the one that fits its positions. Projects of format 5 and older open unchanged+ (tested with files saved by 0.5) and their levels become generated. Opening reads each blob straight into its+ array (`readStoredZipIndex` + `pread`, big arrays in parallel) instead of reading the whole archive into memory+ first; the mesh's topology is built once, after its levels are attached; level data is no longer given a full+ topology and normals just to be thrown away; and the BVH of a big mesh is built on its own thread (it only needs+ the positions and triangles) while the levels and topology load, with the main thread's work kept off the+ shared pool meanwhile. Saving writes the mesh arrays straight from memory (`ZipEntry::external`) instead of+ copying them into the archive list first.+- **Divide's limit** (`subdivMaxTriangles`) is what fits in 60% of the computer's memory at 110 bytes per triangle+ (the measured scene plus the peak while dividing), between 50 million and 1 billion: about 160 million on this+ machine.+- **makeCube** welds at every resolution: mirrored sides computed 2i/n - 1 and 2(n-i)/n - 1, which aren't exact+ opposites in floating point, so resolutions such as 13 and 26 (the base of the 33M benchmark sphere) left a few+ unwelded vertices along the cube's edges (reported by the view agent).++#### Memory per triangle (33M benchmark sphere)++| | before | after |+|---|---|---|+| Mesh: positions 6, normals 6, triangles 12, quad pairs 4, polygroups 4, normal-update stamps 2, dirty bits | 34 | 34 |+| Mesh: vertex-vertex and vertex-triangle lists (CSR) | 28 | **0** (implicit) |+| Mesh: implicit adjacency indexes (corners per coarse vertex, sides per coarse edge) | | 4.5 |+| Levels: the top level's data (positions 6, triangles 12, quad pairs 4, polygroups 4) | 26 | **10** (positions, polygroups) |+| Levels: the top level's detail | 6 | **0** (fitted to the positions when needed) |+| Levels: the top level's topology (coarse polygons and edges 18 -> 12; child maps 2, parents and corner codes 11 -> 0) | 31 | **12** |+| Levels: everything below the top (a quarter, a sixteenth, ...) | 12 | 7 |+| BVH | 19.5 | 19.5 |+| **Total (CPU)** | **157** | **87** |+| GPU buffers (unchanged; estimate) | about 26 | about 26 |++#### Known limits++- The scene is at about 87 bytes per triangle (90 measured as RSS), not the ~60 of the brief: the mesh (39) and+ the levels (29) are down from 137 to 68, but the BVH (19.5, feat/brush's) and the GPU-side buffers are unchanged+ here. What is left in mine: the current level's reference copy of its positions in the stack (6, needed to see+ what a stroke changed), the coarse topology of the top level (12: edges, their polygons, polygon lists), the+ sculpting mesh's triangles (12) and quad pairs (4, which on a generated level are just 2i, 2i + 1), the+ implicit adjacency indexes (4.5) and the normal-update stamps (2). The quad pairs and the coarse edge lists are+ the next candidates.+- Implicit lookups cost a few nanoseconds more per vertex than reading stored lists, so dabs are 0-20% slower+ (most at 4-16M with small brushes; at 33M the large dab is 3.5% slower and CPU-only medium dabs and undo are+ unchanged). The brief asked for no slower dabs: this trades about 23 bytes per triangle (760 MB at 33M) for it.+ Keeping the stored vertex-vertex lists (and only the triangle lists implicit) would win most of that speed back+ for about 10 of those bytes; I tried denser layouts for the implicit lists, which didn't help (the cost is the+ work per lookup, not memory reads).+- Opening a 33M project is bounded by the BVH build (about 1.7 s, running in parallel with the rest, which takes+ about 1.5 s): 2.1-2.5 s instead of 4.7 s, not yet reliably under 2 s. A faster BVH build (feat/brush) or+ storing the BVH in the project would bring it there.+- Format 6 projects don't open in 0.5.++### Benchmark tables (feat/mem)++#### Before (main at aac5f68), with the GPU++Threads: 10, GPU: Apple M1 Pro (G13S C0), OpenGL 4.6 (Core Profile) Mesa 26.1.8. Brushes use X symmetry (two dabs per step), radius 0.12 on a unit sphere unless noted, 40 dabs per stroke. Times in milliseconds.++##### 4.0M triangles (2.0M vertices, 5 subdivision levels)| Setup | ||---|---|-| Divide up to this size | 463 |-| BVH build | 767 |-| First GPU upload | 98 |-| Mesh (incl. topology) | 358 MB = 90 B/triangle |+| Divide up to this size | 268 |+| BVH build | 217 |+| First GPU upload | 92 |+| Mesh (incl. topology) | 247 MB = 62 B/triangle || BVH | 78 MB = 19.5 B/triangle || Subdivision levels (stack) | 297 MB = 74 B/triangle |-| Process memory (RSS) | 801 MB (+730 MB) |+| Process memory (RSS) | 719 MB (+648 MB) |-| Brush | verts/dab | kernel | normals | BVH refit | pick | GPU upload | **dab total** | stroke end (undo record) | undo | redo | undo step |-|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|-| Standard | 9k | 0.42 | 0.52 | 0.25 | 0.00 | 22.36 | **23.57** | 0.00 | 1.9 | 1.8 | 0.3 MB |-| Standard (large, r 0.4) | 147k | 6.78 | 9.16 | 5.13 | 0.00 | 23.38 | **44.48** | 0.00 | 28.4 | 36.0 | 4.2 MB |-| Clay | 8k | 0.75 | 0.57 | 0.27 | 0.01 | 26.43 | **28.05** | 0.00 | 1.5 | 1.5 | 0.3 MB |-| ClayBuildup | 13k | 0.64 | 0.75 | 0.34 | 0.01 | 23.57 | **25.32** | 0.00 | 2.1 | 2.1 | 0.4 MB |-| Smooth | 7k | 0.49 | 0.42 | 0.32 | 0.01 | 23.69 | **24.94** | 0.00 | 1.4 | 1.3 | 0.2 MB |-| Inflate | 7k | 0.34 | 0.40 | 0.20 | 0.01 | 21.50 | **22.45** | 0.00 | 1.3 | 1.5 | 0.2 MB |-| DamStandard | 7k | 0.35 | 0.42 | 0.18 | 0.01 | 21.82 | **22.78** | 0.00 | 1.3 | 1.4 | 0.2 MB |-| Layer | 7k | 0.64 | 0.43 | 0.19 | 0.01 | 22.58 | **23.85** | 0.00 | 1.6 | 1.7 | 0.2 MB |-| Move | 6k | 0.05 | 0.27 | 0.17 | 0.01 | 19.98 | **20.53** | 0.00 | 0.6 | 0.6 | 0.1 MB |-| Recipe (pattern) | 8k | 0.89 | 0.44 | 0.19 | 0.01 | 23.07 | **24.60** | 0.00 | 1.4 | 1.4 | 0.2 MB |-| Mask | 8k | 0.35 | 0.00 | 0.00 | 0.01 | 23.60 | **23.97** | 0.00 | 0.0 | 0.0 | 0.1 MB |-| Paint | 8k | 0.35 | 0.00 | 0.00 | 0.01 | 24.31 | **24.68** | 0.00 | 0.1 | 0.1 | 0.2 MB |+| Brush | verts/dab | uploaded verts (ranges) | kernel | normals | BVH refit | pick | GPU upload | **dab total** | stroke end (undo record) | undo | redo | undo step |+|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|+| Standard | 12k | 24k (15) | 0.50 | 0.47 | 0.39 | 0.00 | 0.35 | **1.75** | 0.00 | 4.7 | 4.7 | 1.4 MB |+| Standard (large, r 0.4) | 118k | 148k (45) | 3.26 | 3.40 | 1.93 | 0.00 | 2.28 | **11.10** | 0.00 | 9.5 | 9.7 | 4.6 MB |+| Clay | 7k | 16k (11) | 0.34 | 0.33 | 0.23 | 0.00 | 0.28 | **1.22** | 0.00 | 2.2 | 2.6 | 0.9 MB |+| ClayBuildup | 8k | 18k (12) | 0.43 | 0.31 | 0.25 | 0.00 | 0.25 | **1.27** | 0.00 | 3.1 | 2.9 | 0.8 MB |+| Smooth | 5k | 12k (9) | 0.24 | 0.18 | 0.12 | 0.00 | 0.17 | **0.74** | 0.00 | 2.4 | 3.2 | 0.6 MB |+| Inflate | 5k | 12k (9) | 0.20 | 0.17 | 0.13 | 0.00 | 0.16 | **0.68** | 0.00 | 3.0 | 3.0 | 0.6 MB |+| DamStandard | 4k | 12k (9) | 0.20 | 0.16 | 0.12 | 0.00 | 0.16 | **0.65** | 0.00 | 3.2 | 3.3 | 0.5 MB |+| Layer | 5k | 12k (9) | 0.31 | 0.18 | 0.12 | 0.00 | 0.17 | **0.80** | 0.00 | 4.4 | 4.3 | 0.6 MB |+| Move | 4k | 10k (8) | 0.02 | 0.10 | 0.09 | 0.00 | 0.13 | **0.37** | 0.00 | 0.3 | 0.2 | 0.1 MB |+| Recipe (pattern) | 5k | 13k (9) | 0.48 | 0.17 | 0.12 | 0.00 | 0.17 | **0.97** | 0.00 | 4.2 | 4.4 | 0.6 MB |+| Mask | 5k | 12k (9) | 0.19 | 0.00 | 0.00 | 0.00 | 0.23 | **0.44** | 0.00 | 0.1 | 0.1 | 0.3 MB |+| Paint | 5k | 12k (9) | 0.18 | 0.00 | 0.00 | 0.00 | 0.30 | **0.50** | 0.00 | 0.1 | 0.1 | 0.6 MB || Operation | ms ||---|---:|-| Lower Res (to 995k, after edits) | 475 |-| Higher Res (back up) | 2 |-| Lower Res again (no edits) | 7 |-| Higher Res again (no edits) | 2 |-| Save project (228 MB) | 908 |-| Open project | 2026 |-| Orbit: frame time | 5.1 (194 fps) |--### With the GPU, 16M--Threads: 10, GPU: Apple M1 Pro (G13S C0), OpenGL 4.6 (Core Profile) Mesa 26.1.8. Brushes use X symmetry (two dabs per step), radius 0.12 on a unit sphere unless noted, 10 dabs per stroke. Times in milliseconds.+| Lower Res (to 995k, after edits) | 191 |+| Higher Res (back up) | 1 |+| Lower Res again (no edits) | 5 |+| Higher Res again (no edits) | 1 |+| Save project (228 MB) | 91 |+| Open project | 573 |+| Orbit: frame time, 4x antialiasing | 5.0 (200 fps) |+| Orbit: frame time, Fast Navigation (no antialiasing) | 3.2 (314 fps) |-#### 15.9M triangles (8.0M vertices, 6 subdivision levels)+##### 15.9M triangles (8.0M vertices, 6 subdivision levels)| Setup | ||---|---|-| Divide up to this size | 2281 |-| BVH build | 3320 |-| First GPU upload | 514 |-| Mesh (incl. topology) | 1433 MB = 90 B/triangle |+| Divide up to this size | 1183 |+| BVH build | 790 |+| First GPU upload | 358 |+| Mesh (incl. topology) | 988 MB = 62 B/triangle || BVH | 311 MB = 19.5 B/triangle || Subdivision levels (stack) | 1188 MB = 75 B/triangle |-| Process memory (RSS) | 2828 MB (+2757 MB) |+| Process memory (RSS) | 2720 MB (+2224 MB) |-| Brush | verts/dab | kernel | normals | BVH refit | pick | GPU upload | **dab total** | stroke end (undo record) | undo | redo | undo step |-|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|-| Standard | 37k | 1.62 | 2.14 | 1.09 | 0.01 | 161.12 | **165.99** | 0.00 | 26.0 | 16.9 | 1.3 MB |-| Standard (large, r 0.4) | 589k | 53.96 | 87.81 | 50.14 | 0.01 | 379.68 | **571.63** | 0.00 | 124.1 | 112.5 | 17.0 MB |-| Clay | 32k | 1.45 | 1.77 | 0.86 | 0.01 | 148.08 | **152.18** | 0.00 | 6.2 | 6.1 | 1.1 MB |-| ClayBuildup | 51k | 2.45 | 2.91 | 1.54 | 0.01 | 150.24 | **157.18** | 0.01 | 8.7 | 9.2 | 1.5 MB |-| Smooth | 30k | 1.94 | 1.82 | 0.99 | 0.01 | 154.28 | **159.06** | 0.01 | 5.4 | 5.3 | 1.0 MB |-| Inflate | 29k | 1.36 | 1.68 | 0.86 | 0.01 | 152.70 | **156.62** | 0.00 | 6.2 | 6.0 | 1.0 MB |-| DamStandard | 29k | 1.39 | 1.70 | 0.81 | 0.01 | 163.71 | **167.64** | 0.01 | 6.9 | 11.5 | 1.0 MB |-| Layer | 30k | 2.48 | 1.66 | 0.77 | 0.01 | 149.94 | **154.88** | 0.00 | 5.4 | 5.4 | 1.0 MB |-| Move | 23k | 0.22 | 0.89 | 0.67 | 0.01 | 141.54 | **143.53** | 0.01 | 2.3 | 2.2 | 0.4 MB |-| Recipe (pattern) | 31k | 3.35 | 1.72 | 1.49 | 0.01 | 159.51 | **166.10** | 0.01 | 5.7 | 6.3 | 1.0 MB |-| Mask | 31k | 1.68 | 0.00 | 0.00 | 0.01 | 161.04 | **162.75** | 0.00 | 0.1 | 0.2 | 0.5 MB |-| Paint | 31k | 1.27 | 0.00 | 0.00 | 0.01 | 153.57 | **154.86** | 0.01 | 0.3 | 0.2 | 1.0 MB |+| Brush | verts/dab | uploaded verts (ranges) | kernel | normals | BVH refit | pick | GPU upload | **dab total** | stroke end (undo record) | undo | redo | undo step |+|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|+| Standard | 50k | 76k (15) | 2.45 | 2.28 | 1.37 | 0.00 | 1.52 | **7.79** | 0.00 | 14.8 | 12.8 | 5.4 MB |+| Standard (large, r 0.4) | 472k | 525k (45) | 8.96 | 9.50 | 5.84 | 0.01 | 8.50 | **33.62** | 0.00 | 34.3 | 32.8 | 18.5 MB |+| Clay | 28k | 47k (11) | 1.20 | 1.20 | 0.78 | 0.01 | 0.78 | **4.05** | 0.00 | 7.7 | 7.8 | 3.5 MB |+| ClayBuildup | 33k | 55k (12) | 1.58 | 1.35 | 0.82 | 0.01 | 0.85 | **4.70** | 0.00 | 8.1 | 8.0 | 3.8 MB |+| Smooth | 19k | 37k (9) | 0.97 | 0.80 | 0.58 | 0.01 | 0.56 | **2.98** | 0.00 | 6.6 | 7.0 | 2.7 MB |+| Inflate | 18k | 36k (9) | 0.80 | 0.83 | 0.61 | 0.01 | 0.55 | **2.87** | 0.00 | 7.3 | 7.0 | 2.6 MB |+| DamStandard | 18k | 35k (9) | 0.89 | 0.85 | 0.62 | 0.01 | 0.53 | **2.96** | 0.00 | 6.7 | 6.4 | 2.5 MB |+| Layer | 19k | 36k (9) | 1.22 | 0.91 | 0.63 | 0.01 | 0.57 | **3.41** | 0.00 | 9.6 | 6.8 | 2.6 MB |+| Move | 16k | 29k (8) | 0.14 | 0.47 | 0.63 | 0.01 | 0.44 | **1.75** | 0.00 | 1.3 | 1.2 | 0.3 MB |+| Recipe (pattern) | 19k | 37k (9) | 1.98 | 0.86 | 0.60 | 0.01 | 0.57 | **4.09** | 0.00 | 8.7 | 8.4 | 2.6 MB |+| Mask | 19k | 36k (9) | 0.73 | 0.00 | 0.00 | 0.01 | 0.70 | **1.50** | 0.00 | 0.3 | 0.3 | 1.3 MB |+| Paint | 19k | 36k (9) | 0.66 | 0.00 | 0.00 | 0.01 | 0.96 | **1.70** | 0.00 | 0.5 | 0.4 | 2.6 MB || Operation | ms ||---|---:|-| Lower Res (to 4.0M, after edits) | 1492 |-| Higher Res (back up) | 7 |-| Lower Res again (no edits) | 20 |+| Lower Res (to 4.0M, after edits) | 780 |+| Higher Res (back up) | 5 |+| Lower Res again (no edits) | 19 || Higher Res again (no edits) | 5 |-| Save project (913 MB) | 3134 |-| Open project | 8582 |-| Orbit: frame time | 12.7 (79 fps) |+| Save project (913 MB) | 345 |+| Open project | 2199 |+| Orbit: frame time, 4x antialiasing | 11.6 (86 fps) |+| Orbit: frame time, Fast Navigation (no antialiasing) | 8.4 (119 fps) |-### With the GPU, 33M (no project round trip)--Threads: 10, GPU: Apple M1 Pro (G13S C0), OpenGL 4.6 (Core Profile) Mesa 26.1.8. Brushes use X symmetry (two dabs per step), radius 0.12 on a unit sphere unless noted, 10 dabs per stroke. Times in milliseconds.--#### 33.2M triangles (16.6M vertices, 7 subdivision levels)+##### 33.2M triangles (16.6M vertices, 7 subdivision levels)| Setup | ||---|---|-| Divide up to this size | 4091 |-| BVH build | 6244 |-| First GPU upload | 907 |-| Mesh (incl. topology) | 2990 MB = 90 B/triangle |+| Divide up to this size | 2428 |+| BVH build | 1665 |+| First GPU upload | 736 |+| Mesh (incl. topology) | 2062 MB = 62 B/triangle || BVH | 648 MB = 19.5 B/triangle || Subdivision levels (stack) | 2481 MB = 75 B/triangle |-| Process memory (RSS) | 5833 MB (+5763 MB) |+| Process memory (RSS) | 5664 MB (+4824 MB) |-| Brush | verts/dab | kernel | normals | BVH refit | pick | GPU upload | **dab total** | stroke end (undo record) | undo | redo | undo step |-|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|-| Standard | 78k | 3.14 | 4.18 | 2.09 | 0.01 | 380.44 | **389.88** | 0.00 | 16.2 | 16.1 | 2.8 MB |-| Standard (large, r 0.4) | 1.2M | 48.26 | 73.61 | 43.62 | 0.01 | 382.34 | **547.84** | 0.00 | 220.1 | 219.8 | 35.5 MB |-| Clay | 68k | 2.82 | 3.50 | 1.76 | 0.01 | 380.26 | **388.35** | 0.00 | 13.0 | 13.3 | 2.4 MB |-| ClayBuildup | 107k | 4.81 | 5.55 | 2.92 | 0.01 | 380.61 | **393.90** | 0.00 | 17.8 | 17.8 | 3.1 MB |-| Smooth | 63k | 3.40 | 3.27 | 1.52 | 0.01 | 379.44 | **387.64** | 0.00 | 11.5 | 11.9 | 2.1 MB |-| Inflate | 61k | 2.52 | 3.18 | 1.57 | 0.01 | 380.18 | **387.47** | 0.00 | 12.3 | 11.3 | 2.1 MB |-| DamStandard | 61k | 2.63 | 3.19 | 1.52 | 0.01 | 381.24 | **388.60** | 0.00 | 11.3 | 11.1 | 2.0 MB |-| Layer | 63k | 4.98 | 3.28 | 1.49 | 0.01 | 379.55 | **389.33** | 0.00 | 12.3 | 11.6 | 2.1 MB |-| Move | 49k | 0.39 | 1.73 | 1.43 | 0.01 | 341.09 | **345.07** | 0.00 | 4.5 | 4.5 | 0.9 MB |-| Recipe (pattern) | 65k | 6.55 | 3.40 | 1.54 | 0.01 | 380.30 | **391.80** | 0.00 | 11.3 | 11.4 | 2.1 MB |-| Mask | 66k | 2.52 | 0.00 | 0.00 | 0.01 | 382.21 | **384.75** | 0.00 | 0.3 | 0.3 | 1.0 MB |-| Paint | 66k | 2.37 | 0.00 | 0.00 | 0.01 | 389.76 | **392.16** | 0.00 | 0.5 | 0.5 | 2.1 MB |+| Brush | verts/dab | uploaded verts (ranges) | kernel | normals | BVH refit | pick | GPU upload | **dab total** | stroke end (undo record) | undo | redo | undo step |+|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|+| Standard | 103k | 149k (21) | 4.05 | 3.26 | 1.98 | 0.00 | 3.07 | **12.72** | 0.00 | 21.8 | 21.2 | 11.4 MB |+| Standard (large, r 0.4) | 987k | 1.1M (57) | 17.52 | 18.05 | 11.48 | 0.01 | 14.05 | **62.60** | 0.00 | 69.1 | 68.4 | 38.7 MB |+| Clay | 58k | 91k (16) | 2.10 | 1.82 | 1.06 | 0.01 | 1.39 | **6.57** | 0.00 | 13.6 | 13.6 | 7.2 MB |+| ClayBuildup | 66k | 102k (17) | 2.61 | 2.11 | 1.14 | 0.01 | 1.72 | **7.82** | 0.00 | 15.5 | 14.8 | 8.0 MB |+| Smooth | 39k | 67k (14) | 1.75 | 1.61 | 0.79 | 0.02 | 1.15 | **5.47** | 0.00 | 11.4 | 10.8 | 5.7 MB |+| Inflate | 38k | 66k (14) | 1.63 | 1.53 | 0.80 | 0.02 | 1.29 | **5.43** | 0.00 | 10.8 | 10.3 | 5.6 MB |+| DamStandard | 37k | 65k (15) | 1.62 | 1.61 | 0.80 | 0.02 | 1.24 | **5.44** | 0.00 | 10.4 | 12.2 | 5.4 MB |+| Layer | 37k | 65k (14) | 2.11 | 1.65 | 0.77 | 0.02 | 1.21 | **5.92** | 0.00 | 12.0 | 10.1 | 5.6 MB |+| Move | 33k | 59k (10) | 0.31 | 0.84 | 0.80 | 0.02 | 1.26 | **3.42** | 0.00 | 1.8 | 2.1 | 0.5 MB |+| Recipe (pattern) | 38k | 68k (15) | 2.50 | 1.61 | 0.78 | 0.02 | 1.28 | **6.39** | 0.00 | 11.1 | 10.7 | 5.4 MB |+| Mask | 39k | 67k (15) | 1.41 | 0.00 | 0.00 | 0.02 | 1.65 | **3.22** | 0.00 | 0.8 | 0.6 | 2.7 MB |+| Paint | 39k | 67k (15) | 1.35 | 0.00 | 0.00 | 0.02 | 2.14 | **3.64** | 0.00 | 1.2 | 1.0 | 5.5 MB || Operation | ms ||---|---:|-| Lower Res (to 8.3M, after edits) | 2846 |+| Lower Res (to 8.3M, after edits) | 1583 || Higher Res (back up) | 10 |-| Lower Res again (no edits) | 43 |+| Lower Res again (no edits) | 40 || Higher Res again (no edits) | 10 |-| Orbit: frame time | 30.4 (33 fps) |--## After (feat/perf)+| Save project (1905 MB) | 663 |+| Open project | 4721 |+| Orbit: frame time, 4x antialiasing | 20.9 (48 fps) |+| Orbit: frame time, Fast Navigation (no antialiasing) | 14.4 (70 fps) |-### CPU only+#### After (feat/mem), with the GPU-Threads: 10. Brushes use X symmetry (two dabs per step), radius 0.12 on a unit sphere unless noted, 40 dabs per stroke. Times in milliseconds.+Threads: 10, GPU: Apple M1 Pro (G13S C0), OpenGL 4.6 (Core Profile) Mesa 26.1.8. Brushes use X symmetry (two dabs per step), radius 0.12 on a unit sphere unless noted, 40 dabs per stroke. Times in milliseconds.-#### 4.0M triangles (2.0M vertices, 5 subdivision levels)+##### 4.0M triangles (2.0M vertices, 5 subdivision levels)| Setup | ||---|---|-| Divide up to this size | 277 |-| BVH build | 215 |-| Mesh (incl. topology) | 247 MB = 62 B/triangle |+| Divide up to this size | 157 |+| BVH build | 247 |+| First GPU upload | 92 |+| Mesh (incl. topology) | 154 MB = 39 B/triangle || BVH | 78 MB = 19.5 B/triangle |-| Subdivision levels (stack) | 297 MB = 74 B/triangle |-| Process memory (RSS) | 643 MB (+633 MB) |+| Subdivision levels (stack) | 117 MB = 29 B/triangle |+| Process memory (RSS) | 451 MB (+381 MB = 96 B/triangle) |+| Peak while dividing (RSS) | 491 MB above the start |-| Brush | verts/dab | uploaded verts (ranges) | kernel | normals | BVH refit | pick | **dab total** | stroke end (undo record) | undo | redo | undo step |-|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|-| Standard | 12k | 24k (15) | 0.49 | 0.48 | 0.40 | 0.00 | **1.41** | 0.00 | 3.4 | 3.5 | 1.4 MB |-| Standard (large, r 0.4) | 118k | 148k (45) | 3.19 | 3.35 | 1.85 | 0.00 | **8.60** | 0.00 | 10.6 | 10.3 | 4.6 MB |-| Clay | 7k | 16k (11) | 0.31 | 0.27 | 0.20 | 0.00 | **0.81** | 0.00 | 2.7 | 2.4 | 0.9 MB |-| ClayBuildup | 8k | 18k (12) | 0.40 | 0.31 | 0.25 | 0.00 | **0.99** | 0.00 | 2.4 | 2.4 | 0.8 MB |-| Smooth | 5k | 12k (9) | 0.24 | 0.17 | 0.12 | 0.00 | **0.56** | 0.00 | 1.9 | 2.0 | 0.6 MB |-| Inflate | 5k | 12k (9) | 0.19 | 0.17 | 0.12 | 0.00 | **0.51** | 0.00 | 2.0 | 2.3 | 0.6 MB |-| DamStandard | 4k | 12k (9) | 0.20 | 0.17 | 0.11 | 0.00 | **0.50** | 0.00 | 2.0 | 1.9 | 0.5 MB |-| Layer | 5k | 12k (9) | 0.29 | 0.18 | 0.12 | 0.00 | **0.61** | 0.00 | 1.8 | 1.7 | 0.6 MB |-| Move | 4k | 10k (8) | 0.02 | 0.10 | 0.09 | 0.00 | **0.24** | 0.00 | 0.3 | 0.2 | 0.1 MB |-| Recipe (pattern) | 5k | 13k (9) | 0.47 | 0.17 | 0.12 | 0.00 | **0.78** | 0.00 | 1.9 | 1.6 | 0.6 MB |-| Mask | 5k | 12k (9) | 0.21 | 0.00 | 0.00 | 0.00 | **0.23** | 0.00 | 0.1 | 0.1 | 0.3 MB |-| Paint | 5k | 12k (9) | 0.17 | 0.00 | 0.00 | 0.00 | **0.19** | 0.00 | 0.1 | 0.1 | 0.6 MB |+| Brush | verts/dab | uploaded verts (ranges) | kernel | normals | BVH refit | pick | GPU upload | **dab total** | stroke end (undo record) | undo | redo | undo step |+|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|+| Standard | 12k | 24k (15) | 0.49 | 0.59 | 0.46 | 0.00 | 0.49 | **2.06** | 0.00 | 3.7 | 3.8 | 1.4 MB |+| Standard (large, r 0.4) | 118k | 148k (45) | 3.05 | 3.52 | 1.86 | 0.00 | 3.12 | **11.76** | 0.00 | 11.3 | 10.7 | 4.6 MB |+| Clay | 7k | 16k (11) | 0.31 | 0.35 | 0.24 | 0.00 | 0.32 | **1.24** | 0.00 | 2.4 | 2.3 | 0.9 MB |+| ClayBuildup | 8k | 18k (12) | 0.41 | 0.40 | 0.29 | 0.00 | 0.37 | **1.51** | 0.00 | 3.1 | 2.2 | 0.8 MB |+| Smooth | 5k | 12k (9) | 0.26 | 0.23 | 0.15 | 0.00 | 0.24 | **0.89** | 0.00 | 2.2 | 2.1 | 0.6 MB |+| Inflate | 5k | 12k (9) | 0.19 | 0.21 | 0.15 | 0.00 | 0.23 | **0.81** | 0.00 | 2.8 | 2.0 | 0.6 MB |+| DamStandard | 4k | 12k (9) | 0.20 | 0.21 | 0.14 | 0.00 | 0.23 | **0.79** | 0.00 | 2.1 | 2.0 | 0.5 MB |+| Layer | 5k | 12k (9) | 0.28 | 0.22 | 0.14 | 0.00 | 0.24 | **0.90** | 0.00 | 2.0 | 1.9 | 0.6 MB |+| Move | 4k | 10k (8) | 0.02 | 0.13 | 0.11 | 0.00 | 0.20 | **0.47** | 0.00 | 0.3 | 0.3 | 0.1 MB |+| Recipe (pattern) | 5k | 13k (9) | 0.47 | 0.22 | 0.14 | 0.00 | 0.24 | **1.09** | 0.00 | 1.9 | 2.0 | 0.6 MB |+| Mask | 5k | 12k (9) | 0.17 | 0.00 | 0.00 | 0.00 | 0.28 | **0.48** | 0.00 | 0.1 | 0.1 | 0.3 MB |+| Paint | 5k | 12k (9) | 0.17 | 0.00 | 0.00 | 0.00 | 0.35 | **0.54** | 0.00 | 0.1 | 0.1 | 0.6 MB || Operation | ms ||---|---:|-| Lower Res (to 995k, after edits) | 175 |+| Lower Res (to 995k, after edits) | 110 || Higher Res (back up) | 1 || Lower Res again (no edits) | 5 |-| Higher Res again (no edits) | 1 |-| Save project (228 MB) | 81 |-| Open project | 550 |+| Higher Res again (no edits) | 2 |+| Save project (165 MB) | 54 |+| Open project | 298 |+| Open project: memory (RSS) | +414 MB, peak +457 MB |+| Orbit: frame time, 4x antialiasing | 4.8 (209 fps) |+| Orbit: frame time, Fast Navigation (no antialiasing) | 3.0 (337 fps) |-#### 15.9M triangles (8.0M vertices, 6 subdivision levels)+##### 15.9M triangles (8.0M vertices, 6 subdivision levels)| Setup | ||---|---|-| Divide up to this size | 1140 |-| BVH build | 829 |-| Mesh (incl. topology) | 988 MB = 62 B/triangle |+| Divide up to this size | 797 |+| BVH build | 1098 |+| First GPU upload | 360 |+| Mesh (incl. topology) | 614 MB = 39 B/triangle || BVH | 311 MB = 19.5 B/triangle |-| Subdivision levels (stack) | 1188 MB = 75 B/triangle |-| Process memory (RSS) | 2589 MB (+2173 MB) |+| Subdivision levels (stack) | 470 MB = 29 B/triangle |+| Process memory (RSS) | 1640 MB (+1272 MB = 80 B/triangle) |+| Peak while dividing (RSS) | 1599 MB above the start |-| Brush | verts/dab | uploaded verts (ranges) | kernel | normals | BVH refit | pick | **dab total** | stroke end (undo record) | undo | redo | undo step |-|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|-| Standard | 50k | 76k (15) | 1.99 | 1.95 | 1.15 | 0.00 | **5.25** | 0.00 | 11.6 | 11.9 | 5.4 MB |-| Standard (large, r 0.4) | 472k | 525k (45) | 9.76 | 10.47 | 6.11 | 0.01 | **27.04** | 0.00 | 37.6 | 37.0 | 18.5 MB |-| Clay | 28k | 47k (11) | 1.19 | 1.15 | 0.69 | 0.01 | **3.14** | 0.00 | 7.7 | 7.6 | 3.5 MB |-| ClayBuildup | 33k | 55k (12) | 1.44 | 1.37 | 0.85 | 0.01 | **3.78** | 0.00 | 8.1 | 12.2 | 3.8 MB |-| Smooth | 19k | 37k (9) | 0.99 | 0.75 | 0.54 | 0.01 | **2.36** | 0.00 | 6.2 | 6.3 | 2.7 MB |-| Inflate | 18k | 36k (9) | 0.76 | 0.75 | 0.55 | 0.01 | **2.14** | 0.00 | 5.9 | 6.0 | 2.6 MB |-| DamStandard | 18k | 35k (9) | 0.80 | 0.73 | 0.52 | 0.01 | **2.12** | 0.00 | 5.5 | 5.9 | 2.5 MB |-| Layer | 19k | 36k (9) | 1.06 | 0.77 | 0.51 | 0.01 | **2.42** | 0.00 | 6.0 | 6.0 | 2.6 MB |-| Move | 16k | 29k (8) | 0.14 | 0.48 | 0.55 | 0.01 | **1.26** | 0.00 | 0.8 | 1.3 | 0.3 MB |-| Recipe (pattern) | 19k | 37k (9) | 1.71 | 0.77 | 0.51 | 0.01 | **3.06** | 0.00 | 5.8 | 5.7 | 2.6 MB |-| Mask | 19k | 36k (9) | 0.66 | 0.00 | 0.00 | 0.01 | **0.73** | 0.00 | 0.4 | 0.3 | 1.3 MB |-| Paint | 19k | 36k (9) | 0.65 | 0.00 | 0.00 | 0.01 | **0.72** | 0.00 | 0.5 | 0.4 | 2.6 MB |+| Brush | verts/dab | uploaded verts (ranges) | kernel | normals | BVH refit | pick | GPU upload | **dab total** | stroke end (undo record) | undo | redo | undo step |+|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|+| Standard | 50k | 76k (15) | 2.30 | 2.46 | 1.56 | 0.00 | 1.95 | **8.46** | 0.00 | 16.6 | 10.8 | 5.4 MB |+| Standard (large, r 0.4) | 472k | 525k (45) | 9.02 | 9.63 | 5.99 | 0.01 | 10.29 | **35.68** | 0.00 | 35.2 | 34.5 | 18.5 MB |+| Clay | 28k | 47k (11) | 1.18 | 1.44 | 0.93 | 0.01 | 1.03 | **4.68** | 0.00 | 8.7 | 8.6 | 3.5 MB |+| ClayBuildup | 33k | 55k (12) | 1.75 | 1.77 | 1.18 | 0.01 | 1.28 | **6.09** | 0.00 | 11.7 | 9.5 | 3.8 MB |+| Smooth | 19k | 37k (9) | 1.05 | 0.94 | 0.65 | 0.01 | 0.77 | **3.50** | 0.00 | 6.5 | 6.6 | 2.7 MB |+| Inflate | 18k | 36k (9) | 0.83 | 1.07 | 0.79 | 0.01 | 0.76 | **3.52** | 0.00 | 9.3 | 7.2 | 2.6 MB |+| DamStandard | 18k | 35k (9) | 0.86 | 0.96 | 0.67 | 0.01 | 0.73 | **3.30** | 0.00 | 6.6 | 6.5 | 2.5 MB |+| Layer | 19k | 36k (9) | 1.22 | 1.03 | 0.72 | 0.01 | 0.77 | **3.80** | 0.00 | 8.2 | 6.9 | 2.6 MB |+| Move | 16k | 29k (8) | 0.14 | 0.60 | 0.74 | 0.01 | 0.60 | **2.16** | 0.00 | 1.7 | 1.7 | 0.3 MB |+| Recipe (pattern) | 19k | 37k (9) | 2.07 | 1.02 | 0.67 | 0.01 | 0.80 | **4.63** | 0.00 | 8.0 | 7.9 | 2.6 MB |+| Mask | 19k | 36k (9) | 0.72 | 0.00 | 0.00 | 0.01 | 0.91 | **1.71** | 0.00 | 0.3 | 0.3 | 1.3 MB |+| Paint | 19k | 36k (9) | 0.64 | 0.00 | 0.00 | 0.01 | 1.20 | **1.92** | 0.00 | 0.5 | 0.4 | 2.6 MB || Operation | ms ||---|---:|-| Lower Res (to 4.0M, after edits) | 718 |+| Lower Res (to 4.0M, after edits) | 434 || Higher Res (back up) | 5 |-| Lower Res again (no edits) | 20 |-| Higher Res again (no edits) | 5 |-| Save project (913 MB) | 321 |-| Open project | 2278 |+| Lower Res again (no edits) | 24 |+| Higher Res again (no edits) | 6 |+| Save project (658 MB) | 231 |+| Open project | 1047 |+| Open project: memory (RSS) | +1621 MB, peak +1875 MB |+| Orbit: frame time, 4x antialiasing | 11.9 (84 fps) |+| Orbit: frame time, Fast Navigation (no antialiasing) | 8.4 (118 fps) |-#### 33.2M triangles (16.6M vertices, 7 subdivision levels)+##### 33.2M triangles (16.6M vertices, 7 subdivision levels)| Setup | ||---|---|-| Divide up to this size | 2526 |-| BVH build | 1747 |-| Mesh (incl. topology) | 2062 MB = 62 B/triangle |+| Divide up to this size | 1415 |+| BVH build | 1675 |+| First GPU upload | 710 |+| Mesh (incl. topology) | 1281 MB = 39 B/triangle || BVH | 648 MB = 19.5 B/triangle |-| Subdivision levels (stack) | 2481 MB = 75 B/triangle |-| Process memory (RSS) | 5366 MB (+4797 MB) |+| Subdivision levels (stack) | 980 MB = 29 B/triangle |+| Process memory (RSS) | 3306 MB (+2520 MB = 76 B/triangle) |+| Peak while dividing (RSS) | 3185 MB above the start |-| Brush | verts/dab | uploaded verts (ranges) | kernel | normals | BVH refit | pick | **dab total** | stroke end (undo record) | undo | redo | undo step |-|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|-| Standard | 103k | 149k (21) | 3.84 | 3.01 | 1.79 | 0.00 | **8.97** | 0.00 | 23.7 | 22.2 | 11.4 MB |-| Standard (large, r 0.4) | 987k | 1.1M (57) | 19.07 | 20.32 | 12.46 | 0.01 | **53.27** | 0.00 | 76.6 | 76.7 | 38.7 MB |-| Clay | 58k | 91k (16) | 2.26 | 2.16 | 1.08 | 0.01 | **5.72** | 0.00 | 15.3 | 15.1 | 7.2 MB |-| ClayBuildup | 66k | 102k (17) | 2.68 | 2.38 | 1.31 | 0.01 | **6.63** | 0.00 | 16.5 | 16.2 | 8.0 MB |-| Smooth | 39k | 67k (14) | 1.78 | 1.54 | 0.82 | 0.02 | **4.32** | 0.00 | 11.9 | 11.7 | 5.7 MB |-| Inflate | 38k | 66k (14) | 1.65 | 1.69 | 0.90 | 0.02 | **4.41** | 0.00 | 12.0 | 12.8 | 5.6 MB |-| DamStandard | 37k | 65k (15) | 1.65 | 1.74 | 0.84 | 0.02 | **4.41** | 0.00 | 11.8 | 11.5 | 5.4 MB |-| Layer | 37k | 65k (14) | 2.12 | 1.74 | 0.88 | 0.02 | **4.92** | 0.00 | 12.8 | 11.8 | 5.6 MB |-| Move | 33k | 59k (10) | 0.27 | 0.77 | 0.77 | 0.02 | **1.99** | 0.00 | 1.8 | 1.8 | 0.5 MB |-| Recipe (pattern) | 38k | 68k (15) | 2.61 | 1.63 | 0.81 | 0.02 | **5.22** | 0.00 | 12.1 | 11.6 | 5.4 MB |-| Mask | 39k | 67k (15) | 1.24 | 0.00 | 0.00 | 0.02 | **1.37** | 0.00 | 1.0 | 0.7 | 2.7 MB |-| Paint | 39k | 67k (15) | 1.25 | 0.00 | 0.00 | 0.02 | **1.38** | 0.00 | 1.3 | 1.1 | 5.5 MB |+| Brush | verts/dab | uploaded verts (ranges) | kernel | normals | BVH refit | pick | GPU upload | **dab total** | stroke end (undo record) | undo | redo | undo step |+|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|+| Standard | 103k | 147k (22) | 4.19 | 3.47 | 1.94 | 0.00 | 3.77 | **13.71** | 0.00 | 25.5 | 23.4 | 11.4 MB |+| Standard (large, r 0.4) | 987k | 1.1M (57) | 17.54 | 19.03 | 11.59 | 0.01 | 15.89 | **65.42** | 0.00 | 71.5 | 69.9 | 38.7 MB |+| Clay | 58k | 90k (16) | 2.09 | 1.82 | 1.03 | 0.01 | 1.85 | **7.02** | 0.00 | 14.3 | 14.1 | 7.2 MB |+| ClayBuildup | 66k | 101k (17) | 2.48 | 2.17 | 1.25 | 0.01 | 2.06 | **8.19** | 0.00 | 15.3 | 15.2 | 8.0 MB |+| Smooth | 39k | 67k (14) | 1.71 | 1.58 | 0.80 | 0.02 | 1.51 | **5.77** | 0.00 | 11.0 | 10.8 | 5.7 MB |+| Inflate | 38k | 65k (14) | 1.54 | 1.80 | 0.95 | 0.02 | 1.46 | **5.94** | 0.00 | 10.7 | 11.0 | 5.6 MB |+| DamStandard | 37k | 64k (14) | 1.54 | 1.76 | 0.91 | 0.02 | 1.64 | **6.03** | 0.00 | 10.4 | 10.4 | 5.4 MB |+| Layer | 37k | 65k (14) | 2.14 | 1.66 | 0.82 | 0.02 | 1.43 | **6.22** | 0.00 | 11.3 | 11.2 | 5.6 MB |+| Move | 33k | 58k (11) | 0.27 | 0.88 | 0.76 | 0.02 | 1.22 | **3.32** | 0.00 | 1.5 | 2.0 | 0.5 MB |+| Recipe (pattern) | 38k | 67k (14) | 2.66 | 1.78 | 0.81 | 0.02 | 1.58 | **7.03** | 0.00 | 11.4 | 11.4 | 5.4 MB |+| Mask | 39k | 66k (15) | 1.48 | 0.00 | 0.00 | 0.02 | 1.84 | **3.48** | 0.00 | 0.8 | 0.6 | 2.7 MB |+| Paint | 39k | 66k (15) | 1.38 | 0.00 | 0.00 | 0.02 | 2.30 | **3.83** | 0.00 | 1.2 | 1.0 | 5.5 MB || Operation | ms ||---|---:|-| Lower Res (to 8.3M, after edits) | 1539 |-| Higher Res (back up) | 10 |-| Lower Res again (no edits) | 41 |-| Higher Res again (no edits) | 10 |-| Save project (1905 MB) | 677 |-| Open project | 5679 |+| Lower Res (to 8.3M, after edits) | 876 |+| Higher Res (back up) | 13 |+| Lower Res again (no edits) | 55 |+| Higher Res again (no edits) | 11 |+| Save project (1373 MB) | 433 |+| Open project | 2137 |+| Open project: memory (RSS) | +3475 MB, peak +4017 MB |+| Orbit: frame time, 4x antialiasing | 20.0 (50 fps) |+| Orbit: frame time, Fast Navigation (no antialiasing) | 14.6 (68 fps) |-### With the GPU, 4M+#### After, CPU only, 64M-Threads: 10, GPU: Apple M1 Pro (G13S C0), OpenGL 4.6 (Core Profile) Mesa 26.1.8. Brushes use X symmetry (two dabs per step), radius 0.12 on a unit sphere unless noted, 10 dabs per stroke. Times in milliseconds.+Threads: 10. Brushes use X symmetry (two dabs per step), radius 0.12 on a unit sphere unless noted, 40 dabs per stroke. Times in milliseconds.-#### 4.0M triangles (2.0M vertices, 5 subdivision levels)+##### 63.7M triangles (31.9M vertices, 7 subdivision levels)| Setup | ||---|---|-| Divide up to this size | 301 |-| BVH build | 238 |-| First GPU upload | 90 |-| Mesh (incl. topology) | 247 MB = 62 B/triangle |-| BVH | 78 MB = 19.5 B/triangle |-| Subdivision levels (stack) | 297 MB = 74 B/triangle |-| Process memory (RSS) | 720 MB (+650 MB) |--| Brush | verts/dab | uploaded verts (ranges) | kernel | normals | BVH refit | pick | GPU upload | **dab total** | stroke end (undo record) | undo | redo | undo step |-|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|-| Standard | 9k | 20k (12) | 0.36 | 0.36 | 0.30 | 0.00 | 0.28 | **1.33** | 0.00 | 1.2 | 1.4 | 0.3 MB |-| Standard (large, r 0.4) | 147k | 183k (53) | 3.77 | 3.99 | 2.15 | 0.00 | 2.99 | **13.17** | 0.00 | 9.3 | 9.4 | 4.2 MB |-| Clay | 8k | 17k (11) | 0.33 | 0.31 | 0.24 | 0.00 | 0.24 | **1.15** | 0.00 | 1.6 | 1.5 | 0.3 MB |-| ClayBuildup | 13k | 24k (13) | 0.56 | 0.48 | 0.40 | 0.00 | 0.34 | **1.82** | 0.00 | 1.7 | 1.8 | 0.4 MB |-| Smooth | 7k | 16k (10) | 0.35 | 0.28 | 0.19 | 0.00 | 0.23 | **1.06** | 0.00 | 1.0 | 0.9 | 0.2 MB |-| Inflate | 7k | 16k (10) | 0.28 | 0.26 | 0.20 | 0.00 | 0.22 | **0.98** | 0.00 | 0.8 | 1.1 | 0.2 MB |-| DamStandard | 7k | 16k (10) | 0.30 | 0.26 | 0.19 | 0.00 | 0.21 | **0.98** | 0.00 | 0.8 | 1.2 | 0.2 MB |-| Layer | 7k | 16k (10) | 0.60 | 0.27 | 0.18 | 0.00 | 0.22 | **1.31** | 0.00 | 0.7 | 0.7 | 0.2 MB |-| Move | 6k | 14k (9) | 0.03 | 0.15 | 0.17 | 0.00 | 0.18 | **0.59** | 0.00 | 0.4 | 0.4 | 0.1 MB |-| Recipe (pattern) | 8k | 17k (11) | 0.83 | 0.28 | 0.20 | 0.00 | 0.23 | **1.57** | 0.00 | 1.5 | 1.0 | 0.2 MB |-| Mask | 8k | 16k (10) | 0.30 | 0.00 | 0.00 | 0.00 | 0.39 | **0.72** | 0.00 | 0.0 | 0.0 | 0.1 MB |-| Paint | 8k | 16k (10) | 0.25 | 0.00 | 0.00 | 0.00 | 0.60 | **0.88** | 0.00 | 0.0 | 0.0 | 0.2 MB |+| Divide up to this size | 2809 |+| BVH build | 3347 |+| Mesh (incl. topology) | 2456 MB = 39 B/triangle |+| BVH | 1244 MB = 19.5 B/triangle |+| Subdivision levels (stack) | 1879 MB = 29 B/triangle |+| Process memory (RSS) | 5763 MB (+5753 MB = 90 B/triangle) |+| Peak while dividing (RSS) | 6786 MB above the start |-| Operation | ms |-|---|---:|-| Lower Res (to 995k, after edits) | 170 |-| Higher Res (back up) | 1 |-| Lower Res again (no edits) | 5 |-| Higher Res again (no edits) | 1 |-| Save project (228 MB) | 81 |-| Open project | 572 |-| Orbit: frame time, 4x antialiasing | 5.0 (201 fps) |-| Orbit: frame time, Fast Navigation (no antialiasing) | 3.1 (325 fps) |--### With the GPU, 16M--Threads: 10, GPU: Apple M1 Pro (G13S C0), OpenGL 4.6 (Core Profile) Mesa 26.1.8. Brushes use X symmetry (two dabs per step), radius 0.12 on a unit sphere unless noted, 10 dabs per stroke. Times in milliseconds.--#### 15.9M triangles (8.0M vertices, 6 subdivision levels)--| Setup | |-|---|---|-| Divide up to this size | 1206 |-| BVH build | 846 |-| First GPU upload | 344 |-| Mesh (incl. topology) | 988 MB = 62 B/triangle |-| BVH | 311 MB = 19.5 B/triangle |-| Subdivision levels (stack) | 1188 MB = 75 B/triangle |-| Process memory (RSS) | 2670 MB (+2600 MB) |--| Brush | verts/dab | uploaded verts (ranges) | kernel | normals | BVH refit | pick | GPU upload | **dab total** | stroke end (undo record) | undo | redo | undo step |-|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|-| Standard | 37k | 60k (12) | 1.75 | 1.89 | 1.10 | 0.00 | 1.04 | **5.93** | 0.00 | 3.2 | 4.2 | 1.3 MB |-| Standard (large, r 0.4) | 589k | 650k (53) | 11.94 | 13.01 | 7.83 | 0.01 | 9.43 | **43.06** | 0.00 | 34.7 | 36.6 | 17.0 MB |-| Clay | 32k | 53k (11) | 1.48 | 1.48 | 0.82 | 0.00 | 0.87 | **4.77** | 0.00 | 2.7 | 3.3 | 1.1 MB |-| ClayBuildup | 51k | 77k (13) | 2.11 | 1.87 | 1.15 | 0.00 | 1.27 | **6.57** | 0.00 | 4.1 | 4.4 | 1.5 MB |-| Smooth | 30k | 51k (10) | 1.37 | 1.48 | 0.79 | 0.00 | 0.86 | **4.62** | 0.00 | 2.5 | 2.8 | 1.0 MB |-| Inflate | 29k | 50k (10) | 1.21 | 1.36 | 0.70 | 0.00 | 0.84 | **4.24** | 0.00 | 2.3 | 2.4 | 1.0 MB |-| DamStandard | 29k | 49k (10) | 1.18 | 1.39 | 0.76 | 0.00 | 0.81 | **4.29** | 0.00 | 2.4 | 2.6 | 1.0 MB |-| Layer | 30k | 51k (10) | 2.25 | 1.54 | 0.64 | 0.00 | 0.83 | **5.37** | 0.00 | 2.5 | 2.3 | 1.0 MB |-| Move | 23k | 42k (9) | 0.20 | 0.53 | 0.65 | 0.00 | 0.90 | **2.55** | 0.00 | 2.0 | 1.1 | 0.4 MB |-| Recipe (pattern) | 31k | 52k (11) | 2.03 | 1.41 | 0.76 | 0.00 | 0.87 | **5.20** | 0.00 | 2.4 | 2.7 | 1.0 MB |-| Mask | 31k | 52k (11) | 1.41 | 0.00 | 0.00 | 0.01 | 1.83 | **3.37** | 0.00 | 0.1 | 0.1 | 0.5 MB |-| Paint | 31k | 52k (11) | 1.01 | 0.00 | 0.00 | 0.00 | 2.25 | **3.36** | 0.00 | 0.2 | 0.1 | 1.0 MB |+| Brush | verts/dab | uploaded verts (ranges) | kernel | normals | BVH refit | pick | **dab total** | stroke end (undo record) | undo | redo | undo step |+|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|+| Standard | 198k | 259k (28) | 6.58 | 4.76 | 2.82 | 0.00 | **14.68** | 0.00 | 43.2 | 43.1 | 21.8 MB |+| Standard (large, r 0.4) | 1.9M | 2.0M (79) | 33.33 | 36.58 | 22.48 | 0.01 | **94.81** | 0.00 | 138.0 | 135.5 | 74.0 MB |+| Clay | 110k | 155k (21) | 4.23 | 2.97 | 1.75 | 0.02 | **9.31** | 0.00 | 25.6 | 25.8 | 13.8 MB |+| ClayBuildup | 120k | 166k (23) | 4.38 | 3.07 | 1.75 | 0.02 | **9.58** | 0.00 | 29.2 | 28.1 | 15.1 MB |+| Smooth | 71k | 108k (19) | 3.11 | 2.26 | 1.12 | 0.03 | **6.76** | 0.00 | 20.9 | 21.3 | 10.8 MB |+| Inflate | 69k | 106k (19) | 2.81 | 2.30 | 1.25 | 0.03 | **6.65** | 0.00 | 20.6 | 20.2 | 10.7 MB |+| DamStandard | 68k | 104k (18) | 2.59 | 2.19 | 1.15 | 0.03 | **6.21** | 0.00 | 19.6 | 19.4 | 10.4 MB |+| Layer | 70k | 107k (19) | 3.73 | 2.34 | 1.18 | 0.03 | **7.55** | 0.00 | 20.7 | 21.6 | 10.8 MB |+| Move | 64k | 98k (13) | 0.55 | 1.12 | 1.14 | 0.03 | **3.17** | 0.00 | 2.5 | 2.9 | 1.0 MB |+| Recipe (pattern) | 72k | 109k (19) | 4.01 | 2.42 | 1.15 | 0.04 | **7.90** | 0.00 | 21.0 | 21.2 | 10.6 MB |+| Mask | 72k | 108k (19) | 2.46 | 0.00 | 0.00 | 0.03 | **2.71** | 0.00 | 1.6 | 1.3 | 5.3 MB |+| Paint | 72k | 108k (19) | 2.34 | 0.00 | 0.00 | 0.03 | **2.57** | 0.00 | 2.6 | 2.3 | 10.7 MB || Operation | ms ||---|---:|-| Lower Res (to 4.0M, after edits) | 717 |-| Higher Res (back up) | 5 |-| Lower Res again (no edits) | 20 |-| Higher Res again (no edits) | 5 |-| Save project (913 MB) | 357 |-| Open project | 2279 |-| Orbit: frame time, 4x antialiasing | 11.8 (85 fps) |-| Orbit: frame time, Fast Navigation (no antialiasing) | 8.0 (125 fps) |+| Lower Res (to 15.9M, after edits) | 1551 |+| Higher Res (back up) | 25 |+| Lower Res again (no edits) | 76 |+| Higher Res again (no edits) | 21 |+| Save project (2633 MB) | 846 |+| Open project | 6307 |+| Open project: memory (RSS) | +6822 MB, peak +7821 MB |-### With the GPU, 33M (no project round trip)+#### After, CPU only, 104M (no project round trip)-Threads: 10, GPU: Apple M1 Pro (G13S C0), OpenGL 4.6 (Core Profile) Mesa 26.1.8. Brushes use X symmetry (two dabs per step), radius 0.12 on a unit sphere unless noted, 10 dabs per stroke. Times in milliseconds.+Threads: 10. Brushes use X symmetry (two dabs per step), radius 0.12 on a unit sphere unless noted, 40 dabs per stroke. Times in milliseconds.-#### 33.2M triangles (16.6M vertices, 7 subdivision levels)+##### 104.0M triangles (52.0M vertices, 8 subdivision levels)| Setup | ||---|---|-| Divide up to this size | 2570 |-| BVH build | 1748 |-| First GPU upload | 705 |-| Mesh (incl. topology) | 2062 MB = 62 B/triangle |-| BVH | 648 MB = 19.5 B/triangle |-| Subdivision levels (stack) | 2481 MB = 75 B/triangle |-| Process memory (RSS) | 5486 MB (+5415 MB) |+| Divide up to this size | 4889 |+| BVH build | 5896 |+| Mesh (incl. topology) | 4011 MB = 39 B/triangle |+| BVH | 2043 MB = 19.6 B/triangle |+| Subdivision levels (stack) | 3068 MB = 29 B/triangle |+| Process memory (RSS) | 8974 MB (+8964 MB = 86 B/triangle) |+| Peak while dividing (RSS) | 10982 MB above the start |-| Brush | verts/dab | uploaded verts (ranges) | kernel | normals | BVH refit | pick | GPU upload | **dab total** | stroke end (undo record) | undo | redo | undo step |-|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|-| Standard | 78k | 117k (18) | 3.10 | 2.88 | 1.58 | 0.00 | 2.49 | **10.32** | 0.00 | 5.5 | 5.9 | 2.8 MB |-| Standard (large, r 0.4) | 1.2M | 1.3M (67) | 26.54 | 27.08 | 17.16 | 0.02 | 20.26 | **92.91** | 0.00 | 69.1 | 68.2 | 35.5 MB |-| Clay | 68k | 104k (17) | 2.77 | 2.45 | 1.56 | 0.00 | 1.69 | **8.71** | 0.00 | 5.7 | 5.3 | 2.4 MB |-| ClayBuildup | 107k | 151k (21) | 3.98 | 3.02 | 1.62 | 0.01 | 2.51 | **11.46** | 0.00 | 6.5 | 6.6 | 3.1 MB |-| Smooth | 63k | 98k (17) | 2.93 | 2.28 | 1.18 | 0.01 | 1.77 | **8.39** | 0.00 | 4.5 | 5.6 | 2.1 MB |-| Inflate | 61k | 96k (16) | 2.50 | 2.17 | 1.19 | 0.01 | 1.87 | **7.97** | 0.00 | 4.8 | 4.8 | 2.1 MB |-| DamStandard | 61k | 96k (16) | 2.62 | 2.24 | 1.28 | 0.01 | 1.59 | **8.01** | 0.00 | 4.6 | 4.6 | 2.0 MB |-| Layer | 63k | 99k (17) | 4.87 | 2.34 | 1.26 | 0.01 | 1.81 | **10.57** | 0.00 | 4.7 | 4.9 | 2.1 MB |-| Move | 49k | 79k (14) | 0.42 | 0.91 | 1.05 | 0.01 | 1.65 | **4.61** | 0.00 | 2.2 | 1.9 | 0.9 MB |-| Recipe (pattern) | 65k | 102k (18) | 4.29 | 2.39 | 1.18 | 0.01 | 2.08 | **10.19** | 0.00 | 4.9 | 5.1 | 2.1 MB |-| Mask | 66k | 101k (18) | 2.52 | 0.00 | 0.00 | 0.01 | 3.03 | **5.76** | 0.01 | 0.3 | 0.2 | 1.0 MB |-| Paint | 66k | 101k (18) | 2.47 | 0.00 | 0.00 | 0.05 | 5.08 | **7.82** | 0.01 | 0.4 | 0.4 | 2.1 MB |+| Brush | verts/dab | uploaded verts (ranges) | kernel | normals | BVH refit | pick | **dab total** | stroke end (undo record) | undo | redo | undo step |+|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|+| Standard | 324k | 407k (43) | 9.69 | 7.10 | 5.00 | 0.00 | **22.61** | 0.00 | 70.3 | 68.2 | 35.6 MB |+| Standard (large, r 0.4) | 3.1M | 3.2M (114) | 54.36 | 60.70 | 42.49 | 0.02 | **161.53** | 0.00 | 262.4 | 261.4 | 121.1 MB |+| Clay | 181k | 242k (32) | 6.10 | 4.26 | 2.59 | 0.03 | **13.52** | 0.00 | 47.7 | 51.7 | 22.6 MB |+| ClayBuildup | 193k | 256k (34) | 6.94 | 4.91 | 3.10 | 0.04 | **15.59** | 0.00 | 51.3 | 52.3 | 24.4 MB |+| Smooth | 115k | 164k (28) | 4.76 | 3.13 | 1.60 | 0.05 | **9.96** | 0.00 | 35.2 | 35.1 | 17.4 MB |+| Inflate | 113k | 161k (27) | 4.43 | 3.27 | 1.85 | 0.05 | **10.01** | 0.00 | 34.7 | 36.1 | 17.2 MB |+| DamStandard | 111k | 159k (28) | 4.08 | 3.26 | 1.67 | 0.05 | **9.44** | 0.00 | 37.3 | 39.0 | 16.7 MB |+| Layer | 114k | 163k (28) | 5.86 | 3.11 | 1.69 | 0.05 | **11.11** | 0.00 | 41.4 | 38.9 | 17.4 MB |+| Move | 105k | 152k (30) | 0.78 | 1.57 | 1.83 | 0.05 | **4.76** | 0.00 | 4.1 | 4.1 | 1.7 MB |+| Recipe (pattern) | 117k | 167k (28) | 6.53 | 3.10 | 1.49 | 0.05 | **11.58** | 0.00 | 37.2 | 36.8 | 17.2 MB |+| Mask | 118k | 166k (28) | 3.85 | 0.00 | 0.00 | 0.05 | **4.26** | 0.00 | 2.6 | 2.3 | 8.6 MB |+| Paint | 118k | 166k (28) | 3.95 | 0.00 | 0.00 | 0.05 | **4.36** | 0.00 | 4.2 | 4.0 | 17.3 MB || Operation | ms ||---|---:|-| Lower Res (to 8.3M, after edits) | 1529 |-| Higher Res (back up) | 11 |-| Lower Res again (no edits) | 55 |-| Higher Res again (no edits) | 14 |-| Orbit: frame time, 4x antialiasing | 20.6 (49 fps) |-| Orbit: frame time, Fast Navigation (no antialiasing) | 14.0 (71 fps) |+| Lower Res (to 26.0M, after edits) | 2776 |+| Higher Res (back up) | 32 |+| Lower Res again (no edits) | 133 |+| Higher Res again (no edits) | 32 |-### CPU only, 64M (no project round trip)-Threads: 10. Brushes use X symmetry (two dabs per step), radius 0.12 on a unit sphere unless noted, 40 dabs per stroke. Times in milliseconds.+The v0.6 performance batch ran as three branches side by side (mem, brush, view); each adds its own subsection+here. Same machine and benchmark as above.-#### 63.7M triangles (31.9M vertices, 7 subdivision levels)+### Brushes: vertex sets, normals, BVH refits (feat/brush)-| Setup | |-|---|---|-| Divide up to this size | 4788 |-| BVH build | 3266 |-| Mesh (incl. topology) | 3953 MB = 62 B/triangle |-| BVH | 1244 MB = 19.5 B/triangle |-| Subdivision levels (stack) | 4756 MB = 75 B/triangle |-| Process memory (RSS) | 10081 MB (+10070 MB) |+Goal: big Move / Smooth / Inflate / Standard strokes fluid on huge meshes (a large dab under about 25 ms at 33M+triangles, a medium one under about 5 ms, undo of a large stroke at least twice as fast), with results still+identical with multithreading on or off. "Before" is main at aac5f68 with the two large-radius rows added to the+benchmark (28fb707), "after" is feat/brush; both binaries were run in turn, three times each, at 4, 16 and 33M+(CPU only, no project round trip, 40 dabs per stroke, X symmetry), keeping each row's best run, because the+other branches' builds and tests kept the machine busy (load 8-20). 64M: best of two runs each.-| Brush | verts/dab | uploaded verts (ranges) | kernel | normals | BVH refit | pick | **dab total** | stroke end (undo record) | undo | redo | undo step |-|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|-| Standard | 198k | 259k (28) | 6.61 | 4.61 | 2.82 | 0.00 | **14.58** | 0.00 | 42.3 | 42.2 | 21.8 MB |-| Standard (large, r 0.4) | 1.9M | 2.0M (79) | 33.95 | 38.18 | 23.82 | 0.01 | **98.42** | 0.00 | 148.1 | 147.0 | 74.0 MB |-| Clay | 110k | 155k (21) | 4.07 | 3.18 | 1.76 | 0.02 | **9.41** | 0.00 | 27.8 | 27.2 | 13.8 MB |-| ClayBuildup | 120k | 166k (23) | 4.52 | 3.34 | 1.79 | 0.03 | **10.06** | 0.00 | 30.7 | 30.3 | 15.1 MB |-| Smooth | 71k | 108k (19) | 3.22 | 2.54 | 1.28 | 0.03 | **7.35** | 0.00 | 22.7 | 22.6 | 10.8 MB |-| Inflate | 69k | 106k (19) | 2.73 | 2.62 | 1.37 | 0.03 | **7.02** | 0.00 | 22.5 | 22.5 | 10.7 MB |-| DamStandard | 68k | 104k (18) | 2.76 | 2.60 | 1.27 | 0.03 | **6.94** | 0.00 | 22.5 | 22.5 | 10.4 MB |-| Layer | 70k | 107k (19) | 3.75 | 2.64 | 1.32 | 0.03 | **8.00** | 0.00 | 21.5 | 22.9 | 10.8 MB |-| Move | 64k | 98k (13) | 0.50 | 1.06 | 1.12 | 0.03 | **3.04** | 0.00 | 2.5 | 2.5 | 1.0 MB |-| Recipe (pattern) | 72k | 109k (19) | 4.24 | 2.53 | 1.24 | 0.03 | **8.32** | 0.00 | 22.0 | 22.7 | 10.6 MB |-| Mask | 72k | 108k (19) | 2.35 | 0.00 | 0.00 | 0.03 | **2.59** | 0.00 | 1.7 | 1.3 | 5.3 MB |-| Paint | 72k | 108k (19) | 2.41 | 0.00 | 0.00 | 0.03 | **2.65** | 0.00 | 2.6 | 2.4 | 10.7 MB |+| 33M triangles, X symmetry | before | after | |+|---|---:|---:|---|+| Medium dab (Standard, radius 0.12: 100k vertices per step) | 8.6 ms | **3.6 ms** | 2.4x |+| Large dab (Standard, radius 0.4: 1M vertices per step) | 49.4 ms | **21.0 ms** | 2.3x |+| Large Smooth | 27.8 ms | **9.8 ms** | 2.8x |+| Large Move | 16.5 ms | **5.2 ms** | 3.2x |+| Undo of the 40-dab large Standard stroke (2.4M vertices) | 69.5 ms | **35.0 ms** | 2.0x |+| Undo of a medium stroke | 21.7 ms | **10.5 ms** | 2.1x |+| BVH | 19.5 B/triangle | **17.1** | |+| Mesh | 62 B/triangle | **60** | |+| Stroke recorder (allocated by the first stroke) | 12 B/vertex | **3 bits** | |-| Operation | ms |-|---|---:|-| Lower Res (to 15.9M, after edits) | 2793 |-| Higher Res (back up) | 20 |-| Lower Res again (no edits) | 79 |-| Higher Res again (no edits) | 20 |+At 64M triangles (CPU only): medium dab 14.2 -> **7.4 ms**, large 95.9 -> **57.5 ms**, large Smooth 48.2 -> **25.8 ms**,+large Move 34.9 -> **14.7 ms**, undo of the large stroke 138 -> **98 ms**.-# v0.6+The v0.5 summary's 93 ms for the large dab includes the GPU upload; CPU only, the v0.5 "after" table above+has 53 ms and 77 ms for its undo, in line with today's "before" runs of the same code (49 and 70 ms).-## Memory per triangle (feat/mem)+With the GPU (`sculptforge --bench`, before and after run in turn, best of two, the upload of what each dab changed+included; the upload itself is the view branch's work and unchanged here), at 33M: medium dab 11.4 -> **6.5 ms**,+large 62.8 -> **38.7 ms** (15 ms of it the upload), large Move 22.1 -> **11.9 ms**. The CPU-side target (large+dab under 25 ms) is met; with the upload the large dab is still above it.-Target from the brief: the whole scene under ~60 bytes per triangle at the top level, Divide to 100M+, opening a-33M project in under ~2 s without a 2x peak, and no slower dabs, undo or level stepping. Measured with the same-benchmark (it now also reports the process memory per triangle, the peak while dividing, and the memory and peak-of opening the project). Another agent's builds and benchmarks shared the machine, so every number is the better-of two runs, before and after alternating.+#### What changed-### Summary (33M benchmark sphere)+- **Vertex sets as bitmaps, listed in index order** (core/IndexBits.h): one bit per vertex (or BVH leaf) plus a+ summary bit per 4096, so listing a set visits only the chunks that hold members. The BVH vertex query, the+ normal update and the refit used 32-bit stamps per vertex and listed vertices in the order threads found+ them; now every dab's vertex list is in increasing index order. On a divided mesh a dab's vertices lie in a few+ dozen runs of the numbering, so the kernel, the normal update and the undo record walk positions, normals and+ adjacency front to back instead of jumping between subdivision levels. The order doesn't depend on the thread+ count, so results stay identical with multithreading on or off (the tests compare bit for bit).+- **Each thread marks a bitmap of its own** (IndexBits::insertParallel, scratch sets shared process-wide): with+ one shared bitmap, threads fought over its cache lines and the query scaled 3x on 10 cores; merging per-job+ sets by chunk made it twice as fast. The query also splits the sphere's subtrees breadth first until it has 128+ tasks (it used a fixed depth, which gave a medium dab fewer than 8 tasks, so it ran on one thread), skips the+ distance tests for leaves wholly inside the sphere, and stays on one thread for small dabs.+- **Refit from the query**: the query already visits the BVH leaves holding the vertices it returns, so a dab+ refits exactly those (BVH::refitQueried, BVH::refitLeaves) instead of looking every moved vertex's triangles+ up; the Move brush keeps its stroke's leaves. Generic refits (undo, transforms) use a leaf bitmap. At 33M the+ large dab's refit went from 11.7 to 5.5 ms.+- **Normals**: the vertices to update (moved ones and their ring) are a bitmap, listed in order and ORed straight+ into the mesh's dirty bits; each vertex sums its faces as before (identical values), with the faces of+ vertices 16 ahead and their corners 8 ahead prefetched (core/Prefetch.h), about 30% less time on one thread.+ Symmetric dabs update the normals once after all mirrors moved, so a vertex in both halves (near the symmetry+ plane) is updated once; each mirror still refits the BVH before the next one queries it.+- **Undo record and Move in parallel**: displaceAll counts per block which vertices the stroke moves for the+ first time and writes their undo entries at those offsets (same order as before) while moving them; the+ Sculptor's per-vertex stamps for positions, mask and colours are bitmaps cleared from the stroke's own lists.+ The Move brush moves each mirror's region in parallel (it was a serial loop). Undo and redo swap position+ channels in parallel (each lists a vertex once).+- **Benchmark**: Smooth and Move at radius 0.4, and `--bench-brushes TEXT` to run only the rows whose name+ contains TEXT.-| | before (main at aac5f68) | after (feat/mem) |-|---|---|---|-| Scene memory (CPU benchmark, process RSS) | 5.3 GB = 159 bytes per triangle | **3.0 GB = 90 bytes per triangle** |-| Sculpting mesh (with its adjacency) | 62 B/triangle | **39** |-| Subdivision level stack | 75 B/triangle | **29** |-| BVH (feat/brush's) | 19.5 B/triangle | 19.5 |-| Biggest Divide on this machine (30 GB) | 50M triangles (fixed limit) | **about 160M** (104M measured: 9.0 GB, 11 GB peak while dividing) |-| Divide up to 33M (the benchmark's setup) | 2428 ms | **1415 ms** |-| Open project | 4721 ms, the whole 1.9 GB file read into memory first | **2137 ms**, peak 1.15x the scene (+3.5 GB, peak +4.0 GB) |-| Save project | 663 ms, 1.9 GB file | **433 ms, 1.37 GB** |-| Lower Res after sculpting | 1543 ms | **876 ms** |-| Higher / Lower Res without edits | 10 / 40 ms | 8-13 / 43-55 ms |-| Medium dab (Standard), GPU upload included | 11.1 ms | 13.7 ms (CPU-only runs: 9.16 -> 9.09 ms) |-| Large dab (radius 0.4) | 62.6 ms | 64.8 ms |-| Smooth / Clay dab | 5.47 / 6.57 ms | 5.77 / 7.02 ms |-| Undo of a medium / large stroke | 21.8 / 69.1 ms | 25.5 / 70.0 ms (CPU-only: 21.4 -> 21.6 ms) |-| Orbit, 4x antialiasing | 19.7 ms | 20.0 ms |+Tried and dropped: computing each face normal once into a compact array (gathering the faces as a set and+finding each by its rank) was slower than summing the faces per vertex; prefetching in the refit's leaf loop and+in the Smooth kernel, longer prefetch distances, and skipping repeated leaves in the refit's lookup made no+difference or were slower.-At 16M the dabs are 0-20% slower (Standard 7.79 -> 7.69 ms, Clay 4.05 -> 4.68, Smooth 2.98 -> 3.50, Mask 1.50 ->-1.71): the rings and triangle lists of implicit adjacency take a few nanoseconds more per vertex than reading-stored lists, which shows in the normal update, the BVH refit, Smooth and the renderer's curvature (part of the-GPU upload). Undo is the same or faster.+Behaviour: results are identical with multithreading on or off. Compared with 0.5 they differ by rounding (a+brush's area normal and centre are summed over its vertices in index order instead of BVH order) and, where the+two halves of a symmetric dab overlap, both halves now see the normals from before the dab (the second one used+to see the first one's).-### What changed+#### Known limits-- **Generated levels** (core/Multires.h, `SubdivTopology::generated`): a level made by Divide numbers its- vertices as coarse vertices, then edge points, then face points, and lays its triangles out polygon by polygon- (`generateFaces`). Such a level stores no triangles or quad pairs (in `SubdivLevel::data`), no child maps and no- per-triangle parents and corner codes; all of them follow from the coarse polygons. The working mesh gets its- triangles generated when the level is entered. Levels from Reconstruct Subdiv, imports and older projects whose- numbering matches are recognised as generated; other levels keep the old path.-- **Details or positions, not both**: a level that isn't stale keeps its positions and no detail; the detail is- fitted to the positions when a lower level is about to change (before the levels above are marked stale), and- dropped again once a stale level is evaluated. Folding edits at the current level into the stack no longer- re-fits every level's detail, which is why Lower Res after sculpting got faster.-- **Coarse topology**: exact capacities (the polygon lists were reserved for all triangles), the quad pairing and- the UV corner table are derived (a byte per quad says which diagonal it has).-- **Implicit adjacency** (`Mesh::implicitAdjacency`): the working mesh of a generated level (manifold, coarse- valences up to 32) stores no vertex-vertex or vertex-triangle lists. `Mesh::neighbors` and- `Mesh::vertexTriangles` return an `IndexRing` (a span-like list, ascending as before) worked out from the- level's topology: closed forms per kind of fine vertex (corner, edge point, face point; Catmull-Clark and Loop),- with two small indexes built when the level becomes current (each coarse vertex's polygon corners, each coarse- edge's sides; about 4.5 bytes per triangle) so most lookups read one or two cache lines and sort at most 4- values with a branchless network. The lists are identical to the stored ones (tested on quads, mixed- quads/triangles, open meshes and Loop), so every brush, the normals, undo, the BVH and the renderer give- bit-identical results. Meshes without levels, non-manifold ones and higher valences keep the stored lists.-- **Project format 6** (core/Project.cpp): generated levels are written without triangles or child maps, and a- level without a detail takes the one that fits its positions. Projects of format 5 and older open unchanged- (tested with files saved by 0.5) and their levels become generated. Opening reads each blob straight into its- array (`readStoredZipIndex` + `pread`, big arrays in parallel) instead of reading the whole archive into memory- first; the mesh's topology is built once, after its levels are attached; level data is no longer given a full- topology and normals just to be thrown away; and the BVH of a big mesh is built on its own thread (it only needs- the positions and triangles) while the levels and topology load, with the main thread's work kept off the- shared pool meanwhile. Saving writes the mesh arrays straight from memory (`ZipEntry::external`) instead of- copying them into the archive list first.-- **Divide's limit** (`subdivMaxTriangles`) is what fits in 60% of the computer's memory at 110 bytes per triangle- (the measured scene plus the peak while dividing), between 50 million and 1 billion: about 160 million on this- machine.-- **makeCube** welds at every resolution: mirrored sides computed 2i/n - 1 and 2(n-i)/n - 1, which aren't exact- opposites in floating point, so resolutions such as 13 and 26 (the base of the 33M benchmark sphere) left a few- unwelded vertices along the cube's edges (reported by the view agent).+- Normal updates and refits still wait on memory: a vertex's faces and their corners are scattered over the+ triangle and position arrays. Per-leaf contiguous vertex lists would let a leaf's box be recomputed from its+ 15 or so vertices instead of 48 corners, but cost about 4 bytes per triangle; quantised BVH nodes and SoA+ positions were not tried.+- At 64M the gains are smaller (1.4x for undo of a large stroke, 98 ms): the generic refit's per-vertex leaf+ lookup and the normal update over 4.6M vertices dominate.+- Undo of a Mask or Paint stroke is about 0.4 ms slower at 33M (1.2 instead of 0.8 ms): its entries are now in+ index order per dab rather than in BVH order.+- Prefetching is a no-op with MSVC (core/Prefetch.h uses the GCC / Clang builtin).-### Memory per triangle (33M benchmark sphere)+#### CPU only, 4.0M triangles-| | before | after |-|---|---|---|-| Mesh: positions 6, normals 6, triangles 12, quad pairs 4, polygroups 4, normal-update stamps 2, dirty bits | 34 | 34 |-| Mesh: vertex-vertex and vertex-triangle lists (CSR) | 28 | **0** (implicit) |-| Mesh: implicit adjacency indexes (corners per coarse vertex, sides per coarse edge) | | 4.5 |-| Levels: the top level's data (positions 6, triangles 12, quad pairs 4, polygroups 4) | 26 | **10** (positions, polygroups) |-| Levels: the top level's detail | 6 | **0** (fitted to the positions when needed) |-| Levels: the top level's topology (coarse polygons and edges 18 -> 12; child maps 2, parents and corner codes 11 -> 0) | 31 | **12** |-| Levels: everything below the top (a quarter, a sixteenth, ...) | 12 | 7 |-| BVH | 19.5 | 19.5 |-| **Total (CPU)** | **157** | **87** |-| GPU buffers (unchanged; estimate) | about 26 | about 26 |+| Brush | dab before | dab after | kernel | normals | BVH refit | undo before | undo after |+|---|---:|---:|---:|---:|---:|---:|---:|+| Standard | 1.40 | **1.09** | 0.49 -> 0.44 | 0.48 -> 0.38 | 0.39 -> 0.24 | 2.9 | **1.2** |+| Standard (large, r 0.4) | 8.04 | **3.51** | 2.95 -> 1.44 | 3.06 -> 0.93 | 1.80 -> 0.89 | 10.0 | **4.1** |+| Clay | 0.79 | **0.68** | 0.30 -> 0.30 | 0.27 -> 0.22 | 0.20 -> 0.13 | 2.4 | **1.0** |+| ClayBuildup | 1.03 | **0.82** | 0.43 -> 0.38 | 0.33 -> 0.25 | 0.25 -> 0.16 | 2.5 | **0.8** |+| Smooth | 0.55 | **0.48** | 0.24 -> 0.23 | 0.17 -> 0.15 | 0.12 -> 0.08 | 2.0 | **1.1** |+| Smooth (large, r 0.4) | 5.24 | **2.42** | 2.15 -> 1.18 | 2.04 -> 0.68 | 0.93 -> 0.43 | 6.3 | **2.6** |+| Inflate | 0.51 | **0.47** | 0.19 -> 0.20 | 0.17 -> 0.16 | 0.12 -> 0.08 | 1.9 | **1.1** |+| DamStandard | 0.49 | **0.45** | 0.19 -> 0.21 | 0.16 -> 0.15 | 0.11 -> 0.08 | 2.4 | **1.0** |+| Layer | 0.58 | **0.55** | 0.28 -> 0.29 | 0.17 -> 0.15 | 0.11 -> 0.08 | 1.9 | **1.2** |+| Move | 0.26 | **0.22** | 0.02 -> 0.02 | 0.10 -> 0.12 | 0.12 -> 0.07 | 0.3 | **0.2** |+| Move (large, r 0.4) | 2.17 | **1.13** | 0.41 -> 0.21 | 0.73 -> 0.55 | 0.86 -> 0.27 | 2.4 | **0.9** |+| Recipe (pattern) | 0.77 | **0.73** | 0.46 -> 0.48 | 0.17 -> 0.15 | 0.12 -> 0.08 | 2.0 | **0.8** |+| Mask | 0.19 | **0.21** | 0.17 -> 0.19 | 0.00 -> 0.00 | 0.00 -> 0.00 | 0.1 | **0.1** |+| Paint | 0.20 | **0.19** | 0.17 -> 0.17 | 0.00 -> 0.00 | 0.00 -> 0.00 | 0.1 | **0.1** |-### Known limits+#### CPU only, 15.9M triangles-- The scene is at about 87 bytes per triangle (90 measured as RSS), not the ~60 of the brief: the mesh (39) and- the levels (29) are down from 137 to 68, but the BVH (19.5, feat/brush's) and the GPU-side buffers are unchanged- here. What is left in mine: the current level's reference copy of its positions in the stack (6, needed to see- what a stroke changed), the coarse topology of the top level (12: edges, their polygons, polygon lists), the- sculpting mesh's triangles (12) and quad pairs (4, which on a generated level are just 2i, 2i + 1), the- implicit adjacency indexes (4.5) and the normal-update stamps (2). The quad pairs and the coarse edge lists are- the next candidates.-- Implicit lookups cost a few nanoseconds more per vertex than reading stored lists, so dabs are 0-20% slower- (most at 4-16M with small brushes; at 33M the large dab is 3.5% slower and CPU-only medium dabs and undo are- unchanged). The brief asked for no slower dabs: this trades about 23 bytes per triangle (760 MB at 33M) for it.- Keeping the stored vertex-vertex lists (and only the triangle lists implicit) would win most of that speed back- for about 10 of those bytes; I tried denser layouts for the implicit lists, which didn't help (the cost is the- work per lookup, not memory reads).-- Opening a 33M project is bounded by the BVH build (about 1.7 s, running in parallel with the rest, which takes- about 1.5 s): 2.1-2.5 s instead of 4.7 s, not yet reliably under 2 s. A faster BVH build (feat/brush) or- storing the BVH in the project would bring it there.-- Format 6 projects don't open in 0.5.+| Brush | dab before | dab after | kernel | normals | BVH refit | undo before | undo after |+|---|---:|---:|---:|---:|---:|---:|---:|+| Standard | 4.91 | **2.49** | 1.88 -> 1.03 | 1.82 -> 0.69 | 1.07 -> 0.59 | 10.8 | **4.7** |+| Standard (large, r 0.4) | 24.70 | **10.29** | 8.98 -> 3.29 | 9.29 -> 3.14 | 5.72 -> 2.90 | 33.8 | **16.9** |+| Clay | 3.09 | **1.89** | 1.16 -> 0.94 | 1.13 -> 0.48 | 0.71 -> 0.33 | 7.1 | **3.4** |+| ClayBuildup | 3.35 | **2.18** | 1.33 -> 0.96 | 1.20 -> 0.67 | 0.72 -> 0.43 | 7.6 | **3.4** |+| Smooth | 2.15 | **1.55** | 0.89 -> 0.78 | 0.69 -> 0.39 | 0.50 -> 0.30 | 5.5 | **2.7** |+| Smooth (large, r 0.4) | 12.95 | **5.43** | 5.48 -> 2.33 | 4.75 -> 1.51 | 2.30 -> 1.09 | 20.2 | **10.0** |+| Inflate | 2.12 | **1.54** | 0.77 -> 0.68 | 0.74 -> 0.43 | 0.53 -> 0.33 | 5.4 | **2.6** |+| DamStandard | 2.07 | **1.54** | 0.76 -> 0.71 | 0.73 -> 0.42 | 0.50 -> 0.31 | 5.4 | **2.5** |+| Layer | 2.41 | **1.73** | 1.04 -> 0.92 | 0.78 -> 0.44 | 0.51 -> 0.29 | 6.5 | **2.7** |+| Move | 1.15 | **0.68** | 0.14 -> 0.11 | 0.42 -> 0.37 | 0.51 -> 0.12 | 0.9 | **0.6** |+| Move (large, r 0.4) | 7.39 | **2.80** | 1.57 -> 0.34 | 2.37 -> 1.23 | 2.67 -> 0.77 | 5.6 | **2.4** |+| Recipe (pattern) | 3.17 | **2.65** | 1.78 -> 1.81 | 0.80 -> 0.45 | 0.50 -> 0.28 | 6.6 | **2.6** |+| Mask | 0.76 | **0.54** | 0.69 -> 0.47 | 0.00 -> 0.00 | 0.00 -> 0.00 | 0.3 | **0.5** |+| Paint | 0.69 | **0.58** | 0.62 -> 0.51 | 0.00 -> 0.00 | 0.00 -> 0.00 | 0.5 | **0.8** |++#### CPU only, 33.2M triangles++| Brush | dab before | dab after | kernel | normals | BVH refit | undo before | undo after |+|---|---:|---:|---:|---:|---:|---:|---:|+| Standard | 8.59 | **3.64** | 3.66 -> 1.47 | 2.87 -> 0.98 | 1.76 -> 0.85 | 21.7 | **10.5** |+| Standard (large, r 0.4) | 49.42 | **21.03** | 18.08 -> 6.06 | 18.22 -> 7.63 | 11.67 -> 5.53 | 69.5 | **35.0** |+| Clay | 5.63 | **2.70** | 2.36 -> 1.22 | 2.00 -> 0.76 | 1.03 -> 0.51 | 14.3 | **6.7** |+| ClayBuildup | 6.32 | **2.96** | 2.60 -> 1.28 | 2.26 -> 0.80 | 1.22 -> 0.59 | 15.8 | **7.5** |+| Smooth | 3.95 | **2.14** | 1.62 -> 1.00 | 1.44 -> 0.64 | 0.73 -> 0.30 | 12.1 | **5.3** |+| Smooth (large, r 0.4) | 27.81 | **9.78** | 12.07 -> 3.80 | 9.97 -> 3.14 | 4.98 -> 1.84 | 40.5 | **18.2** |+| Inflate | 4.39 | **2.02** | 1.72 -> 0.87 | 1.67 -> 0.63 | 0.83 -> 0.37 | 11.1 | **4.9** |+| DamStandard | 4.28 | **2.41** | 1.64 -> 1.04 | 1.74 -> 0.74 | 0.73 -> 0.38 | 11.4 | **4.8** |+| Layer | 4.85 | **2.80** | 2.14 -> 1.47 | 1.73 -> 0.74 | 0.81 -> 0.36 | 11.5 | **5.0** |+| Move | 2.14 | **1.26** | 0.28 -> 0.28 | 0.90 -> 0.62 | 0.78 -> 0.23 | 1.8 | **1.1** |+| Move (large, r 0.4) | 16.52 | **5.23** | 3.23 -> 0.55 | 5.88 -> 2.34 | 5.98 -> 1.53 | 10.7 | **4.4** |+| Recipe (pattern) | 5.05 | **3.33** | 2.57 -> 2.15 | 1.53 -> 0.64 | 0.77 -> 0.33 | 11.1 | **5.1** |+| Mask | 1.39 | **1.08** | 1.26 -> 0.90 | 0.00 -> 0.00 | 0.00 -> 0.00 | 0.8 | **1.2** |+| Paint | 1.34 | **1.06** | 1.21 -> 0.90 | 0.00 -> 0.00 | 0.00 -> 0.00 | 1.3 | **1.8** |-## Benchmark tables (feat/mem)+#### With the GPU, 4.0M triangles-### Before (main at aac5f68), with the GPU+| Brush | dab before | dab after | of which GPU upload (after) | undo before | undo after |+|---|---:|---:|---:|---:|---:|+| Standard | 1.77 | **1.47** | 0.36 | 3.4 | **1.6** |+| Standard (large, r 0.4) | 10.76 | **5.97** | 2.28 | 9.8 | **4.2** |+| Smooth (large, r 0.4) | 6.98 | **3.83** | 1.21 | 5.7 | **3.1** |+| Move (large, r 0.4) | 3.03 | **2.12** | 0.78 | 2.0 | **1.2** |+| Clay | 1.04 | **0.90** | 0.22 | 2.6 | **1.6** |+| Inflate | 0.67 | **0.62** | 0.16 | 1.5 | **1.1** |-Threads: 10, GPU: Apple M1 Pro (G13S C0), OpenGL 4.6 (Core Profile) Mesa 26.1.8. Brushes use X symmetry (two dabs per step), radius 0.12 on a unit sphere unless noted, 40 dabs per stroke. Times in milliseconds.+#### With the GPU, 15.9M triangles-#### 4.0M triangles (2.0M vertices, 5 subdivision levels)+| Brush | dab before | dab after | of which GPU upload (after) | undo before | undo after |+|---|---:|---:|---:|---:|---:|+| Standard | 6.80 | **3.68** | 1.29 | 12.9 | **5.2** |+| Standard (large, r 0.4) | 32.72 | **18.57** | 7.68 | 33.2 | **17.4** |+| Smooth (large, r 0.4) | 18.38 | **9.54** | 4.00 | 20.6 | **10.3** |+| Move (large, r 0.4) | 10.35 | **5.82** | 3.03 | 5.6 | **2.5** |+| Clay | 3.80 | **2.60** | 0.81 | 6.9 | **2.9** |+| Inflate | 2.64 | **2.23** | 0.66 | 5.3 | **2.2** |++#### With the GPU, 33.2M triangles++| Brush | dab before | dab after | of which GPU upload (after) | undo before | undo after |+|---|---:|---:|---:|---:|---:|+| Standard | 11.42 | **6.50** | 2.64 | 21.7 | **11.8** |+| Standard (large, r 0.4) | 62.83 | **38.74** | 14.97 | 68.7 | **36.7** |+| Smooth (large, r 0.4) | 32.19 | **20.94** | 8.62 | 36.6 | **19.8** |+| Move (large, r 0.4) | 22.07 | **11.88** | 5.98 | 11.1 | **5.8** |+| Clay | 6.60 | **4.44** | 1.74 | 13.2 | **6.6** |+| Inflate | 5.10 | **3.68** | 1.47 | 10.5 | **5.6** |++The v0.6 performance work ran on three branches at once (mesh memory, brushes, viewport), each measured+against main at aac5f68 with `sculptforge --bench --bench-sizes 4,16,33 --bench-dabs 10 --bench-no-project`, on+the same machine as below, one benchmark at a time; every figure is the better of two runs. The sections after+this one (from "Summary") are v0.5's.++### Viewport (feat/view)++"Before" is main at aac5f68 plus the benchmark rows below; "after" is feat/view. The 33M benchmark sphere has a+few cracks on main (makeCube welded badly at 26 quads per side; fixed in feat/mem), so the 33M "after" runs+use that one-line fix, as the merged branches will; without it, the 33M sphere counts as open and draws its back+faces too (last column). 104M ran with `--bench-view` (the full brush suite at that size doesn't fit in memory);+neither 64M nor 104M was drawn before (v0.5 only measured 64M on the CPU). Full reports are at the end.++| | 4M | 16M | 33M | 64M | 104M | 33M, open (no fix) |+|---|---|---|---|---|---|---|+| Orbit, 4x antialiasing (ms) | 4.8 -> **2.9** | 11.4 -> **4.9** | 20.6 -> **8.7** | **14.0** | **19.6** (51 fps) | 15.3 |+| Orbit, no antialiasing | 3.0 -> **1.6** | 8.2 -> **3.2** | 14.3 -> **6.1** | **11.3** | **16.9** (59 fps) | 12.2 |+| Orbit, Fast Navigation (no AA, motion proxy) | 3.0 -> **1.1** | 8.2 -> **1.9** | 14.3 -> **3.2** (314 fps) | **6.5** | **9.9** (101 fps) | 4.6 |+| Triangles drawn after culling (proxy) | 53% (19%) | 49% (19%) | 48% (19%) | 47% (19%) | 46% (19%) | 100% (19%) |+| First GPU upload (ms) | 87 -> **52** | 337 -> **199** | 701 -> **422** | **784** | **1283** | 571 |+| GPU memory, bytes per triangle | 46 -> **14.8** | 46 -> **14.8** | 46 -> **14.8** (1.53 -> 0.49 GB) | **14.8** | **14.8** (1.5 GB) | 14.8 |+| Motion proxy build, first move after an upload (ms) | 16 | 60 | 126 | 241 | 408 | 127 |+| GPU upload per medium dab: Standard / Mask / Paint (ms) | 0.28 / 0.39 / 0.62 -> 0.57 / 0.34 / 0.70 | 0.95 / 1.33 / 2.16 -> 1.19 / 1.05 / 1.76 | 2.19 / 2.89 / 4.64 -> **2.08 / 1.89 / 3.69** | 3.8 / 3.7 / 7.3 | 6.6 / 6.5 / 12.8 | |++"Before" GPU memory is the old buffers' size, which the old renderer didn't report: positions, normals and+curvature as floats (28 bytes per vertex, 14 per triangle), 32-bit indices (12), 32-bit polygroups (4) and, on+meshes with quads like this one, the wireframe's edges, always kept, every edge twice (16): 46 bytes per+triangle (26 without the last two). After: 12-byte vertices with about 10% copies on cluster seams (6.6 per+triangle), 16-bit indices (6), 16-bit polygroups (2), cluster tables (0.1). Polypaint adds 2.2, a mask 0.6,+the motion proxy 1.5 once the view has moved, the wireframe about 4 while it is on.++Targets from the brief: GPU memory down at least a third (down 68%, or 43% against the 26 bytes counted+before); 60 fps at 100M (101 fps with Fast Navigation, 59 without antialiasing, 51 with 4x); orbit at 33M under+about 8 ms with 4x antialiasing (8.7 ms, from 20.6: not quite); first upload at 33M under about 300 ms (422,+from 701: not reached).++#### What changed++- **Clusters** (core/UploadOrder.h). The triangles are cut into runs of 64 consecutive triangles (compact on+ any mesh whose triangle order isn't random: a divided mesh keeps each cage face's triangles together), the+ runs sorted along a Morton curve of their centres, and every 64 runs make a cluster of up to 4096 triangles.+ Each cluster has its own block-aligned range of GPU vertices, numbered by first use, so its indices are 16-bit+ with a base vertex; vertices on seams between clusters are copied into each cluster that uses them (about+ 10%). The mesh's own vertex numbering is untouched. Without the Morton step, clusters on meshes with small cage+ faces (a remesh divided three times) were long strips whose normals point every way: a test sphere culled 9%+ of its clusters, 28% with it.+- **Culling** (render/Clusters.h), on the CPU every frame: clusters outside the view, and clusters whose+ triangles all face away (a normal cone per cluster against a bounding sphere). Back faces may only be skipped+ where they can't show: on a mesh that is closed and wound consistently (every directed edge has its reverse;+ found with a 64-bit hash sum while the layout is built, with a fallback that accepts unwelded seams) and+ outwards (positive signed volume), with nothing hidden, the eye outside its bounds and nothing reaching into+ the near plane's slab. Then every back face lies behind a front face, so the picture is the same; the GPU+ also culls the back faces left in clusters along the silhouette. The visible clusters go in one+ `glMultiDrawElementsBaseVertex`. About half the triangles of a sphere are drawn.+- **12-byte vertices**: the position on a 21-bit grid over the mesh's bounds plus a margin (one grid for the+ whole mesh, so a vertex copied into two clusters decodes to exactly the same point and seams can't crack; a+ stroke that leaves the grid re-sends the mesh on a new one), an octahedral normal (2 x 11 bits, within 0.12+ degrees) and the curvature (10 bits, square-root companded over its whole range, within 0.001 where the+ cavity shading ramps). Polypaint is RGBA8 with gamma 2.2 (decoded in the shader), the mask 8-bit. The+ fragment shader works out the view direction from the pixel instead of an interpolated position, so a vertex+ passes only a normal and the curvature (plus colour and mask when the mesh has them; shader variants per+ feature).+- **Motion proxy**: while a scene of 10M+ triangles moves with Fast Navigation on, each cluster of a mesh of+ 256k+ triangles draws a proxy: its vertices snapped to the one nearest the centre of each cell of a grid 2.5+ average edges wide, collapsed triangles dropped, seam vertices kept, using the same vertex buffer (indices+ only, up to a quarter of the cluster's triangles; 19% in practice). The proxies of a closed mesh form a closed+ mesh (a simplicial map of it), so the same culling applies to them with their own normal cones and no+ hole can open between clusters. Proxies are built for the clusters that changed, when the view starts moving+ (126 ms at 33M after an upload, a few clusters after a stroke). Polygroup and texture display and the+ wireframe keep the full mesh.+- **Uploads**: a full upload writes the index buffer straight into the mapped buffer from the threads building+ the layout, and whole vertex arrays mapped in parallel; dab uploads gather all their runs in parallel. Each+ 128-vertex block keeps a hash of what it last sent: blocks a dab marked but didn't change (paint, mask) aren't+ sent again, and clusters whose positions didn't move keep their bounds and proxy.+- **Wireframe** edges are built when the wireframe is first shown, each edge once (from the lowest-numbered+ drawn triangle using it), at the opacity two overlapping lines had.+- Per-triangle data (polygroups, texture UVs, baked-normal tangents) is found from `gl_PrimitiveID` plus the+ cluster's first drawn triangle, read through `gl_VertexID` (which includes the base vertex) from a table per+ vertex block. A start-up check draws one point to see that the driver does include it; where it doesn't, those+ meshes draw one cluster at a time with the base as a uniform (`SF_NO_VERTEXID_BASE=1` forces that path).++#### Looks the same++Every UI test's screenshots were compared pixel by pixel with main's, and the benchmark's frames too. The+viewport matches except for: outline pixels of closed meshes, where back faces used to cover a few+antialiasing samples and show as a faint light rim (now the background shows there, as it would with a closed+surface seen exactly edge-on); a few silhouette pixels moved by the position grid (a millionth of the model);+and the wireframe on quad meshes, where line ends overlap a little differently now that each edge is drawn once.+Shelf and LightBox thumbnails differ in the UI tests only because they arrive sooner.++#### Known limits++- Back faces are drawn (twice the work on huge meshes) on open meshes, with hidden polygons, when the eye is+ inside the mesh's bounds or the near plane cuts it: the cases where they can show. On a closed mesh, a lobe+ pushed through the surface so that it is inside out (winding below zero) would show a hole where its back+ faces are culled; ZBrush culls back faces always.+- The proxy is coarse on a mesh with fine detail (detail under 2.5 edges disappears while moving), and the first+ move after opening or dividing a big mesh waits for it (126 ms at 33M, 408 ms at 104M).+- 33M orbiting is 8.7 ms with antialiasing: what's left is 16M sub-pixel triangles a frame, which only a level+ of detail at rest would remove.+- The first upload at 33M (422 ms) spends most of its time building the layout (about 250 ms: two passes over+ every cluster's triangles) and packing vertices (about 100 ms, mostly curvature).+- The per-cluster fallback for drivers without the base vertex in `gl_VertexID` was checked by forcing it on+ Mesa; macOS (GL 4.1) wasn't tried on hardware.+- Upload per dab at 4M and 16M is a little slower (0.3-0.6 ms) than before: runs are finer (128 vertices) and+ the clusters a dab touches get new bounds.-## v0.6 viewport reports (feat/view)-### Before: main at aac5f68 with the benchmark+#### Before: main at aac5f68 with the benchmarkThreads: 10, GPU: Apple M1 Pro (G13S C0), OpenGL 4.6 (Core Profile) Mesa 26.1.8. Brushes use X symmetry (two dabs per step), radius 0.12 on a unit sphere unless noted, 10 dabs per stroke. Times in milliseconds.@@ -841,632 +926,729 @@ Threads: 10, GPU: Apple M1 Pro (G13S C0), OpenGL 4.6 (Core Profile) Mesa 26.1.8.| Setup | ||---|---|| Divide up to this size | 268 |-| BVH build | 217 |-| First GPU upload | 92 |+| BVH build | 222 |+| First GPU upload | 90 || Mesh (incl. topology) | 247 MB = 62 B/triangle || BVH | 78 MB = 19.5 B/triangle || Subdivision levels (stack) | 297 MB = 74 B/triangle |-| Process memory (RSS) | 719 MB (+648 MB) |+| Process memory (RSS) | 718 MB (+648 MB) || Brush | verts/dab | uploaded verts (ranges) | kernel | normals | BVH refit | pick | GPU upload | **dab total** | stroke end (undo record) | undo | redo | undo step ||---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|-| Standard | 12k | 24k (15) | 0.50 | 0.47 | 0.39 | 0.00 | 0.35 | **1.75** | 0.00 | 4.7 | 4.7 | 1.4 MB |-| Standard (large, r 0.4) | 118k | 148k (45) | 3.26 | 3.40 | 1.93 | 0.00 | 2.28 | **11.10** | 0.00 | 9.5 | 9.7 | 4.6 MB |-| Clay | 7k | 16k (11) | 0.34 | 0.33 | 0.23 | 0.00 | 0.28 | **1.22** | 0.00 | 2.2 | 2.6 | 0.9 MB |-| ClayBuildup | 8k | 18k (12) | 0.43 | 0.31 | 0.25 | 0.00 | 0.25 | **1.27** | 0.00 | 3.1 | 2.9 | 0.8 MB |-| Smooth | 5k | 12k (9) | 0.24 | 0.18 | 0.12 | 0.00 | 0.17 | **0.74** | 0.00 | 2.4 | 3.2 | 0.6 MB |-| Inflate | 5k | 12k (9) | 0.20 | 0.17 | 0.13 | 0.00 | 0.16 | **0.68** | 0.00 | 3.0 | 3.0 | 0.6 MB |-| DamStandard | 4k | 12k (9) | 0.20 | 0.16 | 0.12 | 0.00 | 0.16 | **0.65** | 0.00 | 3.2 | 3.3 | 0.5 MB |-| Layer | 5k | 12k (9) | 0.31 | 0.18 | 0.12 | 0.00 | 0.17 | **0.80** | 0.00 | 4.4 | 4.3 | 0.6 MB |-| Move | 4k | 10k (8) | 0.02 | 0.10 | 0.09 | 0.00 | 0.13 | **0.37** | 0.00 | 0.3 | 0.2 | 0.1 MB |-| Recipe (pattern) | 5k | 13k (9) | 0.48 | 0.17 | 0.12 | 0.00 | 0.17 | **0.97** | 0.00 | 4.2 | 4.4 | 0.6 MB |-| Mask | 5k | 12k (9) | 0.19 | 0.00 | 0.00 | 0.00 | 0.23 | **0.44** | 0.00 | 0.1 | 0.1 | 0.3 MB |-| Paint | 5k | 12k (9) | 0.18 | 0.00 | 0.00 | 0.00 | 0.30 | **0.50** | 0.00 | 0.1 | 0.1 | 0.6 MB |+| Standard | 9k | 20k (12) | 0.36 | 0.36 | 0.30 | 0.00 | 0.28 | **1.33** | 0.00 | 1.3 | 1.3 | 0.3 MB |+| Standard (large, r 0.4) | 147k | 183k (53) | 3.70 | 4.00 | 2.07 | 0.00 | 2.85 | **12.88** | 0.00 | 9.3 | 9.5 | 4.2 MB |+| Clay | 8k | 17k (11) | 0.33 | 0.30 | 0.24 | 0.00 | 0.23 | **1.13** | 0.00 | 1.0 | 0.9 | 0.3 MB |+| ClayBuildup | 13k | 24k (13) | 0.54 | 0.44 | 0.40 | 0.00 | 0.32 | **1.73** | 0.00 | 2.1 | 2.2 | 0.4 MB |+| Smooth | 7k | 16k (10) | 0.34 | 0.26 | 0.19 | 0.00 | 0.22 | **1.03** | 0.00 | 0.8 | 1.4 | 0.2 MB |+| Inflate | 7k | 16k (10) | 0.28 | 0.25 | 0.20 | 0.00 | 0.21 | **0.96** | 0.00 | 0.6 | 1.6 | 0.2 MB |+| DamStandard | 7k | 16k (10) | 0.29 | 0.25 | 0.19 | 0.00 | 0.21 | **0.96** | 0.00 | 1.0 | 2.1 | 0.2 MB |+| Layer | 7k | 16k (10) | 0.59 | 0.30 | 0.20 | 0.00 | 0.22 | **1.34** | 0.00 | 1.3 | 2.1 | 0.2 MB |+| Move | 6k | 14k (9) | 0.03 | 0.15 | 0.18 | 0.00 | 0.18 | **0.59** | 0.00 | 0.4 | 0.4 | 0.1 MB |+| Recipe (pattern) | 8k | 17k (11) | 0.72 | 0.27 | 0.20 | 0.00 | 0.22 | **1.44** | 0.00 | 0.7 | 1.4 | 0.2 MB |+| Mask | 8k | 16k (10) | 0.30 | 0.00 | 0.00 | 0.00 | 0.39 | **0.71** | 0.00 | 0.0 | 0.0 | 0.1 MB |+| Paint | 8k | 16k (10) | 0.25 | 0.00 | 0.00 | 0.00 | 0.65 | **0.93** | 0.00 | 0.0 | 0.0 | 0.2 MB || Operation | ms ||---|---:|-| Lower Res (to 995k, after edits) | 191 |+| Lower Res (to 995k, after edits) | 184 || Higher Res (back up) | 1 || Lower Res again (no edits) | 5 || Higher Res again (no edits) | 1 |-| Save project (228 MB) | 91 |-| Open project | 573 |-| Orbit: frame time, 4x antialiasing | 5.0 (200 fps) |-| Orbit: frame time, Fast Navigation (no antialiasing) | 3.2 (314 fps) |+| Orbit: frame time, 4x antialiasing | 5.0 (199 fps) |+| Orbit: frame time, Fast Navigation (no antialiasing) | 3.2 (308 fps) |-#### 15.9M triangles (8.0M vertices, 6 subdivision levels)+##### 15.9M triangles (8.0M vertices, 6 subdivision levels)| Setup | ||---|---|-| Divide up to this size | 1183 |-| BVH build | 790 |-| First GPU upload | 358 |+| Divide up to this size | 1189 |+| BVH build | 794 |+| First GPU upload | 337 || Mesh (incl. topology) | 988 MB = 62 B/triangle || BVH | 311 MB = 19.5 B/triangle || Subdivision levels (stack) | 1188 MB = 75 B/triangle |-| Process memory (RSS) | 2720 MB (+2224 MB) |+| Process memory (RSS) | 2712 MB (+2172 MB) || Brush | verts/dab | uploaded verts (ranges) | kernel | normals | BVH refit | pick | GPU upload | **dab total** | stroke end (undo record) | undo | redo | undo step ||---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|-| Standard | 50k | 76k (15) | 2.45 | 2.28 | 1.37 | 0.00 | 1.52 | **7.79** | 0.00 | 14.8 | 12.8 | 5.4 MB |-| Standard (large, r 0.4) | 472k | 525k (45) | 8.96 | 9.50 | 5.84 | 0.01 | 8.50 | **33.62** | 0.00 | 34.3 | 32.8 | 18.5 MB |-| Clay | 28k | 47k (11) | 1.20 | 1.20 | 0.78 | 0.01 | 0.78 | **4.05** | 0.00 | 7.7 | 7.8 | 3.5 MB |-| ClayBuildup | 33k | 55k (12) | 1.58 | 1.35 | 0.82 | 0.01 | 0.85 | **4.70** | 0.00 | 8.1 | 8.0 | 3.8 MB |-| Smooth | 19k | 37k (9) | 0.97 | 0.80 | 0.58 | 0.01 | 0.56 | **2.98** | 0.00 | 6.6 | 7.0 | 2.7 MB |-| Inflate | 18k | 36k (9) | 0.80 | 0.83 | 0.61 | 0.01 | 0.55 | **2.87** | 0.00 | 7.3 | 7.0 | 2.6 MB |-| DamStandard | 18k | 35k (9) | 0.89 | 0.85 | 0.62 | 0.01 | 0.53 | **2.96** | 0.00 | 6.7 | 6.4 | 2.5 MB |-| Layer | 19k | 36k (9) | 1.22 | 0.91 | 0.63 | 0.01 | 0.57 | **3.41** | 0.00 | 9.6 | 6.8 | 2.6 MB |-| Move | 16k | 29k (8) | 0.14 | 0.47 | 0.63 | 0.01 | 0.44 | **1.75** | 0.00 | 1.3 | 1.2 | 0.3 MB |-| Recipe (pattern) | 19k | 37k (9) | 1.98 | 0.86 | 0.60 | 0.01 | 0.57 | **4.09** | 0.00 | 8.7 | 8.4 | 2.6 MB |-| Mask | 19k | 36k (9) | 0.73 | 0.00 | 0.00 | 0.01 | 0.70 | **1.50** | 0.00 | 0.3 | 0.3 | 1.3 MB |-| Paint | 19k | 36k (9) | 0.66 | 0.00 | 0.00 | 0.01 | 0.96 | **1.70** | 0.00 | 0.5 | 0.4 | 2.6 MB |+| Standard | 37k | 60k (12) | 1.55 | 1.65 | 1.09 | 0.00 | 0.95 | **5.35** | 0.00 | 3.1 | 3.1 | 1.3 MB |+| Standard (large, r 0.4) | 589k | 650k (53) | 11.12 | 11.62 | 7.06 | 0.01 | 9.93 | **40.64** | 0.00 | 30.7 | 30.4 | 17.0 MB |+| Clay | 32k | 53k (11) | 1.31 | 1.46 | 0.87 | 0.00 | 0.83 | **4.58** | 0.00 | 2.2 | 2.6 | 1.1 MB |+| ClayBuildup | 51k | 77k (13) | 1.87 | 1.54 | 1.01 | 0.00 | 1.20 | **5.76** | 0.00 | 3.1 | 3.0 | 1.5 MB |+| Smooth | 30k | 51k (10) | 1.17 | 1.18 | 0.54 | 0.00 | 1.02 | **4.02** | 0.00 | 2.3 | 2.4 | 1.0 MB |+| Inflate | 29k | 50k (10) | 1.24 | 1.30 | 0.86 | 0.00 | 0.76 | **4.25** | 0.00 | 2.5 | 2.4 | 1.0 MB |+| DamStandard | 29k | 49k (10) | 1.27 | 1.38 | 0.66 | 0.00 | 0.99 | **4.42** | 0.00 | 3.0 | 2.7 | 1.0 MB |+| Layer | 30k | 51k (10) | 2.29 | 1.42 | 0.59 | 0.00 | 1.06 | **5.49** | 0.00 | 2.9 | 3.2 | 1.0 MB |+| Move | 23k | 42k (9) | 0.19 | 0.64 | 0.66 | 0.00 | 0.63 | **2.37** | 0.00 | 1.6 | 1.8 | 0.4 MB |+| Recipe (pattern) | 31k | 52k (11) | 1.69 | 1.20 | 0.50 | 0.00 | 0.80 | **4.31** | 0.00 | 2.0 | 2.5 | 1.0 MB |+| Mask | 31k | 52k (11) | 1.29 | 0.00 | 0.00 | 0.01 | 1.44 | **2.82** | 0.00 | 0.1 | 0.1 | 0.5 MB |+| Paint | 31k | 52k (11) | 0.98 | 0.00 | 0.00 | 0.00 | 2.64 | **3.71** | 0.00 | 0.2 | 0.1 | 1.0 MB || Operation | ms ||---|---:|-| Lower Res (to 4.0M, after edits) | 780 |+| Lower Res (to 4.0M, after edits) | 766 || Higher Res (back up) | 5 |-| Lower Res again (no edits) | 19 |+| Lower Res again (no edits) | 21 || Higher Res again (no edits) | 5 |-| Save project (913 MB) | 345 |-| Open project | 2199 |-| Orbit: frame time, 4x antialiasing | 11.6 (86 fps) |-| Orbit: frame time, Fast Navigation (no antialiasing) | 8.4 (119 fps) |+| Orbit: frame time, 4x antialiasing | 11.8 (84 fps) |+| Orbit: frame time, Fast Navigation (no antialiasing) | 8.7 (115 fps) |-#### 33.2M triangles (16.6M vertices, 7 subdivision levels)+##### 33.2M triangles (16.6M vertices, 7 subdivision levels)| Setup | ||---|---|-| Divide up to this size | 2428 |-| BVH build | 1665 |-| First GPU upload | 736 |+| Divide up to this size | 2469 |+| BVH build | 1655 |+| First GPU upload | 701 || Mesh (incl. topology) | 2062 MB = 62 B/triangle || BVH | 648 MB = 19.5 B/triangle || Subdivision levels (stack) | 2481 MB = 75 B/triangle |-| Process memory (RSS) | 5664 MB (+4824 MB) |+| Process memory (RSS) | 5642 MB (+4820 MB) || Brush | verts/dab | uploaded verts (ranges) | kernel | normals | BVH refit | pick | GPU upload | **dab total** | stroke end (undo record) | undo | redo | undo step ||---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|-| Standard | 103k | 149k (21) | 4.05 | 3.26 | 1.98 | 0.00 | 3.07 | **12.72** | 0.00 | 21.8 | 21.2 | 11.4 MB |-| Standard (large, r 0.4) | 987k | 1.1M (57) | 17.52 | 18.05 | 11.48 | 0.01 | 14.05 | **62.60** | 0.00 | 69.1 | 68.4 | 38.7 MB |-| Clay | 58k | 91k (16) | 2.10 | 1.82 | 1.06 | 0.01 | 1.39 | **6.57** | 0.00 | 13.6 | 13.6 | 7.2 MB |-| ClayBuildup | 66k | 102k (17) | 2.61 | 2.11 | 1.14 | 0.01 | 1.72 | **7.82** | 0.00 | 15.5 | 14.8 | 8.0 MB |-| Smooth | 39k | 67k (14) | 1.75 | 1.61 | 0.79 | 0.02 | 1.15 | **5.47** | 0.00 | 11.4 | 10.8 | 5.7 MB |-| Inflate | 38k | 66k (14) | 1.63 | 1.53 | 0.80 | 0.02 | 1.29 | **5.43** | 0.00 | 10.8 | 10.3 | 5.6 MB |-| DamStandard | 37k | 65k (15) | 1.62 | 1.61 | 0.80 | 0.02 | 1.24 | **5.44** | 0.00 | 10.4 | 12.2 | 5.4 MB |-| Layer | 37k | 65k (14) | 2.11 | 1.65 | 0.77 | 0.02 | 1.21 | **5.92** | 0.00 | 12.0 | 10.1 | 5.6 MB |-| Move | 33k | 59k (10) | 0.31 | 0.84 | 0.80 | 0.02 | 1.26 | **3.42** | 0.00 | 1.8 | 2.1 | 0.5 MB |-| Recipe (pattern) | 38k | 68k (15) | 2.50 | 1.61 | 0.78 | 0.02 | 1.28 | **6.39** | 0.00 | 11.1 | 10.7 | 5.4 MB |-| Mask | 39k | 67k (15) | 1.41 | 0.00 | 0.00 | 0.02 | 1.65 | **3.22** | 0.00 | 0.8 | 0.6 | 2.7 MB |-| Paint | 39k | 67k (15) | 1.35 | 0.00 | 0.00 | 0.02 | 2.14 | **3.64** | 0.00 | 1.2 | 1.0 | 5.5 MB |+| Standard | 78k | 117k (18) | 3.34 | 3.86 | 1.84 | 0.00 | 2.62 | **11.91** | 0.00 | 6.9 | 5.6 | 2.8 MB |+| Standard (large, r 0.4) | 1.2M | 1.3M (67) | 21.60 | 22.79 | 14.70 | 0.01 | 17.56 | **78.51** | 0.00 | 63.7 | 62.8 | 35.5 MB |+| Clay | 68k | 104k (17) | 2.63 | 2.26 | 1.34 | 0.00 | 1.76 | **8.20** | 0.00 | 4.4 | 4.6 | 2.4 MB |+| ClayBuildup | 107k | 151k (21) | 4.31 | 2.84 | 1.68 | 0.01 | 2.87 | **12.06** | 0.00 | 6.0 | 6.3 | 3.1 MB |+| Smooth | 63k | 98k (17) | 2.55 | 1.91 | 1.05 | 0.01 | 1.70 | **7.46** | 0.00 | 4.3 | 4.6 | 2.1 MB |+| Inflate | 61k | 96k (16) | 2.36 | 2.27 | 1.31 | 0.01 | 1.67 | **7.82** | 0.00 | 4.4 | 4.0 | 2.1 MB |+| DamStandard | 61k | 96k (16) | 2.30 | 1.85 | 1.15 | 0.01 | 1.42 | **6.92** | 0.00 | 4.2 | 3.9 | 2.0 MB |+| Layer | 63k | 99k (17) | 4.53 | 2.18 | 1.14 | 0.01 | 1.60 | **9.66** | 0.00 | 3.7 | 3.8 | 2.1 MB |+| Move | 49k | 79k (14) | 0.39 | 0.83 | 1.02 | 0.01 | 1.39 | **4.17** | 0.00 | 2.1 | 1.7 | 0.9 MB |+| Recipe (pattern) | 65k | 102k (18) | 4.06 | 2.12 | 1.13 | 0.01 | 1.84 | **9.39** | 0.00 | 4.0 | 4.3 | 2.1 MB |+| Mask | 66k | 101k (18) | 2.54 | 0.00 | 0.00 | 0.01 | 2.89 | **5.63** | 0.00 | 0.3 | 0.2 | 1.0 MB |+| Paint | 66k | 101k (18) | 2.19 | 0.00 | 0.00 | 0.01 | 4.64 | **7.03** | 0.00 | 0.4 | 0.3 | 2.1 MB || Operation | ms ||---|---:|-| Lower Res (to 8.3M, after edits) | 1583 |+| Lower Res (to 8.3M, after edits) | 1588 || Higher Res (back up) | 10 || Lower Res again (no edits) | 40 || Higher Res again (no edits) | 10 |-| Save project (1905 MB) | 663 |-| Open project | 4721 |-| Orbit: frame time, 4x antialiasing | 20.9 (48 fps) |-| Orbit: frame time, Fast Navigation (no antialiasing) | 14.4 (70 fps) |+| Orbit: frame time, 4x antialiasing | 20.6 (49 fps) |+| Orbit: frame time, Fast Navigation (no antialiasing) | 14.8 (68 fps) |-### After (feat/mem), with the GPU+#### After: feat/view (33M with the makeCube fix from feat/mem)-Threads: 10, GPU: Apple M1 Pro (G13S C0), OpenGL 4.6 (Core Profile) Mesa 26.1.8. Brushes use X symmetry (two dabs per step), radius 0.12 on a unit sphere unless noted, 40 dabs per stroke. Times in milliseconds.+Threads: 10, GPU: Apple M1 Pro (G13S C0), OpenGL 4.6 (Core Profile) Mesa 26.1.8. Brushes use X symmetry (two dabs per step), radius 0.12 on a unit sphere unless noted, 10 dabs per stroke. Times in milliseconds.-#### 4.0M triangles (2.0M vertices, 5 subdivision levels)+##### 4.0M triangles (2.0M vertices, 5 subdivision levels)| Setup | ||---|---|-| Divide up to this size | 157 |-| BVH build | 247 |-| First GPU upload | 92 |-| Mesh (incl. topology) | 154 MB = 39 B/triangle |+| Divide up to this size | 268 |+| BVH build | 227 |+| First GPU upload | 52 |+| GPU memory (buffers) | 59 MB = 14.8 B/triangle |+| Mesh (incl. topology) | 247 MB = 62 B/triangle || BVH | 78 MB = 19.5 B/triangle |-| Subdivision levels (stack) | 117 MB = 29 B/triangle |-| Process memory (RSS) | 451 MB (+381 MB = 96 B/triangle) |-| Peak while dividing (RSS) | 491 MB above the start |+| Subdivision levels (stack) | 297 MB = 74 B/triangle |+| Process memory (RSS) | 721 MB (+650 MB) || Brush | verts/dab | uploaded verts (ranges) | kernel | normals | BVH refit | pick | GPU upload | **dab total** | stroke end (undo record) | undo | redo | undo step ||---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|-| Standard | 12k | 24k (15) | 0.49 | 0.59 | 0.46 | 0.00 | 0.49 | **2.06** | 0.00 | 3.7 | 3.8 | 1.4 MB |-| Standard (large, r 0.4) | 118k | 148k (45) | 3.05 | 3.52 | 1.86 | 0.00 | 3.12 | **11.76** | 0.00 | 11.3 | 10.7 | 4.6 MB |-| Clay | 7k | 16k (11) | 0.31 | 0.35 | 0.24 | 0.00 | 0.32 | **1.24** | 0.00 | 2.4 | 2.3 | 0.9 MB |-| ClayBuildup | 8k | 18k (12) | 0.41 | 0.40 | 0.29 | 0.00 | 0.37 | **1.51** | 0.00 | 3.1 | 2.2 | 0.8 MB |-| Smooth | 5k | 12k (9) | 0.26 | 0.23 | 0.15 | 0.00 | 0.24 | **0.89** | 0.00 | 2.2 | 2.1 | 0.6 MB |-| Inflate | 5k | 12k (9) | 0.19 | 0.21 | 0.15 | 0.00 | 0.23 | **0.81** | 0.00 | 2.8 | 2.0 | 0.6 MB |-| DamStandard | 4k | 12k (9) | 0.20 | 0.21 | 0.14 | 0.00 | 0.23 | **0.79** | 0.00 | 2.1 | 2.0 | 0.5 MB |-| Layer | 5k | 12k (9) | 0.28 | 0.22 | 0.14 | 0.00 | 0.24 | **0.90** | 0.00 | 2.0 | 1.9 | 0.6 MB |-| Move | 4k | 10k (8) | 0.02 | 0.13 | 0.11 | 0.00 | 0.20 | **0.47** | 0.00 | 0.3 | 0.3 | 0.1 MB |-| Recipe (pattern) | 5k | 13k (9) | 0.47 | 0.22 | 0.14 | 0.00 | 0.24 | **1.09** | 0.00 | 1.9 | 2.0 | 0.6 MB |-| Mask | 5k | 12k (9) | 0.17 | 0.00 | 0.00 | 0.00 | 0.28 | **0.48** | 0.00 | 0.1 | 0.1 | 0.3 MB |-| Paint | 5k | 12k (9) | 0.17 | 0.00 | 0.00 | 0.00 | 0.35 | **0.54** | 0.00 | 0.1 | 0.1 | 0.6 MB |+| Standard | 9k | 21k (14) | 0.40 | 0.43 | 0.30 | 0.00 | 0.58 | **1.79** | 0.00 | 1.1 | 1.1 | 0.3 MB |+| Standard (large, r 0.4) | 147k | 191k (39) | 3.58 | 3.34 | 2.04 | 0.01 | 2.89 | **12.78** | 0.00 | 9.3 | 8.1 | 4.2 MB |+| Clay | 8k | 18k (10) | 0.38 | 0.36 | 0.25 | 0.00 | 0.52 | **1.58** | 0.00 | 1.1 | 1.2 | 0.3 MB |+| ClayBuildup | 13k | 25k (15) | 0.68 | 0.55 | 0.42 | 0.00 | 0.57 | **2.33** | 0.00 | 1.8 | 1.4 | 0.4 MB |+| Smooth | 7k | 17k (10) | 0.36 | 0.30 | 0.19 | 0.00 | 0.47 | **1.38** | 0.00 | 0.9 | 1.6 | 0.2 MB |+| Inflate | 7k | 16k (10) | 0.34 | 0.34 | 0.21 | 0.00 | 0.48 | **1.44** | 0.00 | 0.9 | 0.7 | 0.2 MB |+| DamStandard | 7k | 16k (10) | 0.40 | 0.35 | 0.21 | 0.00 | 0.48 | **1.50** | 0.00 | 1.4 | 1.1 | 0.2 MB |+| Layer | 7k | 17k (10) | 0.69 | 0.34 | 0.20 | 0.00 | 0.55 | **1.85** | 0.00 | 1.0 | 1.2 | 0.2 MB |+| Move | 6k | 12k (10) | 0.05 | 0.17 | 0.18 | 0.00 | 0.40 | **0.87** | 0.00 | 0.5 | 0.6 | 0.1 MB |+| Recipe (pattern) | 8k | 17k (10) | 0.95 | 0.41 | 0.25 | 0.00 | 0.50 | **2.18** | 0.00 | 1.3 | 1.2 | 0.2 MB |+| Mask | 8k | 17k (10) | 0.37 | 0.00 | 0.00 | 0.01 | 0.42 | **0.87** | 0.00 | 0.0 | 0.0 | 0.1 MB |+| Paint | 8k | 17k (10) | 0.49 | 0.00 | 0.00 | 0.01 | 0.70 | **1.29** | 0.00 | 0.1 | 0.3 | 0.2 MB || Operation | ms ||---|---:|-| Lower Res (to 995k, after edits) | 110 |+| Lower Res (to 995k, after edits) | 175 || Higher Res (back up) | 1 || Lower Res again (no edits) | 5 |-| Higher Res again (no edits) | 2 |-| Save project (165 MB) | 54 |-| Open project | 298 |-| Open project: memory (RSS) | +414 MB, peak +457 MB |-| Orbit: frame time, 4x antialiasing | 4.8 (209 fps) |-| Orbit: frame time, Fast Navigation (no antialiasing) | 3.0 (337 fps) |+| Higher Res again (no edits) | 1 |+| Motion proxy build (first move after an upload) | 16 |+| Orbit: frame time, 4x antialiasing | 2.9 (347 fps) |+| Orbit: frame time, no antialiasing | 1.7 (605 fps) |+| Orbit: triangles drawn | 2.1M (53%) |+| Orbit: frame time, Fast Navigation (no antialiasing, motion proxy) | 1.1 (932 fps) |+| Orbit: triangles drawn (motion proxy) | 771k (19%) |+| GPU memory with the motion proxy | 76 MB = 19.1 B/triangle |-#### 15.9M triangles (8.0M vertices, 6 subdivision levels)+##### 15.9M triangles (8.0M vertices, 6 subdivision levels)| Setup | ||---|---|-| Divide up to this size | 797 |-| BVH build | 1098 |-| First GPU upload | 360 |-| Mesh (incl. topology) | 614 MB = 39 B/triangle |+| Divide up to this size | 1145 |+| BVH build | 787 |+| First GPU upload | 200 |+| GPU memory (buffers) | 235 MB = 14.8 B/triangle |+| Mesh (incl. topology) | 988 MB = 62 B/triangle || BVH | 311 MB = 19.5 B/triangle |-| Subdivision levels (stack) | 470 MB = 29 B/triangle |-| Process memory (RSS) | 1640 MB (+1272 MB = 80 B/triangle) |-| Peak while dividing (RSS) | 1599 MB above the start |+| Subdivision levels (stack) | 1188 MB = 75 B/triangle |+| Process memory (RSS) | 2786 MB (+2286 MB) || Brush | verts/dab | uploaded verts (ranges) | kernel | normals | BVH refit | pick | GPU upload | **dab total** | stroke end (undo record) | undo | redo | undo step ||---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|-| Standard | 50k | 76k (15) | 2.30 | 2.46 | 1.56 | 0.00 | 1.95 | **8.46** | 0.00 | 16.6 | 10.8 | 5.4 MB |-| Standard (large, r 0.4) | 472k | 525k (45) | 9.02 | 9.63 | 5.99 | 0.01 | 10.29 | **35.68** | 0.00 | 35.2 | 34.5 | 18.5 MB |-| Clay | 28k | 47k (11) | 1.18 | 1.44 | 0.93 | 0.01 | 1.03 | **4.68** | 0.00 | 8.7 | 8.6 | 3.5 MB |-| ClayBuildup | 33k | 55k (12) | 1.75 | 1.77 | 1.18 | 0.01 | 1.28 | **6.09** | 0.00 | 11.7 | 9.5 | 3.8 MB |-| Smooth | 19k | 37k (9) | 1.05 | 0.94 | 0.65 | 0.01 | 0.77 | **3.50** | 0.00 | 6.5 | 6.6 | 2.7 MB |-| Inflate | 18k | 36k (9) | 0.83 | 1.07 | 0.79 | 0.01 | 0.76 | **3.52** | 0.00 | 9.3 | 7.2 | 2.6 MB |-| DamStandard | 18k | 35k (9) | 0.86 | 0.96 | 0.67 | 0.01 | 0.73 | **3.30** | 0.00 | 6.6 | 6.5 | 2.5 MB |-| Layer | 19k | 36k (9) | 1.22 | 1.03 | 0.72 | 0.01 | 0.77 | **3.80** | 0.00 | 8.2 | 6.9 | 2.6 MB |-| Move | 16k | 29k (8) | 0.14 | 0.60 | 0.74 | 0.01 | 0.60 | **2.16** | 0.00 | 1.7 | 1.7 | 0.3 MB |-| Recipe (pattern) | 19k | 37k (9) | 2.07 | 1.02 | 0.67 | 0.01 | 0.80 | **4.63** | 0.00 | 8.0 | 7.9 | 2.6 MB |-| Mask | 19k | 36k (9) | 0.72 | 0.00 | 0.00 | 0.01 | 0.91 | **1.71** | 0.00 | 0.3 | 0.3 | 1.3 MB |-| Paint | 19k | 36k (9) | 0.64 | 0.00 | 0.00 | 0.01 | 1.20 | **1.92** | 0.00 | 0.5 | 0.4 | 2.6 MB |+| Standard | 37k | 61k (25) | 1.47 | 1.23 | 0.87 | 0.00 | 1.19 | **5.10** | 0.00 | 2.9 | 2.5 | 1.3 MB |+| Standard (large, r 0.4) | 589k | 699k (74) | 10.90 | 11.26 | 7.20 | 0.01 | 10.53 | **43.38** | 0.00 | 31.2 | 30.8 | 17.0 MB |+| Clay | 32k | 54k (21) | 1.22 | 1.28 | 0.73 | 0.00 | 1.03 | **4.54** | 0.00 | 2.1 | 2.5 | 1.1 MB |+| ClayBuildup | 51k | 78k (25) | 2.37 | 1.92 | 1.04 | 0.01 | 1.39 | **7.14** | 0.00 | 3.2 | 4.0 | 1.5 MB |+| Smooth | 30k | 51k (19) | 1.36 | 1.29 | 0.75 | 0.00 | 0.97 | **4.63** | 0.00 | 2.2 | 2.1 | 1.0 MB |+| Inflate | 29k | 50k (19) | 1.21 | 1.21 | 0.63 | 0.01 | 0.96 | **4.26** | 0.00 | 2.5 | 2.3 | 1.0 MB |+| DamStandard | 29k | 50k (19) | 1.15 | 1.18 | 0.59 | 0.01 | 1.06 | **4.23** | 0.00 | 2.3 | 1.9 | 1.0 MB |+| Layer | 30k | 51k (20) | 2.01 | 1.10 | 0.52 | 0.01 | 0.86 | **4.74** | 0.00 | 2.3 | 2.3 | 1.0 MB |+| Move | 23k | 40k (11) | 0.21 | 0.38 | 0.45 | 0.01 | 0.72 | **2.13** | 0.00 | 0.9 | 1.0 | 0.4 MB |+| Recipe (pattern) | 31k | 53k (19) | 1.76 | 1.25 | 0.55 | 0.01 | 1.14 | **4.98** | 0.00 | 2.9 | 2.4 | 1.0 MB |+| Mask | 31k | 52k (19) | 1.26 | 0.00 | 0.00 | 0.01 | 1.08 | **2.60** | 0.00 | 0.1 | 0.1 | 0.5 MB |+| Paint | 31k | 52k (19) | 1.12 | 0.00 | 0.00 | 0.01 | 1.80 | **3.17** | 0.00 | 0.2 | 0.2 | 1.0 MB || Operation | ms ||---|---:|-| Lower Res (to 4.0M, after edits) | 434 |+| Lower Res (to 4.0M, after edits) | 748 || Higher Res (back up) | 5 |-| Lower Res again (no edits) | 24 |-| Higher Res again (no edits) | 6 |-| Save project (658 MB) | 231 |-| Open project | 1047 |-| Open project: memory (RSS) | +1621 MB, peak +1875 MB |-| Orbit: frame time, 4x antialiasing | 11.9 (84 fps) |-| Orbit: frame time, Fast Navigation (no antialiasing) | 8.4 (118 fps) |+| Lower Res again (no edits) | 25 |+| Higher Res again (no edits) | 7 |+| Motion proxy build (first move after an upload) | 68 |+| Orbit: frame time, 4x antialiasing | 4.9 (202 fps) |+| Orbit: frame time, no antialiasing | 3.2 (317 fps) |+| Orbit: triangles drawn | 7.8M (49%) |+| Orbit: frame time, Fast Navigation (no antialiasing, motion proxy) | 1.9 (525 fps) |+| Orbit: triangles drawn (motion proxy) | 3.1M (19%) |+| GPU memory with the motion proxy | 304 MB = 19.1 B/triangle |-#### 33.2M triangles (16.6M vertices, 7 subdivision levels)+##### 33.2M triangles (16.6M vertices, 7 subdivision levels)| Setup | ||---|---|-| Divide up to this size | 1415 |-| BVH build | 1675 |-| First GPU upload | 710 |-| Mesh (incl. topology) | 1281 MB = 39 B/triangle |+| Divide up to this size | 3030 |+| BVH build | 1693 |+| First GPU upload | 461 |+| GPU memory (buffers) | 490 MB = 14.8 B/triangle |+| Mesh (incl. topology) | 2062 MB = 62 B/triangle || BVH | 648 MB = 19.5 B/triangle |-| Subdivision levels (stack) | 980 MB = 29 B/triangle |-| Process memory (RSS) | 3306 MB (+2520 MB = 76 B/triangle) |-| Peak while dividing (RSS) | 3185 MB above the start |+| Subdivision levels (stack) | 2481 MB = 75 B/triangle |+| Process memory (RSS) | 5757 MB (+4345 MB) || Brush | verts/dab | uploaded verts (ranges) | kernel | normals | BVH refit | pick | GPU upload | **dab total** | stroke end (undo record) | undo | redo | undo step ||---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|-| Standard | 103k | 147k (22) | 4.19 | 3.47 | 1.94 | 0.00 | 3.77 | **13.71** | 0.00 | 25.5 | 23.4 | 11.4 MB |-| Standard (large, r 0.4) | 987k | 1.1M (57) | 17.54 | 19.03 | 11.59 | 0.01 | 15.89 | **65.42** | 0.00 | 71.5 | 69.9 | 38.7 MB |-| Clay | 58k | 90k (16) | 2.09 | 1.82 | 1.03 | 0.01 | 1.85 | **7.02** | 0.00 | 14.3 | 14.1 | 7.2 MB |-| ClayBuildup | 66k | 101k (17) | 2.48 | 2.17 | 1.25 | 0.01 | 2.06 | **8.19** | 0.00 | 15.3 | 15.2 | 8.0 MB |-| Smooth | 39k | 67k (14) | 1.71 | 1.58 | 0.80 | 0.02 | 1.51 | **5.77** | 0.00 | 11.0 | 10.8 | 5.7 MB |-| Inflate | 38k | 65k (14) | 1.54 | 1.80 | 0.95 | 0.02 | 1.46 | **5.94** | 0.00 | 10.7 | 11.0 | 5.6 MB |-| DamStandard | 37k | 64k (14) | 1.54 | 1.76 | 0.91 | 0.02 | 1.64 | **6.03** | 0.00 | 10.4 | 10.4 | 5.4 MB |-| Layer | 37k | 65k (14) | 2.14 | 1.66 | 0.82 | 0.02 | 1.43 | **6.22** | 0.00 | 11.3 | 11.2 | 5.6 MB |-| Move | 33k | 58k (11) | 0.27 | 0.88 | 0.76 | 0.02 | 1.22 | **3.32** | 0.00 | 1.5 | 2.0 | 0.5 MB |-| Recipe (pattern) | 38k | 67k (14) | 2.66 | 1.78 | 0.81 | 0.02 | 1.58 | **7.03** | 0.00 | 11.4 | 11.4 | 5.4 MB |-| Mask | 39k | 66k (15) | 1.48 | 0.00 | 0.00 | 0.02 | 1.84 | **3.48** | 0.00 | 0.8 | 0.6 | 2.7 MB |-| Paint | 39k | 66k (15) | 1.38 | 0.00 | 0.00 | 0.02 | 2.30 | **3.83** | 0.00 | 1.2 | 1.0 | 5.5 MB |+| Standard | 78k | 114k (35) | 2.95 | 2.73 | 1.55 | 0.00 | 2.35 | **10.25** | 0.00 | 6.4 | 5.0 | 2.8 MB |+| Standard (large, r 0.4) | 1.2M | 1.4M (104) | 22.30 | 24.75 | 15.38 | 0.01 | 22.64 | **92.39** | 0.00 | 67.3 | 68.8 | 35.5 MB |+| Clay | 68k | 101k (30) | 2.67 | 2.49 | 1.42 | 0.01 | 2.07 | **9.26** | 0.00 | 5.4 | 4.9 | 2.4 MB |+| ClayBuildup | 107k | 150k (35) | 4.00 | 3.00 | 1.58 | 0.01 | 2.77 | **12.20** | 0.00 | 6.2 | 6.9 | 3.1 MB |+| Smooth | 63k | 95k (28) | 2.88 | 2.22 | 1.10 | 0.01 | 2.17 | **8.93** | 0.00 | 5.2 | 5.3 | 2.1 MB |+| Inflate | 61k | 92k (28) | 2.52 | 2.68 | 1.34 | 0.01 | 1.88 | **8.98** | 0.00 | 4.8 | 4.8 | 2.1 MB |+| DamStandard | 61k | 93k (27) | 2.35 | 2.42 | 1.22 | 0.01 | 1.90 | **8.46** | 0.00 | 4.4 | 4.3 | 2.0 MB |+| Layer | 63k | 96k (27) | 4.21 | 1.98 | 0.97 | 0.01 | 1.72 | **9.48** | 0.00 | 4.6 | 5.0 | 2.1 MB |+| Move | 49k | 77k (15) | 0.39 | 1.13 | 1.32 | 0.01 | 1.51 | **5.16** | 0.00 | 2.1 | 2.1 | 0.9 MB |+| Recipe (pattern) | 65k | 99k (28) | 4.60 | 2.42 | 1.15 | 0.01 | 2.19 | **10.95** | 0.00 | 5.0 | 5.8 | 2.1 MB |+| Mask | 66k | 97k (28) | 2.43 | 0.00 | 0.00 | 0.01 | 1.89 | **4.87** | 0.00 | 0.3 | 0.3 | 1.0 MB |+| Paint | 66k | 97k (28) | 2.33 | 0.00 | 0.00 | 0.01 | 3.69 | **6.58** | 0.00 | 0.5 | 0.5 | 2.1 MB || Operation | ms ||---|---:|-| Lower Res (to 8.3M, after edits) | 876 |-| Higher Res (back up) | 13 |-| Lower Res again (no edits) | 55 |-| Higher Res again (no edits) | 11 |-| Save project (1373 MB) | 433 |-| Open project | 2137 |-| Open project: memory (RSS) | +3475 MB, peak +4017 MB |-| Orbit: frame time, 4x antialiasing | 20.0 (50 fps) |-| Orbit: frame time, Fast Navigation (no antialiasing) | 14.6 (68 fps) |+| Lower Res (to 8.3M, after edits) | 1557 |+| Higher Res (back up) | 10 |+| Lower Res again (no edits) | 41 |+| Higher Res again (no edits) | 10 |+| Motion proxy build (first move after an upload) | 142 |+| Orbit: frame time, 4x antialiasing | 8.7 (115 fps) |+| Orbit: frame time, no antialiasing | 6.1 (163 fps) |+| Orbit: triangles drawn | 15.9M (48%) |+| Orbit: frame time, Fast Navigation (no antialiasing, motion proxy) | 3.2 (314 fps) |+| Orbit: triangles drawn (motion proxy) | 6.4M (19%) |+| GPU memory with the motion proxy | 633 MB = 19.1 B/triangle |-### After, CPU only, 64M+#### After: feat/view, 33M without the makeCube fix (the sphere has cracks, so it counts as open)-Threads: 10. Brushes use X symmetry (two dabs per step), radius 0.12 on a unit sphere unless noted, 40 dabs per stroke. Times in milliseconds.+Threads: 10, GPU: Apple M1 Pro (G13S C0), OpenGL 4.6 (Core Profile) Mesa 26.1.8. Brushes use X symmetry (two dabs per step), radius 0.12 on a unit sphere unless noted, 10 dabs per stroke. Times in milliseconds.-#### 63.7M triangles (31.9M vertices, 7 subdivision levels)+##### 33.2M triangles (16.6M vertices, 7 subdivision levels)| Setup | ||---|---|-| Divide up to this size | 2809 |-| BVH build | 3347 |-| Mesh (incl. topology) | 2456 MB = 39 B/triangle |-| BVH | 1244 MB = 19.5 B/triangle |-| Subdivision levels (stack) | 1879 MB = 29 B/triangle |-| Process memory (RSS) | 5763 MB (+5753 MB = 90 B/triangle) |-| Peak while dividing (RSS) | 6786 MB above the start |+| Divide up to this size | 2463 |+| BVH build | 1653 |+| First GPU upload | 571 |+| GPU memory (buffers) | 490 MB = 14.8 B/triangle |+| Mesh (incl. topology) | 2062 MB = 62 B/triangle |+| BVH | 648 MB = 19.5 B/triangle |+| Subdivision levels (stack) | 2481 MB = 75 B/triangle |+| Process memory (RSS) | 5497 MB (+5427 MB) |-| Brush | verts/dab | uploaded verts (ranges) | kernel | normals | BVH refit | pick | **dab total** | stroke end (undo record) | undo | redo | undo step |-|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|-| Standard | 198k | 259k (28) | 6.58 | 4.76 | 2.82 | 0.00 | **14.68** | 0.00 | 43.2 | 43.1 | 21.8 MB |-| Standard (large, r 0.4) | 1.9M | 2.0M (79) | 33.33 | 36.58 | 22.48 | 0.01 | **94.81** | 0.00 | 138.0 | 135.5 | 74.0 MB |-| Clay | 110k | 155k (21) | 4.23 | 2.97 | 1.75 | 0.02 | **9.31** | 0.00 | 25.6 | 25.8 | 13.8 MB |-| ClayBuildup | 120k | 166k (23) | 4.38 | 3.07 | 1.75 | 0.02 | **9.58** | 0.00 | 29.2 | 28.1 | 15.1 MB |-| Smooth | 71k | 108k (19) | 3.11 | 2.26 | 1.12 | 0.03 | **6.76** | 0.00 | 20.9 | 21.3 | 10.8 MB |-| Inflate | 69k | 106k (19) | 2.81 | 2.30 | 1.25 | 0.03 | **6.65** | 0.00 | 20.6 | 20.2 | 10.7 MB |-| DamStandard | 68k | 104k (18) | 2.59 | 2.19 | 1.15 | 0.03 | **6.21** | 0.00 | 19.6 | 19.4 | 10.4 MB |-| Layer | 70k | 107k (19) | 3.73 | 2.34 | 1.18 | 0.03 | **7.55** | 0.00 | 20.7 | 21.6 | 10.8 MB |-| Move | 64k | 98k (13) | 0.55 | 1.12 | 1.14 | 0.03 | **3.17** | 0.00 | 2.5 | 2.9 | 1.0 MB |-| Recipe (pattern) | 72k | 109k (19) | 4.01 | 2.42 | 1.15 | 0.04 | **7.90** | 0.00 | 21.0 | 21.2 | 10.6 MB |-| Mask | 72k | 108k (19) | 2.46 | 0.00 | 0.00 | 0.03 | **2.71** | 0.00 | 1.6 | 1.3 | 5.3 MB |-| Paint | 72k | 108k (19) | 2.34 | 0.00 | 0.00 | 0.03 | **2.57** | 0.00 | 2.6 | 2.3 | 10.7 MB |+| Brush | verts/dab | uploaded verts (ranges) | kernel | normals | BVH refit | pick | GPU upload | **dab total** | stroke end (undo record) | undo | redo | undo step |+|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|+| Standard | 78k | 114k (35) | 3.14 | 2.73 | 1.44 | 0.00 | 2.25 | **10.23** | 0.00 | 5.5 | 5.5 | 2.8 MB |+| Standard (large, r 0.4) | 1.2M | 1.4M (104) | 22.73 | 22.99 | 14.65 | 0.01 | 21.52 | **89.23** | 0.00 | 64.1 | 63.2 | 35.5 MB |+| Clay | 68k | 101k (30) | 3.13 | 2.15 | 1.24 | 0.01 | 1.95 | **9.06** | 0.00 | 4.9 | 5.0 | 2.4 MB |+| ClayBuildup | 107k | 150k (35) | 4.85 | 2.71 | 1.74 | 0.01 | 2.74 | **13.00** | 0.00 | 7.2 | 7.1 | 3.1 MB |+| Smooth | 63k | 95k (28) | 2.82 | 1.77 | 1.03 | 0.01 | 1.80 | **7.96** | 0.00 | 4.7 | 4.7 | 2.1 MB |+| Inflate | 61k | 92k (28) | 2.89 | 1.96 | 1.22 | 0.01 | 1.83 | **8.43** | 0.00 | 4.2 | 4.8 | 2.1 MB |+| DamStandard | 61k | 93k (27) | 2.80 | 1.97 | 1.17 | 0.01 | 1.82 | **8.32** | 0.00 | 4.1 | 4.1 | 2.0 MB |+| Layer | 63k | 96k (27) | 4.58 | 2.05 | 1.07 | 0.01 | 1.83 | **10.10** | 0.01 | 4.5 | 4.1 | 2.1 MB |+| Move | 49k | 77k (15) | 0.41 | 0.79 | 1.01 | 0.01 | 1.40 | **4.43** | 0.00 | 2.4 | 2.1 | 0.9 MB |+| Recipe (pattern) | 65k | 99k (28) | 3.28 | 1.91 | 1.01 | 0.01 | 2.04 | **8.85** | 0.00 | 4.3 | 4.4 | 2.1 MB |+| Mask | 66k | 97k (28) | 2.58 | 0.00 | 0.00 | 0.01 | 2.04 | **5.21** | 0.01 | 0.4 | 0.3 | 1.0 MB |+| Paint | 66k | 97k (28) | 2.84 | 0.00 | 0.00 | 0.01 | 3.67 | **7.11** | 0.01 | 0.8 | 1.0 | 2.1 MB || Operation | ms ||---|---:|-| Lower Res (to 15.9M, after edits) | 1551 |-| Higher Res (back up) | 25 |-| Lower Res again (no edits) | 76 |-| Higher Res again (no edits) | 21 |-| Save project (2633 MB) | 846 |-| Open project | 6307 |-| Open project: memory (RSS) | +6822 MB, peak +7821 MB |+| Lower Res (to 8.3M, after edits) | 1541 |+| Higher Res (back up) | 10 |+| Lower Res again (no edits) | 40 |+| Higher Res again (no edits) | 10 |+| Motion proxy build (first move after an upload) | 127 |+| Orbit: frame time, 4x antialiasing | 15.3 (66 fps) |+| Orbit: frame time, no antialiasing | 12.2 (82 fps) |+| Orbit: triangles drawn | 33.2M (100%) |+| Orbit: frame time, Fast Navigation (no antialiasing, motion proxy) | 4.6 (218 fps) |+| Orbit: triangles drawn (motion proxy) | 6.5M (19%) |+| GPU memory with the motion proxy | 633 MB = 19.1 B/triangle |-### After, CPU only, 104M (no project round trip)+#### After: feat/view, 64M-Threads: 10. Brushes use X symmetry (two dabs per step), radius 0.12 on a unit sphere unless noted, 40 dabs per stroke. Times in milliseconds.+Threads: 10, GPU: Apple M1 Pro (G13S C0), OpenGL 4.6 (Core Profile) Mesa 26.1.8. Brushes use X symmetry (two dabs per step), radius 0.12 on a unit sphere unless noted, 10 dabs per stroke. Times in milliseconds.-#### 104.0M triangles (52.0M vertices, 8 subdivision levels)+##### 63.7M triangles (31.9M vertices, 7 subdivision levels)| Setup | ||---|---|-| Divide up to this size | 4889 |-| BVH build | 5896 |-| Mesh (incl. topology) | 4011 MB = 39 B/triangle |-| BVH | 2043 MB = 19.6 B/triangle |-| Subdivision levels (stack) | 3068 MB = 29 B/triangle |-| Process memory (RSS) | 8974 MB (+8964 MB = 86 B/triangle) |-| Peak while dividing (RSS) | 10982 MB above the start |+| Divide up to this size | 4596 |+| BVH build | 3209 |+| First GPU upload | 784 |+| GPU memory (buffers) | 940 MB = 14.8 B/triangle |+| Mesh (incl. topology) | 3953 MB = 62 B/triangle |+| BVH | 1244 MB = 19.5 B/triangle |+| Subdivision levels (stack) | 4756 MB = 75 B/triangle |+| Process memory (RSS) | 10407 MB (+10337 MB) |-| Brush | verts/dab | uploaded verts (ranges) | kernel | normals | BVH refit | pick | **dab total** | stroke end (undo record) | undo | redo | undo step |-|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|-| Standard | 324k | 407k (43) | 9.69 | 7.10 | 5.00 | 0.00 | **22.61** | 0.00 | 70.3 | 68.2 | 35.6 MB |-| Standard (large, r 0.4) | 3.1M | 3.2M (114) | 54.36 | 60.70 | 42.49 | 0.02 | **161.53** | 0.00 | 262.4 | 261.4 | 121.1 MB |-| Clay | 181k | 242k (32) | 6.10 | 4.26 | 2.59 | 0.03 | **13.52** | 0.00 | 47.7 | 51.7 | 22.6 MB |-| ClayBuildup | 193k | 256k (34) | 6.94 | 4.91 | 3.10 | 0.04 | **15.59** | 0.00 | 51.3 | 52.3 | 24.4 MB |-| Smooth | 115k | 164k (28) | 4.76 | 3.13 | 1.60 | 0.05 | **9.96** | 0.00 | 35.2 | 35.1 | 17.4 MB |-| Inflate | 113k | 161k (27) | 4.43 | 3.27 | 1.85 | 0.05 | **10.01** | 0.00 | 34.7 | 36.1 | 17.2 MB |-| DamStandard | 111k | 159k (28) | 4.08 | 3.26 | 1.67 | 0.05 | **9.44** | 0.00 | 37.3 | 39.0 | 16.7 MB |-| Layer | 114k | 163k (28) | 5.86 | 3.11 | 1.69 | 0.05 | **11.11** | 0.00 | 41.4 | 38.9 | 17.4 MB |-| Move | 105k | 152k (30) | 0.78 | 1.57 | 1.83 | 0.05 | **4.76** | 0.00 | 4.1 | 4.1 | 1.7 MB |-| Recipe (pattern) | 117k | 167k (28) | 6.53 | 3.10 | 1.49 | 0.05 | **11.58** | 0.00 | 37.2 | 36.8 | 17.2 MB |-| Mask | 118k | 166k (28) | 3.85 | 0.00 | 0.00 | 0.05 | **4.26** | 0.00 | 2.6 | 2.3 | 8.6 MB |-| Paint | 118k | 166k (28) | 3.95 | 0.00 | 0.00 | 0.05 | **4.36** | 0.00 | 4.2 | 4.0 | 17.3 MB |+| Brush | verts/dab | uploaded verts (ranges) | kernel | normals | BVH refit | pick | GPU upload | **dab total** | stroke end (undo record) | undo | redo | undo step |+|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|+| Standard | 149k | 204k (46) | 5.29 | 3.40 | 2.23 | 0.00 | 3.79 | **16.17** | 0.00 | 10.5 | 10.2 | 5.3 MB |+| Standard (large, r 0.4) | 2.4M | 2.7M (141) | 42.11 | 43.62 | 28.13 | 0.01 | 40.24 | **167.87** | 0.00 | 125.7 | 123.4 | 67.9 MB |+| Clay | 129k | 180k (40) | 4.91 | 3.28 | 1.88 | 0.01 | 3.40 | **14.67** | 0.00 | 9.4 | 10.1 | 4.5 MB |+| ClayBuildup | 204k | 271k (46) | 7.79 | 4.76 | 2.66 | 0.01 | 4.79 | **21.48** | 0.00 | 11.7 | 12.6 | 6.0 MB |+| Smooth | 120k | 167k (37) | 4.84 | 3.12 | 1.42 | 0.01 | 3.01 | **13.37** | 0.01 | 10.0 | 10.1 | 4.0 MB |+| Inflate | 117k | 164k (37) | 4.65 | 3.14 | 1.93 | 0.01 | 3.13 | **13.81** | 0.01 | 8.1 | 8.1 | 3.9 MB |+| DamStandard | 116k | 165k (37) | 4.61 | 3.07 | 1.62 | 0.01 | 3.27 | **13.70** | 0.00 | 7.5 | 7.7 | 3.9 MB |+| Layer | 120k | 169k (39) | 8.03 | 3.36 | 1.44 | 0.01 | 3.09 | **16.93** | 0.01 | 10.5 | 11.0 | 4.0 MB |+| Move | 93k | 130k (29) | 0.74 | 1.46 | 1.60 | 0.01 | 2.43 | **7.76** | 0.00 | 3.7 | 3.8 | 1.6 MB |+| Recipe (pattern) | 125k | 175k (40) | 7.13 | 3.07 | 1.37 | 0.02 | 3.43 | **16.15** | 0.01 | 10.4 | 10.4 | 4.0 MB |+| Mask | 126k | 174k (39) | 4.59 | 0.00 | 0.00 | 0.02 | 3.66 | **9.19** | 0.00 | 0.6 | 0.6 | 2.0 MB |+| Paint | 126k | 174k (39) | 4.64 | 0.00 | 0.00 | 0.01 | 7.28 | **12.88** | 0.00 | 0.9 | 0.9 | 4.0 MB || Operation | ms ||---|---:|-| Lower Res (to 26.0M, after edits) | 2776 |-| Higher Res (back up) | 32 |-| Lower Res again (no edits) | 133 |-| Higher Res again (no edits) | 32 |--## v0.6+| Lower Res (to 15.9M, after edits) | 2842 |+| Higher Res (back up) | 19 |+| Lower Res again (no edits) | 77 |+| Higher Res again (no edits) | 19 |+| Motion proxy build (first move after an upload) | 241 |+| Orbit: frame time, 4x antialiasing | 14.0 (71 fps) |+| Orbit: frame time, no antialiasing | 11.3 (88 fps) |+| Orbit: triangles drawn | 29.9M (47%) |+| Orbit: frame time, Fast Navigation (no antialiasing, motion proxy) | 6.5 (154 fps) |+| Orbit: triangles drawn (motion proxy) | 12.4M (19%) |+| GPU memory with the motion proxy | 1214 MB = 19.1 B/triangle |-The v0.6 performance batch ran as three branches side by side (mem, brush, view); each adds its own subsection-here. Same machine and benchmark as above.+#### After: feat/view, 104M (--bench-view)-### Brushes: vertex sets, normals, BVH refits (feat/brush)+Threads: 10, GPU: Apple M1 Pro (G13S C0), OpenGL 4.6 (Core Profile) Mesa 26.1.8. Brushes use X symmetry (two dabs per step), radius 0.12 on a unit sphere unless noted, 10 dabs per stroke. Times in milliseconds.-Goal: big Move / Smooth / Inflate / Standard strokes fluid on huge meshes (a large dab under about 25 ms at 33M-triangles, a medium one under about 5 ms, undo of a large stroke at least twice as fast), with results still-identical with multithreading on or off. "Before" is main at aac5f68 with the two large-radius rows added to the-benchmark (28fb707), "after" is feat/brush; both binaries were run in turn, three times each, at 4, 16 and 33M-(CPU only, no project round trip, 40 dabs per stroke, X symmetry), keeping each row's best run, because the-other branches' builds and tests kept the machine busy (load 8-20). 64M: best of two runs each.+##### 104.0M triangles (52.0M vertices, 8 subdivision levels)-| 33M triangles, X symmetry | before | after | |-|---|---:|---:|---|-| Medium dab (Standard, radius 0.12: 100k vertices per step) | 8.6 ms | **3.6 ms** | 2.4x |-| Large dab (Standard, radius 0.4: 1M vertices per step) | 49.4 ms | **21.0 ms** | 2.3x |-| Large Smooth | 27.8 ms | **9.8 ms** | 2.8x |-| Large Move | 16.5 ms | **5.2 ms** | 3.2x |-| Undo of the 40-dab large Standard stroke (2.4M vertices) | 69.5 ms | **35.0 ms** | 2.0x |-| Undo of a medium stroke | 21.7 ms | **10.5 ms** | 2.1x |-| BVH | 19.5 B/triangle | **17.1** | |-| Mesh | 62 B/triangle | **60** | |-| Stroke recorder (allocated by the first stroke) | 12 B/vertex | **3 bits** | |+| Setup | |+|---|---|+| Divide up to this size | 7638 |+| BVH build | 5301 |+| First GPU upload | 1283 |+| GPU memory (buffers) | 1535 MB = 14.8 B/triangle |+| Mesh (incl. topology) | 6455 MB = 62 B/triangle |+| BVH | 2043 MB = 19.6 B/triangle |+| Subdivision levels (stack) | 7765 MB = 75 B/triangle |+| Process memory (RSS) | 16656 MB (+16586 MB) |-At 64M triangles (CPU only): medium dab 14.2 -> **7.4 ms**, large 95.9 -> **57.5 ms**, large Smooth 48.2 -> **25.8 ms**,-large Move 34.9 -> **14.7 ms**, undo of the large stroke 138 -> **98 ms**.+| Brush | verts/dab | uploaded verts (ranges) | kernel | normals | BVH refit | pick | GPU upload | **dab total** | stroke end (undo record) | undo | redo | undo step |+|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|+| Standard | 244k | 321k (59) | 8.15 | 5.73 | 3.85 | 0.01 | 6.60 | **26.45** | 0.00 | 17.3 | 17.0 | 8.6 MB |+| Mask | 237k | 309k (58) | 8.68 | 0.00 | 0.00 | 0.01 | 6.54 | **17.23** | 0.00 | 1.2 | 1.2 | 4.2 MB |+| Paint | 237k | 309k (58) | 8.79 | 0.00 | 0.00 | 0.01 | 12.77 | **23.43** | 0.00 | 2.0 | 1.9 | 8.4 MB |-The v0.5 summary's 93 ms for the large dab includes the GPU upload; CPU only, the v0.5 "after" table above-has 53 ms and 77 ms for its undo, in line with today's "before" runs of the same code (49 and 70 ms).+| Operation | ms |+|---|---:|+| Motion proxy build (first move after an upload) | 408 |+| Orbit: frame time, 4x antialiasing | 19.6 (51 fps) |+| Orbit: frame time, no antialiasing | 16.9 (59 fps) |+| Orbit: triangles drawn | 48.1M (46%) |+| Orbit: frame time, Fast Navigation (no antialiasing, motion proxy) | 9.9 (101 fps) |+| Orbit: triangles drawn (motion proxy) | 20.1M (19%) |+| GPU memory with the motion proxy | 1982 MB = 19.1 B/triangle |-With the GPU (`sculptforge --bench`, before and after run in turn, best of two, the upload of what each dab changed-included; the upload itself is the view branch's work and unchanged here), at 33M: medium dab 11.4 -> **6.5 ms**,-large 62.8 -> **38.7 ms** (15 ms of it the upload), large Move 22.1 -> **11.9 ms**. The CPU-side target (large-dab under 25 ms) is met; with the upload the large dab is still above it.+## v0.5-#### What changed+Measurements for the v0.5 performance work ("Performance at 20-100M polygons, multithreaded brushes, fast undo").+Every number here comes from the benchmark built into SculptForge, so anyone can reproduce it:-- **Vertex sets as bitmaps, listed in index order** (core/IndexBits.h): one bit per vertex (or BVH leaf) plus a- summary bit per 4096, so listing a set visits only the chunks that hold members. The BVH vertex query, the- normal update and the refit used 32-bit stamps per vertex and listed vertices in the order threads found- them; now every dab's vertex list is in increasing index order. On a divided mesh a dab's vertices lie in a few- dozen runs of the numbering, so the kernel, the normal update and the undo record walk positions, normals and- adjacency front to back instead of jumping between subdivision levels. The order doesn't depend on the thread- count, so results stay identical with multithreading on or off (the tests compare bit for bit).-- **Each thread marks a bitmap of its own** (IndexBits::insertParallel, scratch sets shared process-wide): with- one shared bitmap, threads fought over its cache lines and the query scaled 3x on 10 cores; merging per-job- sets by chunk made it twice as fast. The query also splits the sphere's subtrees breadth first until it has 128- tasks (it used a fixed depth, which gave a medium dab fewer than 8 tasks, so it ran on one thread), skips the- distance tests for leaves wholly inside the sphere, and stays on one thread for small dabs.-- **Refit from the query**: the query already visits the BVH leaves holding the vertices it returns, so a dab- refits exactly those (BVH::refitQueried, BVH::refitLeaves) instead of looking every moved vertex's triangles- up; the Move brush keeps its stroke's leaves. Generic refits (undo, transforms) use a leaf bitmap. At 33M the- large dab's refit went from 11.7 to 5.5 ms.-- **Normals**: the vertices to update (moved ones and their ring) are a bitmap, listed in order and ORed straight- into the mesh's dirty bits; each vertex sums its faces as before (identical values), with the faces of- vertices 16 ahead and their corners 8 ahead prefetched (core/Prefetch.h), about 30% less time on one thread.- Symmetric dabs update the normals once after all mirrors moved, so a vertex in both halves (near the symmetry- plane) is updated once; each mirror still refits the BVH before the next one queries it.-- **Undo record and Move in parallel**: displaceAll counts per block which vertices the stroke moves for the- first time and writes their undo entries at those offsets (same order as before) while moving them; the- Sculptor's per-vertex stamps for positions, mask and colours are bitmaps cleared from the stroke's own lists.- The Move brush moves each mirror's region in parallel (it was a serial loop). Undo and redo swap position- channels in parallel (each lists a vertex once).-- **Benchmark**: Smooth and Move at radius 0.4, and `--bench-brushes TEXT` to run only the rows whose name- contains TEXT.+```+sculptforge --bench [--bench-sizes 4,16,32] [--bench-dabs 40] [--bench-no-project] [--bench-out report.md]+sculptforge-cli --bench ... # the same without the GPU (CI, servers)+```-Tried and dropped: computing each face normal once into a compact array (gathering the faces as a set and-finding each by its rank) was slower than summing the faces per vertex; prefetching in the refit's leaf loop and-in the Smooth kernel, longer prefetch distances, and skipping repeated leaves in the refit's lookup made no-difference or were slower.+The benchmark (core/Benchmark.cpp, app/Bench.cpp) builds a sphere the way a sculptor gets one: a quad cube+projected onto a sphere and divided (Catmull-Clark) to about 4, 16 and 33 million triangles, so the mesh has+subdivision levels and the vertex numbering of a divided mesh. It then runs a stroke with each brush, with X+symmetry on as in the app, a medium Draw Size (radius 0.12 on the unit sphere, about 64 pixels on a 1080p view+framing the model) and dabs 0.15 radius apart, and times per dab: the brush kernel (finding and moving the+vertices), the normal update, the BVH refit, the pick, and with the GPU the upload of what the dab changed+(`glFinish` included). Per stroke it times the undo record, undo and redo; then stepping subdivision levels,+saving and opening the project, and 120 frames of orbiting in a 1600 x 960 window (no vsync).-Behaviour: results are identical with multithreading on or off. Compared with 0.5 they differ by rounding (a-brush's area normal and centre are summed over its vertices in index order instead of BVH order) and, where the-two halves of a symmetric dab overlap, both halves now see the normals from before the dab (the second one used-to see the first one's).+Machine: Apple M1 Pro (8 performance + 2 efficiency cores, 32 GB unified memory; 30 GB usable under Asahi+Linux), Mesa 26.1 (OpenGL 4.6). Another process kept one core busy during all runs. "Before" is main at+00c4989 with only the benchmark added (the same instrumentation, no other change); "after" is feat/perf.+GPU runs use 10 dabs per stroke (the old upload made 40 too slow), CPU-only runs 40. The 33M GPU runs skip+the project round trip: opening a second copy of a 33M project next to the first ran out of memory on this+machine before the changes.-#### Known limits+### Summary-- Normal updates and refits still wait on memory: a vertex's faces and their corners are scattered over the- triangle and position arrays. Per-leaf contiguous vertex lists would let a leaf's box be recomputed from its- 15 or so vertices instead of 48 corners, but cost about 4 bytes per triangle; quantised BVH nodes and SoA- positions were not tried.-- At 64M the gains are smaller (1.4x for undo of a large stroke, 98 ms): the generic refit's per-vertex leaf- lookup and the normal update over 4.6M vertices dominate.-- Undo of a Mask or Paint stroke is about 0.4 ms slower at 33M (1.2 instead of 0.8 ms): its entries are now in- index order per dab rather than in BVH order.-- Prefetching is a no-op with MSVC (core/Prefetch.h uses the GCC / Clang builtin).+| | 4M triangles | 16M triangles | 33M triangles |+|---|---|---|---|+| Medium brush (Standard), one dab, upload included | 23.6 -> **1.3 ms** | 166 -> **5.9 ms** | 390 -> **10.3 ms** |+| Large brush (radius 0.4: 1.2M vertices per dab at 33M) | 44 -> **13 ms** | 572 -> **43 ms** | 548 -> **93 ms** |+| Vertices uploaded per medium dab (changed: 9k / 37k / 78k) | most of the index range -> **20k** | most of the range -> **60k** | most of the range -> **117k** |+| Orbit, 4x antialiasing | 5.1 -> **5.0 ms** (200 fps) | 12.7 -> **11.8 ms** (85 fps) | 30.4 -> **20.6 ms** (49 fps) |+| Orbit, Fast Navigation (no AA while moving) | **3.1 ms** | **8.0 ms** | **14.0 ms (71 fps)** |+| Undo / redo of a 40-dab medium stroke | 7.7 -> **3.4 ms** | 33 -> **12 ms** | 71 -> **24 ms** |+| Undo of a 40-dab large stroke | 28 -> **11 ms** | 116 -> **38 ms** | 286 -> **77 ms** |+| Lower Res after sculpting (folds the edits into the levels) | 300 -> **175 ms** | 1338 -> **718 ms** | 4245 -> **1539 ms** |+| Higher Res / Lower Res without edits | 2-5 -> **1-5 ms** | 5-20 -> **5-20 ms** | 37-320 -> **10-41 ms** |+| Save project | 768 -> **81 ms** | 3060 -> **321 ms** | 8115 -> **677 ms** (1.9 GB) |+| Open project | 1696 -> **550 ms** | 8130 -> **2278 ms** | 15487 -> **5679 ms** |+| BVH build (open, import, level change without cache) | 693 -> **215 ms** | 2912 -> **829 ms** | 6285 -> **1747 ms** |+| First GPU upload | 98 -> **90 ms** | 514 -> **344 ms** | 907 -> **705 ms** |+| Mesh memory (with topology) | 90 -> **62 bytes per triangle** | | 2990 -> **2062 MB** |-#### CPU only, 4.0M triangles+Targets from the brief: a dab under 16 ms at 16M triangles with a medium brush is reached (5.9 ms, and 10.3 ms+at 33M). Orbiting at 60 fps at 32M is reached while the view moves with Fast Navigation (71 fps); with 4x+antialiasing it is 49 fps on this integrated GPU (it was 33).-| Brush | dab before | dab after | kernel | normals | BVH refit | undo before | undo after |-|---|---:|---:|---:|---:|---:|---:|---:|-| Standard | 1.40 | **1.09** | 0.49 -> 0.44 | 0.48 -> 0.38 | 0.39 -> 0.24 | 2.9 | **1.2** |-| Standard (large, r 0.4) | 8.04 | **3.51** | 2.95 -> 1.44 | 3.06 -> 0.93 | 1.80 -> 0.89 | 10.0 | **4.1** |-| Clay | 0.79 | **0.68** | 0.30 -> 0.30 | 0.27 -> 0.22 | 0.20 -> 0.13 | 2.4 | **1.0** |-| ClayBuildup | 1.03 | **0.82** | 0.43 -> 0.38 | 0.33 -> 0.25 | 0.25 -> 0.16 | 2.5 | **0.8** |-| Smooth | 0.55 | **0.48** | 0.24 -> 0.23 | 0.17 -> 0.15 | 0.12 -> 0.08 | 2.0 | **1.1** |-| Smooth (large, r 0.4) | 5.24 | **2.42** | 2.15 -> 1.18 | 2.04 -> 0.68 | 0.93 -> 0.43 | 6.3 | **2.6** |-| Inflate | 0.51 | **0.47** | 0.19 -> 0.20 | 0.17 -> 0.16 | 0.12 -> 0.08 | 1.9 | **1.1** |-| DamStandard | 0.49 | **0.45** | 0.19 -> 0.21 | 0.16 -> 0.15 | 0.11 -> 0.08 | 2.4 | **1.0** |-| Layer | 0.58 | **0.55** | 0.28 -> 0.29 | 0.17 -> 0.15 | 0.11 -> 0.08 | 1.9 | **1.2** |-| Move | 0.26 | **0.22** | 0.02 -> 0.02 | 0.10 -> 0.12 | 0.12 -> 0.07 | 0.3 | **0.2** |-| Move (large, r 0.4) | 2.17 | **1.13** | 0.41 -> 0.21 | 0.73 -> 0.55 | 0.86 -> 0.27 | 2.4 | **0.9** |-| Recipe (pattern) | 0.77 | **0.73** | 0.46 -> 0.48 | 0.17 -> 0.15 | 0.12 -> 0.08 | 2.0 | **0.8** |-| Mask | 0.19 | **0.21** | 0.17 -> 0.19 | 0.00 -> 0.00 | 0.00 -> 0.00 | 0.1 | **0.1** |-| Paint | 0.20 | **0.19** | 0.17 -> 0.17 | 0.00 -> 0.00 | 0.00 -> 0.00 | 0.1 | **0.1** |+### What changed-#### CPU only, 15.9M triangles+- **Thread pool** (core/ThreadPool.h): a persistent pool (one thread per core, up to 16) with `poolFor`, which+ splits work into fixed blocks of 4096; sums are made per block and added in block order, so results don't+ depend on the thread count and a region of one block is computed exactly like before. Ranges under 4 blocks+ run inline. It runs every brush kernel (all types, recipes, mask, paint weights), normal updates, the BVH+ vertex query (in traversal order, so the vertex list is identical), refits and build, renderer gathers and+ project CRCs. Undo records stay serial, in order. `set_multithreading enabled=false` (or the checkbox) runs+ everything on one thread; tests compare both bit for bit.+- **Partial GPU updates.** The old renderer uploaded one index range from the lowest to the highest changed+ vertex. On a divided mesh, whose vertices are numbered level by level, a dab with symmetry covers most of+ that range: every dab re-sent nearly the whole mesh. Meshes now mark changed vertices in a bitset (plus+ 2048-vertex blocks to find them fast), and the renderer stores vertices in first-use order of the triangle list+ (core/UploadOrder.h), which keeps any region of a divided mesh together; a dab uploads a few 512-vertex+ blocks (15-20 `glBufferSubData` calls per array). The same order improves the GPU's vertex cache: orbiting at+ 33M went from 30 to 21 ms with the same shaders.+- **Normals** are summed per vertex from its faces (same sums as before) instead of through a per-triangle face+ normal cache, which saves 16 bytes per triangle (cache and stamps); the adjacency list no longer keeps+ spare capacity (12 bytes per triangle); the renderer no longer keeps a CPU copy of the curvature.+- **Undo** already stored only the touched vertices per stroke; it is faster because the normal and BVH updates+ it runs are. The first polypaint stroke on an unpainted mesh no longer copies the whole mesh for undo (it+ keeps the empty paint stack): at 33M that copy was over 2 GB.+- **Projects**: the ZIP writer streamed the archive into a second in-memory copy and the reader read the file+ through a byte iterator; now entries go straight to the file, are read in place, CRCs use slicing-by-8 in+ parallel, and arrays are copied (not converted byte by byte) on little-endian CPUs. Archives over 4 GB use+ ZIP64 (the old writer refused them); smaller archives are byte-identical to before.+- **Viewport**: the window has no multisampling; the 3D view draws into its own multisampled target and resolves+ it (Renderer::drawView). That allows **Fast Navigation** (scenes of 10M+ triangles drop antialiasing while the+ view moves) and falling back to fewer samples when the target can't be allocated. A mesh whose buffers run the+ GPU out of memory is skipped with a status message rather than drawn from incomplete buffers.-| Brush | dab before | dab after | kernel | normals | BVH refit | undo before | undo after |-|---|---:|---:|---:|---:|---:|---:|---:|-| Standard | 4.91 | **2.49** | 1.88 -> 1.03 | 1.82 -> 0.69 | 1.07 -> 0.59 | 10.8 | **4.7** |-| Standard (large, r 0.4) | 24.70 | **10.29** | 8.98 -> 3.29 | 9.29 -> 3.14 | 5.72 -> 2.90 | 33.8 | **16.9** |-| Clay | 3.09 | **1.89** | 1.16 -> 0.94 | 1.13 -> 0.48 | 0.71 -> 0.33 | 7.1 | **3.4** |-| ClayBuildup | 3.35 | **2.18** | 1.33 -> 0.96 | 1.20 -> 0.67 | 0.72 -> 0.43 | 7.6 | **3.4** |-| Smooth | 2.15 | **1.55** | 0.89 -> 0.78 | 0.69 -> 0.39 | 0.50 -> 0.30 | 5.5 | **2.7** |-| Smooth (large, r 0.4) | 12.95 | **5.43** | 5.48 -> 2.33 | 4.75 -> 1.51 | 2.30 -> 1.09 | 20.2 | **10.0** |-| Inflate | 2.12 | **1.54** | 0.77 -> 0.68 | 0.74 -> 0.43 | 0.53 -> 0.33 | 5.4 | **2.6** |-| DamStandard | 2.07 | **1.54** | 0.76 -> 0.71 | 0.73 -> 0.42 | 0.50 -> 0.31 | 5.4 | **2.5** |-| Layer | 2.41 | **1.73** | 1.04 -> 0.92 | 0.78 -> 0.44 | 0.51 -> 0.29 | 6.5 | **2.7** |-| Move | 1.15 | **0.68** | 0.14 -> 0.11 | 0.42 -> 0.37 | 0.51 -> 0.12 | 0.9 | **0.6** |-| Move (large, r 0.4) | 7.39 | **2.80** | 1.57 -> 0.34 | 2.37 -> 1.23 | 2.67 -> 0.77 | 5.6 | **2.4** |-| Recipe (pattern) | 3.17 | **2.65** | 1.78 -> 1.81 | 0.80 -> 0.45 | 0.50 -> 0.28 | 6.6 | **2.6** |-| Mask | 0.76 | **0.54** | 0.69 -> 0.47 | 0.00 -> 0.00 | 0.00 -> 0.00 | 0.3 | **0.5** |-| Paint | 0.69 | **0.58** | 0.62 -> 0.51 | 0.00 -> 0.00 | 0.00 -> 0.00 | 0.5 | **0.8** |+### Memory per triangle (33M benchmark sphere, after)-#### CPU only, 33.2M triangles+| | bytes per triangle |+|---|---|+| Mesh: positions, normals, triangles, quad pairs, polygroups, adjacency (vertex-vertex and vertex-triangle), stamps, dirty bits | 62 (was 90) |+| BVH | 19.5 |+| Subdivision levels (the level stack keeps every level's data, detail and topology) | 75 |+| GPU: positions, normals, curvature per vertex; indices | about 26 |-| Brush | dab before | dab after | kernel | normals | BVH refit | undo before | undo after |-|---|---:|---:|---:|---:|---:|---:|---:|-| Standard | 8.59 | **3.64** | 3.66 -> 1.47 | 2.87 -> 0.98 | 1.76 -> 0.85 | 21.7 | **10.5** |-| Standard (large, r 0.4) | 49.42 | **21.03** | 18.08 -> 6.06 | 18.22 -> 7.63 | 11.67 -> 5.53 | 69.5 | **35.0** |-| Clay | 5.63 | **2.70** | 2.36 -> 1.22 | 2.00 -> 0.76 | 1.03 -> 0.51 | 14.3 | **6.7** |-| ClayBuildup | 6.32 | **2.96** | 2.60 -> 1.28 | 2.26 -> 0.80 | 1.22 -> 0.59 | 15.8 | **7.5** |-| Smooth | 3.95 | **2.14** | 1.62 -> 1.00 | 1.44 -> 0.64 | 0.73 -> 0.30 | 12.1 | **5.3** |-| Smooth (large, r 0.4) | 27.81 | **9.78** | 12.07 -> 3.80 | 9.97 -> 3.14 | 4.98 -> 1.84 | 40.5 | **18.2** |-| Inflate | 4.39 | **2.02** | 1.72 -> 0.87 | 1.67 -> 0.63 | 0.83 -> 0.37 | 11.1 | **4.9** |-| DamStandard | 4.28 | **2.41** | 1.64 -> 1.04 | 1.74 -> 0.74 | 0.73 -> 0.38 | 11.4 | **4.8** |-| Layer | 4.85 | **2.80** | 2.14 -> 1.47 | 1.73 -> 0.74 | 0.81 -> 0.36 | 11.5 | **5.0** |-| Move | 2.14 | **1.26** | 0.28 -> 0.28 | 0.90 -> 0.62 | 0.78 -> 0.23 | 1.8 | **1.1** |-| Move (large, r 0.4) | 16.52 | **5.23** | 3.23 -> 0.55 | 5.88 -> 2.34 | 5.98 -> 1.53 | 10.7 | **4.4** |-| Recipe (pattern) | 5.05 | **3.33** | 2.57 -> 2.15 | 1.53 -> 0.64 | 0.77 -> 0.33 | 11.1 | **5.1** |-| Mask | 1.39 | **1.08** | 1.26 -> 0.90 | 0.00 -> 0.00 | 0.00 -> 0.00 | 0.8 | **1.2** |-| Paint | 1.34 | **1.06** | 1.21 -> 0.90 | 0.00 -> 0.00 | 0.00 -> 0.00 | 1.3 | **1.8** |+A 33M sculpt with levels holds about 5.4 GB (RSS); the 64M benchmark sphere 10 GB, where a medium dab still+takes 14.6 ms (without the upload) and undo of a 40-dab stroke 42 ms (last table).-#### With the GPU, 4.0M triangles+### Known limits-| Brush | dab before | dab after | of which GPU upload (after) | undo before | undo after |-|---|---:|---:|---:|---:|---:|-| Standard | 1.77 | **1.47** | 0.36 | 3.4 | **1.6** |-| Standard (large, r 0.4) | 10.76 | **5.97** | 2.28 | 9.8 | **4.2** |-| Smooth (large, r 0.4) | 6.98 | **3.83** | 1.21 | 5.7 | **3.1** |-| Move (large, r 0.4) | 3.03 | **2.12** | 0.78 | 2.0 | **1.2** |-| Clay | 1.04 | **0.90** | 0.22 | 2.6 | **1.6** |-| Inflate | 0.67 | **0.62** | 0.16 | 1.5 | **1.1** |+- The subdivision level stack (75 bytes per triangle) keeps a copy of the current level's positions and+ triangles next to the working mesh; sharing them would save about 18 bytes per triangle but needs changes to+ the level code. Divide stops at 50M triangles (core/Multires.h).+- Normal updates and refits scale about 2-3x on 10 cores: they read vertices scattered over memory (the same+ numbering issue as the uploads), so they wait on memory, not arithmetic.+- Very large brushes on 33M meshes (a tenth of the model per dab) take about 90 ms per dab.+- Opening a project needs about twice the memory of the scene while it loads.-#### With the GPU, 15.9M triangles+### Before (main at 00c4989 plus the benchmark)-| Brush | dab before | dab after | of which GPU upload (after) | undo before | undo after |-|---|---:|---:|---:|---:|---:|-| Standard | 6.80 | **3.68** | 1.29 | 12.9 | **5.2** |-| Standard (large, r 0.4) | 32.72 | **18.57** | 7.68 | 33.2 | **17.4** |-| Smooth (large, r 0.4) | 18.38 | **9.54** | 4.00 | 20.6 | **10.3** |-| Move (large, r 0.4) | 10.35 | **5.82** | 3.03 | 5.6 | **2.5** |-| Clay | 3.80 | **2.60** | 0.81 | 6.9 | **2.9** |-| Inflate | 2.64 | **2.23** | 0.66 | 5.3 | **2.2** |+#### CPU only-#### With the GPU, 33.2M triangles+Threads: 10. Brushes use X symmetry (two dabs per step), radius 0.12 on a unit sphere unless noted, 40 dabs per stroke. Times in milliseconds.-| Brush | dab before | dab after | of which GPU upload (after) | undo before | undo after |-|---|---:|---:|---:|---:|---:|-| Standard | 11.42 | **6.50** | 2.64 | 21.7 | **11.8** |-| Standard (large, r 0.4) | 62.83 | **38.74** | 14.97 | 68.7 | **36.7** |-| Smooth (large, r 0.4) | 32.19 | **20.94** | 8.62 | 36.6 | **19.8** |-| Move (large, r 0.4) | 22.07 | **11.88** | 5.98 | 11.1 | **5.8** |-| Clay | 6.60 | **4.44** | 1.74 | 13.2 | **6.6** |-| Inflate | 5.10 | **3.68** | 1.47 | 10.5 | **5.6** |+##### 4.0M triangles (2.0M vertices, 5 subdivision levels)++| Setup | |+|---|---|+| Divide up to this size | 411 |+| BVH build | 693 |+| Mesh (incl. topology) | 358 MB = 90 B/triangle |+| BVH | 78 MB = 19.5 B/triangle |+| Subdivision levels (stack) | 297 MB = 74 B/triangle |+| Process memory (RSS) | 708 MB (+698 MB) |++| Brush | verts/dab | kernel | normals | BVH refit | pick | **dab total** | stroke end (undo record) | undo | redo | undo step |+|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|+| Standard | 12k | 0.41 | 0.56 | 0.31 | 0.00 | **1.29** | 0.00 | 7.7 | 7.3 | 1.4 MB |+| Standard (large, r 0.4) | 118k | 4.27 | 6.18 | 3.33 | 0.00 | **13.78** | 0.00 | 28.2 | 27.9 | 4.6 MB |+| Clay | 7k | 0.26 | 0.31 | 0.17 | 0.00 | **0.74** | 0.00 | 4.4 | 4.0 | 0.9 MB |+| ClayBuildup | 8k | 0.34 | 0.37 | 0.21 | 0.00 | **0.92** | 0.00 | 4.0 | 3.9 | 0.8 MB |+| Smooth | 5k | 0.21 | 0.21 | 0.11 | 0.00 | **0.53** | 0.00 | 2.6 | 2.5 | 0.6 MB |+| Inflate | 5k | 0.17 | 0.20 | 0.11 | 0.00 | **0.48** | 0.00 | 2.5 | 2.5 | 0.6 MB |+| DamStandard | 4k | 0.17 | 0.19 | 0.11 | 0.00 | **0.47** | 0.00 | 2.4 | 2.3 | 0.5 MB |+| Layer | 5k | 0.25 | 0.20 | 0.11 | 0.00 | **0.56** | 0.00 | 2.6 | 2.5 | 0.6 MB |+| Move | 4k | 0.02 | 0.10 | 0.09 | 0.00 | **0.21** | 0.00 | 0.3 | 0.3 | 0.1 MB |+| Recipe (pattern) | 5k | 0.41 | 0.20 | 0.11 | 0.00 | **0.73** | 0.00 | 2.6 | 2.4 | 0.6 MB |+| Mask | 5k | 0.15 | 0.00 | 0.00 | 0.00 | **0.15** | 0.00 | 0.0 | 0.0 | 0.3 MB |+| Paint | 5k | 0.15 | 0.00 | 0.00 | 0.00 | **0.15** | 0.00 | 0.1 | 0.1 | 0.6 MB |++| Operation | ms |+|---|---:|+| Lower Res (to 995k, after edits) | 300 |+| Higher Res (back up) | 2 |+| Lower Res again (no edits) | 5 |+| Higher Res again (no edits) | 2 |+| Save project (228 MB) | 768 |+| Open project | 1696 |++##### 15.9M triangles (8.0M vertices, 6 subdivision levels)++| Setup | |+|---|---|+| Divide up to this size | 1846 |+| BVH build | 2912 |+| Mesh (incl. topology) | 1433 MB = 90 B/triangle |+| BVH | 311 MB = 19.5 B/triangle |+| Subdivision levels (stack) | 1188 MB = 75 B/triangle |+| Process memory (RSS) | 2778 MB (+2377 MB) |++| Brush | verts/dab | kernel | normals | BVH refit | pick | **dab total** | stroke end (undo record) | undo | redo | undo step |+|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|+| Standard | 50k | 1.76 | 2.45 | 1.31 | 0.00 | **5.52** | 0.00 | 33.3 | 32.6 | 5.4 MB |+| Standard (large, r 0.4) | 472k | 17.82 | 27.90 | 16.01 | 0.01 | **61.73** | 0.00 | 116.2 | 114.7 | 18.5 MB |+| Clay | 28k | 0.98 | 1.28 | 0.67 | 0.01 | **2.94** | 0.00 | 20.6 | 20.6 | 3.5 MB |+| ClayBuildup | 33k | 1.34 | 1.56 | 0.82 | 0.01 | **3.73** | 0.00 | 23.1 | 22.7 | 3.8 MB |+| Smooth | 19k | 0.86 | 0.88 | 0.44 | 0.01 | **2.19** | 0.00 | 15.5 | 15.4 | 2.7 MB |+| Inflate | 18k | 0.66 | 0.86 | 0.46 | 0.01 | **1.98** | 0.00 | 15.4 | 14.9 | 2.6 MB |+| DamStandard | 18k | 0.68 | 0.83 | 0.42 | 0.01 | **1.94** | 0.00 | 14.8 | 14.4 | 2.5 MB |+| Layer | 19k | 0.99 | 0.86 | 0.43 | 0.01 | **2.29** | 0.00 | 15.2 | 15.2 | 2.6 MB |+| Move | 16k | 0.07 | 0.41 | 0.36 | 0.01 | **0.87** | 0.00 | 1.1 | 1.1 | 0.3 MB |+| Recipe (pattern) | 19k | 1.73 | 0.89 | 0.43 | 0.01 | **3.07** | 0.00 | 15.2 | 15.2 | 2.6 MB |+| Mask | 19k | 0.57 | 0.00 | 0.00 | 0.01 | **0.58** | 0.00 | 0.3 | 0.2 | 1.3 MB |+| Paint | 19k | 0.58 | 0.00 | 0.00 | 0.01 | **0.59** | 0.00 | 0.5 | 0.3 | 2.6 MB |++| Operation | ms |+|---|---:|+| Lower Res (to 4.0M, after edits) | 1338 |+| Higher Res (back up) | 5 |+| Lower Res again (no edits) | 20 |+| Higher Res again (no edits) | 5 |+| Save project (913 MB) | 3060 |+| Open project | 8130 |++##### 33.2M triangles (16.6M vertices, 7 subdivision levels)++| Setup | |+|---|---|+| Divide up to this size | 4302 |+| BVH build | 6285 |+| Mesh (incl. topology) | 2990 MB = 90 B/triangle |+| BVH | 648 MB = 19.5 B/triangle |+| Subdivision levels (stack) | 2481 MB = 75 B/triangle |+| Process memory (RSS) | 5749 MB (+5268 MB) |++| Brush | verts/dab | kernel | normals | BVH refit | pick | **dab total** | stroke end (undo record) | undo | redo | undo step |+|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|+| Standard | 103k | 3.96 | 5.49 | 2.94 | 0.00 | **12.40** | 0.00 | 70.8 | 71.1 | 11.4 MB |+| Standard (large, r 0.4) | 987k | 39.60 | 60.23 | 35.90 | 0.01 | **135.74** | 0.00 | 286.0 | 283.7 | 38.7 MB |+| Clay | 58k | 2.66 | 3.60 | 1.92 | 0.01 | **8.19** | 0.00 | 51.2 | 50.7 | 7.2 MB |+| ClayBuildup | 66k | 3.29 | 3.96 | 2.13 | 0.02 | **9.41** | 0.00 | 56.5 | 56.7 | 8.0 MB |+| Smooth | 39k | 2.58 | 2.65 | 1.32 | 0.02 | **6.58** | 0.00 | 55.5 | 40.1 | 5.7 MB |+| Inflate | 38k | 1.79 | 2.24 | 1.17 | 0.02 | **5.23** | 0.00 | 39.8 | 40.7 | 5.6 MB |+| DamStandard | 37k | 1.95 | 2.30 | 1.18 | 0.02 | **5.46** | 0.00 | 40.0 | 38.6 | 5.4 MB |+| Layer | 37k | 2.72 | 2.33 | 1.18 | 0.02 | **6.26** | 0.00 | 45.8 | 41.4 | 5.6 MB |+| Move | 33k | 0.23 | 1.27 | 1.19 | 0.02 | **2.78** | 0.00 | 3.1 | 2.9 | 0.5 MB |+| Recipe (pattern) | 38k | 4.32 | 2.29 | 1.11 | 0.02 | **7.74** | 0.00 | 37.2 | 37.8 | 5.4 MB |+| Mask | 39k | 1.23 | 0.00 | 0.00 | 0.02 | **1.25** | 0.00 | 0.7 | 0.6 | 2.7 MB |+| Paint | 39k | 1.30 | 0.00 | 0.00 | 0.02 | **1.32** | 0.00 | 1.3 | 1.1 | 5.5 MB |++| Operation | ms |+|---|---:|+| Lower Res (to 8.3M, after edits) | 4245 |+| Higher Res (back up) | 37 |+| Lower Res again (no edits) | 320 |+| Higher Res again (no edits) | 64 |+| Save project (1905 MB) | 8115 |+| Open project | 15487 |-| BVH build | 222 |-| First GPU upload | 90 |-| Mesh (incl. topology) | 247 MB = 62 B/triangle |+#### With the GPU, 4M++Threads: 10, GPU: Apple M1 Pro (G13S C0), OpenGL 4.6 (Core Profile) Mesa 26.1.8. Brushes use X symmetry (two dabs per step), radius 0.12 on a unit sphere unless noted, 10 dabs per stroke. Times in milliseconds.++##### 4.0M triangles (2.0M vertices, 5 subdivision levels)++| Setup | |+|---|---|+| Divide up to this size | 463 |+| BVH build | 767 |+| First GPU upload | 98 |+| Mesh (incl. topology) | 358 MB = 90 B/triangle || BVH | 78 MB = 19.5 B/triangle || Subdivision levels (stack) | 297 MB = 74 B/triangle |-| Process memory (RSS) | 718 MB (+648 MB) |+| Process memory (RSS) | 801 MB (+730 MB) |-| Brush | verts/dab | uploaded verts (ranges) | kernel | normals | BVH refit | pick | GPU upload | **dab total** | stroke end (undo record) | undo | redo | undo step |-|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|-| Standard | 9k | 20k (12) | 0.36 | 0.36 | 0.30 | 0.00 | 0.28 | **1.33** | 0.00 | 1.3 | 1.3 | 0.3 MB |-| Standard (large, r 0.4) | 147k | 183k (53) | 3.70 | 4.00 | 2.07 | 0.00 | 2.85 | **12.88** | 0.00 | 9.3 | 9.5 | 4.2 MB |-| Clay | 8k | 17k (11) | 0.33 | 0.30 | 0.24 | 0.00 | 0.23 | **1.13** | 0.00 | 1.0 | 0.9 | 0.3 MB |-| ClayBuildup | 13k | 24k (13) | 0.54 | 0.44 | 0.40 | 0.00 | 0.32 | **1.73** | 0.00 | 2.1 | 2.2 | 0.4 MB |-| Smooth | 7k | 16k (10) | 0.34 | 0.26 | 0.19 | 0.00 | 0.22 | **1.03** | 0.00 | 0.8 | 1.4 | 0.2 MB |-| Inflate | 7k | 16k (10) | 0.28 | 0.25 | 0.20 | 0.00 | 0.21 | **0.96** | 0.00 | 0.6 | 1.6 | 0.2 MB |-| DamStandard | 7k | 16k (10) | 0.29 | 0.25 | 0.19 | 0.00 | 0.21 | **0.96** | 0.00 | 1.0 | 2.1 | 0.2 MB |-| Layer | 7k | 16k (10) | 0.59 | 0.30 | 0.20 | 0.00 | 0.22 | **1.34** | 0.00 | 1.3 | 2.1 | 0.2 MB |-| Move | 6k | 14k (9) | 0.03 | 0.15 | 0.18 | 0.00 | 0.18 | **0.59** | 0.00 | 0.4 | 0.4 | 0.1 MB |-| Recipe (pattern) | 8k | 17k (11) | 0.72 | 0.27 | 0.20 | 0.00 | 0.22 | **1.44** | 0.00 | 0.7 | 1.4 | 0.2 MB |-| Mask | 8k | 16k (10) | 0.30 | 0.00 | 0.00 | 0.00 | 0.39 | **0.71** | 0.00 | 0.0 | 0.0 | 0.1 MB |-| Paint | 8k | 16k (10) | 0.25 | 0.00 | 0.00 | 0.00 | 0.65 | **0.93** | 0.00 | 0.0 | 0.0 | 0.2 MB |+| Brush | verts/dab | kernel | normals | BVH refit | pick | GPU upload | **dab total** | stroke end (undo record) | undo | redo | undo step |+|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|+| Standard | 9k | 0.42 | 0.52 | 0.25 | 0.00 | 22.36 | **23.57** | 0.00 | 1.9 | 1.8 | 0.3 MB |+| Standard (large, r 0.4) | 147k | 6.78 | 9.16 | 5.13 | 0.00 | 23.38 | **44.48** | 0.00 | 28.4 | 36.0 | 4.2 MB |+| Clay | 8k | 0.75 | 0.57 | 0.27 | 0.01 | 26.43 | **28.05** | 0.00 | 1.5 | 1.5 | 0.3 MB |+| ClayBuildup | 13k | 0.64 | 0.75 | 0.34 | 0.01 | 23.57 | **25.32** | 0.00 | 2.1 | 2.1 | 0.4 MB |+| Smooth | 7k | 0.49 | 0.42 | 0.32 | 0.01 | 23.69 | **24.94** | 0.00 | 1.4 | 1.3 | 0.2 MB |+| Inflate | 7k | 0.34 | 0.40 | 0.20 | 0.01 | 21.50 | **22.45** | 0.00 | 1.3 | 1.5 | 0.2 MB |+| DamStandard | 7k | 0.35 | 0.42 | 0.18 | 0.01 | 21.82 | **22.78** | 0.00 | 1.3 | 1.4 | 0.2 MB |+| Layer | 7k | 0.64 | 0.43 | 0.19 | 0.01 | 22.58 | **23.85** | 0.00 | 1.6 | 1.7 | 0.2 MB |+| Move | 6k | 0.05 | 0.27 | 0.17 | 0.01 | 19.98 | **20.53** | 0.00 | 0.6 | 0.6 | 0.1 MB |+| Recipe (pattern) | 8k | 0.89 | 0.44 | 0.19 | 0.01 | 23.07 | **24.60** | 0.00 | 1.4 | 1.4 | 0.2 MB |+| Mask | 8k | 0.35 | 0.00 | 0.00 | 0.01 | 23.60 | **23.97** | 0.00 | 0.0 | 0.0 | 0.1 MB |+| Paint | 8k | 0.35 | 0.00 | 0.00 | 0.01 | 24.31 | **24.68** | 0.00 | 0.1 | 0.1 | 0.2 MB || Operation | ms ||---|---:|-| Lower Res (to 995k, after edits) | 184 |-| Higher Res (back up) | 1 |-| Lower Res again (no edits) | 5 |-| Higher Res again (no edits) | 1 |-| Orbit: frame time, 4x antialiasing | 5.0 (199 fps) |-| Orbit: frame time, Fast Navigation (no antialiasing) | 3.2 (308 fps) |+| Lower Res (to 995k, after edits) | 475 |+| Higher Res (back up) | 2 |+| Lower Res again (no edits) | 7 |+| Higher Res again (no edits) | 2 |+| Save project (228 MB) | 908 |+| Open project | 2026 |+| Orbit: frame time | 5.1 (194 fps) |++#### With the GPU, 16M++Threads: 10, GPU: Apple M1 Pro (G13S C0), OpenGL 4.6 (Core Profile) Mesa 26.1.8. Brushes use X symmetry (two dabs per step), radius 0.12 on a unit sphere unless noted, 10 dabs per stroke. Times in milliseconds.##### 15.9M triangles (8.0M vertices, 6 subdivision levels)| Setup | ||---|---|-| Divide up to this size | 1189 |-| BVH build | 794 |-| First GPU upload | 337 |-| Mesh (incl. topology) | 988 MB = 62 B/triangle |+| Divide up to this size | 2281 |+| BVH build | 3320 |+| First GPU upload | 514 |+| Mesh (incl. topology) | 1433 MB = 90 B/triangle || BVH | 311 MB = 19.5 B/triangle || Subdivision levels (stack) | 1188 MB = 75 B/triangle |-| Process memory (RSS) | 2712 MB (+2172 MB) |+| Process memory (RSS) | 2828 MB (+2757 MB) |-| Brush | verts/dab | uploaded verts (ranges) | kernel | normals | BVH refit | pick | GPU upload | **dab total** | stroke end (undo record) | undo | redo | undo step |-|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|-| Standard | 37k | 60k (12) | 1.55 | 1.65 | 1.09 | 0.00 | 0.95 | **5.35** | 0.00 | 3.1 | 3.1 | 1.3 MB |-| Standard (large, r 0.4) | 589k | 650k (53) | 11.12 | 11.62 | 7.06 | 0.01 | 9.93 | **40.64** | 0.00 | 30.7 | 30.4 | 17.0 MB |-| Clay | 32k | 53k (11) | 1.31 | 1.46 | 0.87 | 0.00 | 0.83 | **4.58** | 0.00 | 2.2 | 2.6 | 1.1 MB |-| ClayBuildup | 51k | 77k (13) | 1.87 | 1.54 | 1.01 | 0.00 | 1.20 | **5.76** | 0.00 | 3.1 | 3.0 | 1.5 MB |-| Smooth | 30k | 51k (10) | 1.17 | 1.18 | 0.54 | 0.00 | 1.02 | **4.02** | 0.00 | 2.3 | 2.4 | 1.0 MB |-| Inflate | 29k | 50k (10) | 1.24 | 1.30 | 0.86 | 0.00 | 0.76 | **4.25** | 0.00 | 2.5 | 2.4 | 1.0 MB |-| DamStandard | 29k | 49k (10) | 1.27 | 1.38 | 0.66 | 0.00 | 0.99 | **4.42** | 0.00 | 3.0 | 2.7 | 1.0 MB |-| Layer | 30k | 51k (10) | 2.29 | 1.42 | 0.59 | 0.00 | 1.06 | **5.49** | 0.00 | 2.9 | 3.2 | 1.0 MB |-| Move | 23k | 42k (9) | 0.19 | 0.64 | 0.66 | 0.00 | 0.63 | **2.37** | 0.00 | 1.6 | 1.8 | 0.4 MB |-| Recipe (pattern) | 31k | 52k (11) | 1.69 | 1.20 | 0.50 | 0.00 | 0.80 | **4.31** | 0.00 | 2.0 | 2.5 | 1.0 MB |-| Mask | 31k | 52k (11) | 1.29 | 0.00 | 0.00 | 0.01 | 1.44 | **2.82** | 0.00 | 0.1 | 0.1 | 0.5 MB |-| Paint | 31k | 52k (11) | 0.98 | 0.00 | 0.00 | 0.00 | 2.64 | **3.71** | 0.00 | 0.2 | 0.1 | 1.0 MB |+| Brush | verts/dab | kernel | normals | BVH refit | pick | GPU upload | **dab total** | stroke end (undo record) | undo | redo | undo step |+|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|+| Standard | 37k | 1.62 | 2.14 | 1.09 | 0.01 | 161.12 | **165.99** | 0.00 | 26.0 | 16.9 | 1.3 MB |+| Standard (large, r 0.4) | 589k | 53.96 | 87.81 | 50.14 | 0.01 | 379.68 | **571.63** | 0.00 | 124.1 | 112.5 | 17.0 MB |+| Clay | 32k | 1.45 | 1.77 | 0.86 | 0.01 | 148.08 | **152.18** | 0.00 | 6.2 | 6.1 | 1.1 MB |+| ClayBuildup | 51k | 2.45 | 2.91 | 1.54 | 0.01 | 150.24 | **157.18** | 0.01 | 8.7 | 9.2 | 1.5 MB |+| Smooth | 30k | 1.94 | 1.82 | 0.99 | 0.01 | 154.28 | **159.06** | 0.01 | 5.4 | 5.3 | 1.0 MB |+| Inflate | 29k | 1.36 | 1.68 | 0.86 | 0.01 | 152.70 | **156.62** | 0.00 | 6.2 | 6.0 | 1.0 MB |+| DamStandard | 29k | 1.39 | 1.70 | 0.81 | 0.01 | 163.71 | **167.64** | 0.01 | 6.9 | 11.5 | 1.0 MB |+| Layer | 30k | 2.48 | 1.66 | 0.77 | 0.01 | 149.94 | **154.88** | 0.00 | 5.4 | 5.4 | 1.0 MB |+| Move | 23k | 0.22 | 0.89 | 0.67 | 0.01 | 141.54 | **143.53** | 0.01 | 2.3 | 2.2 | 0.4 MB |+| Recipe (pattern) | 31k | 3.35 | 1.72 | 1.49 | 0.01 | 159.51 | **166.10** | 0.01 | 5.7 | 6.3 | 1.0 MB |+| Mask | 31k | 1.68 | 0.00 | 0.00 | 0.01 | 161.04 | **162.75** | 0.00 | 0.1 | 0.2 | 0.5 MB |+| Paint | 31k | 1.27 | 0.00 | 0.00 | 0.01 | 153.57 | **154.86** | 0.01 | 0.3 | 0.2 | 1.0 MB || Operation | ms ||---|---:|-| Lower Res (to 4.0M, after edits) | 766 |-| Higher Res (back up) | 5 |-| Lower Res again (no edits) | 21 |+| Lower Res (to 4.0M, after edits) | 1492 |+| Higher Res (back up) | 7 |+| Lower Res again (no edits) | 20 || Higher Res again (no edits) | 5 |-| Orbit: frame time, 4x antialiasing | 11.8 (84 fps) |-| Orbit: frame time, Fast Navigation (no antialiasing) | 8.7 (115 fps) |+| Save project (913 MB) | 3134 |+| Open project | 8582 |+| Orbit: frame time | 12.7 (79 fps) |++#### With the GPU, 33M (no project round trip)++Threads: 10, GPU: Apple M1 Pro (G13S C0), OpenGL 4.6 (Core Profile) Mesa 26.1.8. Brushes use X symmetry (two dabs per step), radius 0.12 on a unit sphere unless noted, 10 dabs per stroke. Times in milliseconds.##### 33.2M triangles (16.6M vertices, 7 subdivision levels)| Setup | ||---|---|-| Divide up to this size | 2469 |-| BVH build | 1655 |-| First GPU upload | 701 |-| Mesh (incl. topology) | 2062 MB = 62 B/triangle |+| Divide up to this size | 4091 |+| BVH build | 6244 |+| First GPU upload | 907 |+| Mesh (incl. topology) | 2990 MB = 90 B/triangle || BVH | 648 MB = 19.5 B/triangle || Subdivision levels (stack) | 2481 MB = 75 B/triangle |-| Process memory (RSS) | 5642 MB (+4820 MB) |+| Process memory (RSS) | 5833 MB (+5763 MB) |-| Brush | verts/dab | uploaded verts (ranges) | kernel | normals | BVH refit | pick | GPU upload | **dab total** | stroke end (undo record) | undo | redo | undo step |-|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|-| Standard | 78k | 117k (18) | 3.34 | 3.86 | 1.84 | 0.00 | 2.62 | **11.91** | 0.00 | 6.9 | 5.6 | 2.8 MB |-| Standard (large, r 0.4) | 1.2M | 1.3M (67) | 21.60 | 22.79 | 14.70 | 0.01 | 17.56 | **78.51** | 0.00 | 63.7 | 62.8 | 35.5 MB |-| Clay | 68k | 104k (17) | 2.63 | 2.26 | 1.34 | 0.00 | 1.76 | **8.20** | 0.00 | 4.4 | 4.6 | 2.4 MB |-| ClayBuildup | 107k | 151k (21) | 4.31 | 2.84 | 1.68 | 0.01 | 2.87 | **12.06** | 0.00 | 6.0 | 6.3 | 3.1 MB |-| Smooth | 63k | 98k (17) | 2.55 | 1.91 | 1.05 | 0.01 | 1.70 | **7.46** | 0.00 | 4.3 | 4.6 | 2.1 MB |-| Inflate | 61k | 96k (16) | 2.36 | 2.27 | 1.31 | 0.01 | 1.67 | **7.82** | 0.00 | 4.4 | 4.0 | 2.1 MB |-| DamStandard | 61k | 96k (16) | 2.30 | 1.85 | 1.15 | 0.01 | 1.42 | **6.92** | 0.00 | 4.2 | 3.9 | 2.0 MB |-| Layer | 63k | 99k (17) | 4.53 | 2.18 | 1.14 | 0.01 | 1.60 | **9.66** | 0.00 | 3.7 | 3.8 | 2.1 MB |-| Move | 49k | 79k (14) | 0.39 | 0.83 | 1.02 | 0.01 | 1.39 | **4.17** | 0.00 | 2.1 | 1.7 | 0.9 MB |-| Recipe (pattern) | 65k | 102k (18) | 4.06 | 2.12 | 1.13 | 0.01 | 1.84 | **9.39** | 0.00 | 4.0 | 4.3 | 2.1 MB |-| Mask | 66k | 101k (18) | 2.54 | 0.00 | 0.00 | 0.01 | 2.89 | **5.63** | 0.00 | 0.3 | 0.2 | 1.0 MB |-| Paint | 66k | 101k (18) | 2.19 | 0.00 | 0.00 | 0.01 | 4.64 | **7.03** | 0.00 | 0.4 | 0.3 | 2.1 MB |+| Brush | verts/dab | kernel | normals | BVH refit | pick | GPU upload | **dab total** | stroke end (undo record) | undo | redo | undo step |+|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|+| Standard | 78k | 3.14 | 4.18 | 2.09 | 0.01 | 380.44 | **389.88** | 0.00 | 16.2 | 16.1 | 2.8 MB |+| Standard (large, r 0.4) | 1.2M | 48.26 | 73.61 | 43.62 | 0.01 | 382.34 | **547.84** | 0.00 | 220.1 | 219.8 | 35.5 MB |+| Clay | 68k | 2.82 | 3.50 | 1.76 | 0.01 | 380.26 | **388.35** | 0.00 | 13.0 | 13.3 | 2.4 MB |+| ClayBuildup | 107k | 4.81 | 5.55 | 2.92 | 0.01 | 380.61 | **393.90** | 0.00 | 17.8 | 17.8 | 3.1 MB |+| Smooth | 63k | 3.40 | 3.27 | 1.52 | 0.01 | 379.44 | **387.64** | 0.00 | 11.5 | 11.9 | 2.1 MB |+| Inflate | 61k | 2.52 | 3.18 | 1.57 | 0.01 | 380.18 | **387.47** | 0.00 | 12.3 | 11.3 | 2.1 MB |+| DamStandard | 61k | 2.63 | 3.19 | 1.52 | 0.01 | 381.24 | **388.60** | 0.00 | 11.3 | 11.1 | 2.0 MB |+| Layer | 63k | 4.98 | 3.28 | 1.49 | 0.01 | 379.55 | **389.33** | 0.00 | 12.3 | 11.6 | 2.1 MB |+| Move | 49k | 0.39 | 1.73 | 1.43 | 0.01 | 341.09 | **345.07** | 0.00 | 4.5 | 4.5 | 0.9 MB |+| Recipe (pattern) | 65k | 6.55 | 3.40 | 1.54 | 0.01 | 380.30 | **391.80** | 0.00 | 11.3 | 11.4 | 2.1 MB |+| Mask | 66k | 2.52 | 0.00 | 0.00 | 0.01 | 382.21 | **384.75** | 0.00 | 0.3 | 0.3 | 1.0 MB |+| Paint | 66k | 2.37 | 0.00 | 0.00 | 0.01 | 389.76 | **392.16** | 0.00 | 0.5 | 0.5 | 2.1 MB || Operation | ms ||---|---:|-| Lower Res (to 8.3M, after edits) | 1588 |+| Lower Res (to 8.3M, after edits) | 2846 || Higher Res (back up) | 10 |-| Lower Res again (no edits) | 40 |+| Lower Res again (no edits) | 43 || Higher Res again (no edits) | 10 |-| Orbit: frame time, 4x antialiasing | 20.6 (49 fps) |-| Orbit: frame time, Fast Navigation (no antialiasing) | 14.8 (68 fps) |+| Orbit: frame time | 30.4 (33 fps) |-### After: feat/view (33M with the makeCube fix from feat/mem)+### After (feat/perf)-Threads: 10, GPU: Apple M1 Pro (G13S C0), OpenGL 4.6 (Core Profile) Mesa 26.1.8. Brushes use X symmetry (two dabs per step), radius 0.12 on a unit sphere unless noted, 10 dabs per stroke. Times in milliseconds.+#### CPU only++Threads: 10. Brushes use X symmetry (two dabs per step), radius 0.12 on a unit sphere unless noted, 40 dabs per stroke. Times in milliseconds.##### 4.0M triangles (2.0M vertices, 5 subdivision levels)| Setup | ||---|---|-| Divide up to this size | 268 |-| BVH build | 227 |-| First GPU upload | 52 |-| GPU memory (buffers) | 59 MB = 14.8 B/triangle |+| Divide up to this size | 277 |+| BVH build | 215 || Mesh (incl. topology) | 247 MB = 62 B/triangle || BVH | 78 MB = 19.5 B/triangle || Subdivision levels (stack) | 297 MB = 74 B/triangle |-| Process memory (RSS) | 721 MB (+650 MB) |+| Process memory (RSS) | 643 MB (+633 MB) |-| Brush | verts/dab | uploaded verts (ranges) | kernel | normals | BVH refit | pick | GPU upload | **dab total** | stroke end (undo record) | undo | redo | undo step |-|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|-| Standard | 9k | 21k (14) | 0.40 | 0.43 | 0.30 | 0.00 | 0.58 | **1.79** | 0.00 | 1.1 | 1.1 | 0.3 MB |-| Standard (large, r 0.4) | 147k | 191k (39) | 3.58 | 3.34 | 2.04 | 0.01 | 2.89 | **12.78** | 0.00 | 9.3 | 8.1 | 4.2 MB |-| Clay | 8k | 18k (10) | 0.38 | 0.36 | 0.25 | 0.00 | 0.52 | **1.58** | 0.00 | 1.1 | 1.2 | 0.3 MB |-| ClayBuildup | 13k | 25k (15) | 0.68 | 0.55 | 0.42 | 0.00 | 0.57 | **2.33** | 0.00 | 1.8 | 1.4 | 0.4 MB |-| Smooth | 7k | 17k (10) | 0.36 | 0.30 | 0.19 | 0.00 | 0.47 | **1.38** | 0.00 | 0.9 | 1.6 | 0.2 MB |-| Inflate | 7k | 16k (10) | 0.34 | 0.34 | 0.21 | 0.00 | 0.48 | **1.44** | 0.00 | 0.9 | 0.7 | 0.2 MB |-| DamStandard | 7k | 16k (10) | 0.40 | 0.35 | 0.21 | 0.00 | 0.48 | **1.50** | 0.00 | 1.4 | 1.1 | 0.2 MB |-| Layer | 7k | 17k (10) | 0.69 | 0.34 | 0.20 | 0.00 | 0.55 | **1.85** | 0.00 | 1.0 | 1.2 | 0.2 MB |-| Move | 6k | 12k (10) | 0.05 | 0.17 | 0.18 | 0.00 | 0.40 | **0.87** | 0.00 | 0.5 | 0.6 | 0.1 MB |-| Recipe (pattern) | 8k | 17k (10) | 0.95 | 0.41 | 0.25 | 0.00 | 0.50 | **2.18** | 0.00 | 1.3 | 1.2 | 0.2 MB |-| Mask | 8k | 17k (10) | 0.37 | 0.00 | 0.00 | 0.01 | 0.42 | **0.87** | 0.00 | 0.0 | 0.0 | 0.1 MB |-| Paint | 8k | 17k (10) | 0.49 | 0.00 | 0.00 | 0.01 | 0.70 | **1.29** | 0.00 | 0.1 | 0.3 | 0.2 MB |+| Brush | verts/dab | uploaded verts (ranges) | kernel | normals | BVH refit | pick | **dab total** | stroke end (undo record) | undo | redo | undo step |+|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|+| Standard | 12k | 24k (15) | 0.49 | 0.48 | 0.40 | 0.00 | **1.41** | 0.00 | 3.4 | 3.5 | 1.4 MB |+| Standard (large, r 0.4) | 118k | 148k (45) | 3.19 | 3.35 | 1.85 | 0.00 | **8.60** | 0.00 | 10.6 | 10.3 | 4.6 MB |+| Clay | 7k | 16k (11) | 0.31 | 0.27 | 0.20 | 0.00 | **0.81** | 0.00 | 2.7 | 2.4 | 0.9 MB |+| ClayBuildup | 8k | 18k (12) | 0.40 | 0.31 | 0.25 | 0.00 | **0.99** | 0.00 | 2.4 | 2.4 | 0.8 MB |+| Smooth | 5k | 12k (9) | 0.24 | 0.17 | 0.12 | 0.00 | **0.56** | 0.00 | 1.9 | 2.0 | 0.6 MB |+| Inflate | 5k | 12k (9) | 0.19 | 0.17 | 0.12 | 0.00 | **0.51** | 0.00 | 2.0 | 2.3 | 0.6 MB |+| DamStandard | 4k | 12k (9) | 0.20 | 0.17 | 0.11 | 0.00 | **0.50** | 0.00 | 2.0 | 1.9 | 0.5 MB |+| Layer | 5k | 12k (9) | 0.29 | 0.18 | 0.12 | 0.00 | **0.61** | 0.00 | 1.8 | 1.7 | 0.6 MB |+| Move | 4k | 10k (8) | 0.02 | 0.10 | 0.09 | 0.00 | **0.24** | 0.00 | 0.3 | 0.2 | 0.1 MB |+| Recipe (pattern) | 5k | 13k (9) | 0.47 | 0.17 | 0.12 | 0.00 | **0.78** | 0.00 | 1.9 | 1.6 | 0.6 MB |+| Mask | 5k | 12k (9) | 0.21 | 0.00 | 0.00 | 0.00 | **0.23** | 0.00 | 0.1 | 0.1 | 0.3 MB |+| Paint | 5k | 12k (9) | 0.17 | 0.00 | 0.00 | 0.00 | **0.19** | 0.00 | 0.1 | 0.1 | 0.6 MB || Operation | ms ||---|---:|@@ -1474,219 +1656,236 @@ Threads: 10, GPU: Apple M1 Pro (G13S C0), OpenGL 4.6 (Core Profile) Mesa 26.1.8.| Higher Res (back up) | 1 || Lower Res again (no edits) | 5 || Higher Res again (no edits) | 1 |-| Motion proxy build (first move after an upload) | 16 |-| Orbit: frame time, 4x antialiasing | 2.9 (347 fps) |-| Orbit: frame time, no antialiasing | 1.7 (605 fps) |-| Orbit: triangles drawn | 2.1M (53%) |-| Orbit: frame time, Fast Navigation (no antialiasing, motion proxy) | 1.1 (932 fps) |-| Orbit: triangles drawn (motion proxy) | 771k (19%) |-| GPU memory with the motion proxy | 76 MB = 19.1 B/triangle |+| Save project (228 MB) | 81 |+| Open project | 550 |##### 15.9M triangles (8.0M vertices, 6 subdivision levels)| Setup | ||---|---|-| Divide up to this size | 1145 |-| BVH build | 787 |-| First GPU upload | 200 |-| GPU memory (buffers) | 235 MB = 14.8 B/triangle |+| Divide up to this size | 1140 |+| BVH build | 829 || Mesh (incl. topology) | 988 MB = 62 B/triangle || BVH | 311 MB = 19.5 B/triangle || Subdivision levels (stack) | 1188 MB = 75 B/triangle |-| Process memory (RSS) | 2786 MB (+2286 MB) |+| Process memory (RSS) | 2589 MB (+2173 MB) |-| Brush | verts/dab | uploaded verts (ranges) | kernel | normals | BVH refit | pick | GPU upload | **dab total** | stroke end (undo record) | undo | redo | undo step |-|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|-| Standard | 37k | 61k (25) | 1.47 | 1.23 | 0.87 | 0.00 | 1.19 | **5.10** | 0.00 | 2.9 | 2.5 | 1.3 MB |-| Standard (large, r 0.4) | 589k | 699k (74) | 10.90 | 11.26 | 7.20 | 0.01 | 10.53 | **43.38** | 0.00 | 31.2 | 30.8 | 17.0 MB |-| Clay | 32k | 54k (21) | 1.22 | 1.28 | 0.73 | 0.00 | 1.03 | **4.54** | 0.00 | 2.1 | 2.5 | 1.1 MB |-| ClayBuildup | 51k | 78k (25) | 2.37 | 1.92 | 1.04 | 0.01 | 1.39 | **7.14** | 0.00 | 3.2 | 4.0 | 1.5 MB |-| Smooth | 30k | 51k (19) | 1.36 | 1.29 | 0.75 | 0.00 | 0.97 | **4.63** | 0.00 | 2.2 | 2.1 | 1.0 MB |-| Inflate | 29k | 50k (19) | 1.21 | 1.21 | 0.63 | 0.01 | 0.96 | **4.26** | 0.00 | 2.5 | 2.3 | 1.0 MB |-| DamStandard | 29k | 50k (19) | 1.15 | 1.18 | 0.59 | 0.01 | 1.06 | **4.23** | 0.00 | 2.3 | 1.9 | 1.0 MB |-| Layer | 30k | 51k (20) | 2.01 | 1.10 | 0.52 | 0.01 | 0.86 | **4.74** | 0.00 | 2.3 | 2.3 | 1.0 MB |-| Move | 23k | 40k (11) | 0.21 | 0.38 | 0.45 | 0.01 | 0.72 | **2.13** | 0.00 | 0.9 | 1.0 | 0.4 MB |-| Recipe (pattern) | 31k | 53k (19) | 1.76 | 1.25 | 0.55 | 0.01 | 1.14 | **4.98** | 0.00 | 2.9 | 2.4 | 1.0 MB |-| Mask | 31k | 52k (19) | 1.26 | 0.00 | 0.00 | 0.01 | 1.08 | **2.60** | 0.00 | 0.1 | 0.1 | 0.5 MB |-| Paint | 31k | 52k (19) | 1.12 | 0.00 | 0.00 | 0.01 | 1.80 | **3.17** | 0.00 | 0.2 | 0.2 | 1.0 MB |+| Brush | verts/dab | uploaded verts (ranges) | kernel | normals | BVH refit | pick | **dab total** | stroke end (undo record) | undo | redo | undo step |+|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|+| Standard | 50k | 76k (15) | 1.99 | 1.95 | 1.15 | 0.00 | **5.25** | 0.00 | 11.6 | 11.9 | 5.4 MB |+| Standard (large, r 0.4) | 472k | 525k (45) | 9.76 | 10.47 | 6.11 | 0.01 | **27.04** | 0.00 | 37.6 | 37.0 | 18.5 MB |+| Clay | 28k | 47k (11) | 1.19 | 1.15 | 0.69 | 0.01 | **3.14** | 0.00 | 7.7 | 7.6 | 3.5 MB |+| ClayBuildup | 33k | 55k (12) | 1.44 | 1.37 | 0.85 | 0.01 | **3.78** | 0.00 | 8.1 | 12.2 | 3.8 MB |+| Smooth | 19k | 37k (9) | 0.99 | 0.75 | 0.54 | 0.01 | **2.36** | 0.00 | 6.2 | 6.3 | 2.7 MB |+| Inflate | 18k | 36k (9) | 0.76 | 0.75 | 0.55 | 0.01 | **2.14** | 0.00 | 5.9 | 6.0 | 2.6 MB |+| DamStandard | 18k | 35k (9) | 0.80 | 0.73 | 0.52 | 0.01 | **2.12** | 0.00 | 5.5 | 5.9 | 2.5 MB |+| Layer | 19k | 36k (9) | 1.06 | 0.77 | 0.51 | 0.01 | **2.42** | 0.00 | 6.0 | 6.0 | 2.6 MB |+| Move | 16k | 29k (8) | 0.14 | 0.48 | 0.55 | 0.01 | **1.26** | 0.00 | 0.8 | 1.3 | 0.3 MB |+| Recipe (pattern) | 19k | 37k (9) | 1.71 | 0.77 | 0.51 | 0.01 | **3.06** | 0.00 | 5.8 | 5.7 | 2.6 MB |+| Mask | 19k | 36k (9) | 0.66 | 0.00 | 0.00 | 0.01 | **0.73** | 0.00 | 0.4 | 0.3 | 1.3 MB |+| Paint | 19k | 36k (9) | 0.65 | 0.00 | 0.00 | 0.01 | **0.72** | 0.00 | 0.5 | 0.4 | 2.6 MB |-| Operation | ms |-|---|---:|-| Lower Res (to 4.0M, after edits) | 748 |-| Higher Res (back up) | 5 |-| Lower Res again (no edits) | 25 |-| Higher Res again (no edits) | 7 |-| Motion proxy build (first move after an upload) | 68 |-| Orbit: frame time, 4x antialiasing | 4.9 (202 fps) |-| Orbit: frame time, no antialiasing | 3.2 (317 fps) |-| Orbit: triangles drawn | 7.8M (49%) |-| Orbit: frame time, Fast Navigation (no antialiasing, motion proxy) | 1.9 (525 fps) |-| Orbit: triangles drawn (motion proxy) | 3.1M (19%) |-| GPU memory with the motion proxy | 304 MB = 19.1 B/triangle |+| Operation | ms |+|---|---:|+| Lower Res (to 4.0M, after edits) | 718 |+| Higher Res (back up) | 5 |+| Lower Res again (no edits) | 20 |+| Higher Res again (no edits) | 5 |+| Save project (913 MB) | 321 |+| Open project | 2278 |##### 33.2M triangles (16.6M vertices, 7 subdivision levels)| Setup | ||---|---|-| Divide up to this size | 3030 |-| BVH build | 1693 |-| First GPU upload | 461 |-| GPU memory (buffers) | 490 MB = 14.8 B/triangle |+| Divide up to this size | 2526 |+| BVH build | 1747 || Mesh (incl. topology) | 2062 MB = 62 B/triangle || BVH | 648 MB = 19.5 B/triangle || Subdivision levels (stack) | 2481 MB = 75 B/triangle |-| Process memory (RSS) | 5757 MB (+4345 MB) |+| Process memory (RSS) | 5366 MB (+4797 MB) |-| Brush | verts/dab | uploaded verts (ranges) | kernel | normals | BVH refit | pick | GPU upload | **dab total** | stroke end (undo record) | undo | redo | undo step |-|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|-| Standard | 78k | 114k (35) | 2.95 | 2.73 | 1.55 | 0.00 | 2.35 | **10.25** | 0.00 | 6.4 | 5.0 | 2.8 MB |-| Standard (large, r 0.4) | 1.2M | 1.4M (104) | 22.30 | 24.75 | 15.38 | 0.01 | 22.64 | **92.39** | 0.00 | 67.3 | 68.8 | 35.5 MB |-| Clay | 68k | 101k (30) | 2.67 | 2.49 | 1.42 | 0.01 | 2.07 | **9.26** | 0.00 | 5.4 | 4.9 | 2.4 MB |-| ClayBuildup | 107k | 150k (35) | 4.00 | 3.00 | 1.58 | 0.01 | 2.77 | **12.20** | 0.00 | 6.2 | 6.9 | 3.1 MB |-| Smooth | 63k | 95k (28) | 2.88 | 2.22 | 1.10 | 0.01 | 2.17 | **8.93** | 0.00 | 5.2 | 5.3 | 2.1 MB |-| Inflate | 61k | 92k (28) | 2.52 | 2.68 | 1.34 | 0.01 | 1.88 | **8.98** | 0.00 | 4.8 | 4.8 | 2.1 MB |-| DamStandard | 61k | 93k (27) | 2.35 | 2.42 | 1.22 | 0.01 | 1.90 | **8.46** | 0.00 | 4.4 | 4.3 | 2.0 MB |-| Layer | 63k | 96k (27) | 4.21 | 1.98 | 0.97 | 0.01 | 1.72 | **9.48** | 0.00 | 4.6 | 5.0 | 2.1 MB |-| Move | 49k | 77k (15) | 0.39 | 1.13 | 1.32 | 0.01 | 1.51 | **5.16** | 0.00 | 2.1 | 2.1 | 0.9 MB |-| Recipe (pattern) | 65k | 99k (28) | 4.60 | 2.42 | 1.15 | 0.01 | 2.19 | **10.95** | 0.00 | 5.0 | 5.8 | 2.1 MB |-| Mask | 66k | 97k (28) | 2.43 | 0.00 | 0.00 | 0.01 | 1.89 | **4.87** | 0.00 | 0.3 | 0.3 | 1.0 MB |-| Paint | 66k | 97k (28) | 2.33 | 0.00 | 0.00 | 0.01 | 3.69 | **6.58** | 0.00 | 0.5 | 0.5 | 2.1 MB |+| Brush | verts/dab | uploaded verts (ranges) | kernel | normals | BVH refit | pick | **dab total** | stroke end (undo record) | undo | redo | undo step |+|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|+| Standard | 103k | 149k (21) | 3.84 | 3.01 | 1.79 | 0.00 | **8.97** | 0.00 | 23.7 | 22.2 | 11.4 MB |+| Standard (large, r 0.4) | 987k | 1.1M (57) | 19.07 | 20.32 | 12.46 | 0.01 | **53.27** | 0.00 | 76.6 | 76.7 | 38.7 MB |+| Clay | 58k | 91k (16) | 2.26 | 2.16 | 1.08 | 0.01 | **5.72** | 0.00 | 15.3 | 15.1 | 7.2 MB |+| ClayBuildup | 66k | 102k (17) | 2.68 | 2.38 | 1.31 | 0.01 | **6.63** | 0.00 | 16.5 | 16.2 | 8.0 MB |+| Smooth | 39k | 67k (14) | 1.78 | 1.54 | 0.82 | 0.02 | **4.32** | 0.00 | 11.9 | 11.7 | 5.7 MB |+| Inflate | 38k | 66k (14) | 1.65 | 1.69 | 0.90 | 0.02 | **4.41** | 0.00 | 12.0 | 12.8 | 5.6 MB |+| DamStandard | 37k | 65k (15) | 1.65 | 1.74 | 0.84 | 0.02 | **4.41** | 0.00 | 11.8 | 11.5 | 5.4 MB |+| Layer | 37k | 65k (14) | 2.12 | 1.74 | 0.88 | 0.02 | **4.92** | 0.00 | 12.8 | 11.8 | 5.6 MB |+| Move | 33k | 59k (10) | 0.27 | 0.77 | 0.77 | 0.02 | **1.99** | 0.00 | 1.8 | 1.8 | 0.5 MB |+| Recipe (pattern) | 38k | 68k (15) | 2.61 | 1.63 | 0.81 | 0.02 | **5.22** | 0.00 | 12.1 | 11.6 | 5.4 MB |+| Mask | 39k | 67k (15) | 1.24 | 0.00 | 0.00 | 0.02 | **1.37** | 0.00 | 1.0 | 0.7 | 2.7 MB |+| Paint | 39k | 67k (15) | 1.25 | 0.00 | 0.00 | 0.02 | **1.38** | 0.00 | 1.3 | 1.1 | 5.5 MB || Operation | ms ||---|---:|-| Lower Res (to 8.3M, after edits) | 1557 |+| Lower Res (to 8.3M, after edits) | 1539 || Higher Res (back up) | 10 || Lower Res again (no edits) | 41 || Higher Res again (no edits) | 10 |-| Motion proxy build (first move after an upload) | 142 |-| Orbit: frame time, 4x antialiasing | 8.7 (115 fps) |-| Orbit: frame time, no antialiasing | 6.1 (163 fps) |-| Orbit: triangles drawn | 15.9M (48%) |-| Orbit: frame time, Fast Navigation (no antialiasing, motion proxy) | 3.2 (314 fps) |-| Orbit: triangles drawn (motion proxy) | 6.4M (19%) |-| GPU memory with the motion proxy | 633 MB = 19.1 B/triangle |+| Save project (1905 MB) | 677 |+| Open project | 5679 |-### After: feat/view, 33M without the makeCube fix (the sphere has cracks, so it counts as open)+#### With the GPU, 4MThreads: 10, GPU: Apple M1 Pro (G13S C0), OpenGL 4.6 (Core Profile) Mesa 26.1.8. Brushes use X symmetry (two dabs per step), radius 0.12 on a unit sphere unless noted, 10 dabs per stroke. Times in milliseconds.-##### 33.2M triangles (16.6M vertices, 7 subdivision levels)+##### 4.0M triangles (2.0M vertices, 5 subdivision levels)| Setup | ||---|---|-| Divide up to this size | 2463 |-| BVH build | 1653 |-| First GPU upload | 571 |-| GPU memory (buffers) | 490 MB = 14.8 B/triangle |-| Mesh (incl. topology) | 2062 MB = 62 B/triangle |-| BVH | 648 MB = 19.5 B/triangle |-| Subdivision levels (stack) | 2481 MB = 75 B/triangle |-| Process memory (RSS) | 5497 MB (+5427 MB) |+| Divide up to this size | 301 |+| BVH build | 238 |+| First GPU upload | 90 |+| Mesh (incl. topology) | 247 MB = 62 B/triangle |+| BVH | 78 MB = 19.5 B/triangle |+| Subdivision levels (stack) | 297 MB = 74 B/triangle |+| Process memory (RSS) | 720 MB (+650 MB) || Brush | verts/dab | uploaded verts (ranges) | kernel | normals | BVH refit | pick | GPU upload | **dab total** | stroke end (undo record) | undo | redo | undo step ||---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|-| Standard | 78k | 114k (35) | 3.14 | 2.73 | 1.44 | 0.00 | 2.25 | **10.23** | 0.00 | 5.5 | 5.5 | 2.8 MB |-| Standard (large, r 0.4) | 1.2M | 1.4M (104) | 22.73 | 22.99 | 14.65 | 0.01 | 21.52 | **89.23** | 0.00 | 64.1 | 63.2 | 35.5 MB |-| Clay | 68k | 101k (30) | 3.13 | 2.15 | 1.24 | 0.01 | 1.95 | **9.06** | 0.00 | 4.9 | 5.0 | 2.4 MB |-| ClayBuildup | 107k | 150k (35) | 4.85 | 2.71 | 1.74 | 0.01 | 2.74 | **13.00** | 0.00 | 7.2 | 7.1 | 3.1 MB |-| Smooth | 63k | 95k (28) | 2.82 | 1.77 | 1.03 | 0.01 | 1.80 | **7.96** | 0.00 | 4.7 | 4.7 | 2.1 MB |-| Inflate | 61k | 92k (28) | 2.89 | 1.96 | 1.22 | 0.01 | 1.83 | **8.43** | 0.00 | 4.2 | 4.8 | 2.1 MB |-| DamStandard | 61k | 93k (27) | 2.80 | 1.97 | 1.17 | 0.01 | 1.82 | **8.32** | 0.00 | 4.1 | 4.1 | 2.0 MB |-| Layer | 63k | 96k (27) | 4.58 | 2.05 | 1.07 | 0.01 | 1.83 | **10.10** | 0.01 | 4.5 | 4.1 | 2.1 MB |-| Move | 49k | 77k (15) | 0.41 | 0.79 | 1.01 | 0.01 | 1.40 | **4.43** | 0.00 | 2.4 | 2.1 | 0.9 MB |-| Recipe (pattern) | 65k | 99k (28) | 3.28 | 1.91 | 1.01 | 0.01 | 2.04 | **8.85** | 0.00 | 4.3 | 4.4 | 2.1 MB |-| Mask | 66k | 97k (28) | 2.58 | 0.00 | 0.00 | 0.01 | 2.04 | **5.21** | 0.01 | 0.4 | 0.3 | 1.0 MB |-| Paint | 66k | 97k (28) | 2.84 | 0.00 | 0.00 | 0.01 | 3.67 | **7.11** | 0.01 | 0.8 | 1.0 | 2.1 MB |+| Standard | 9k | 20k (12) | 0.36 | 0.36 | 0.30 | 0.00 | 0.28 | **1.33** | 0.00 | 1.2 | 1.4 | 0.3 MB |+| Standard (large, r 0.4) | 147k | 183k (53) | 3.77 | 3.99 | 2.15 | 0.00 | 2.99 | **13.17** | 0.00 | 9.3 | 9.4 | 4.2 MB |+| Clay | 8k | 17k (11) | 0.33 | 0.31 | 0.24 | 0.00 | 0.24 | **1.15** | 0.00 | 1.6 | 1.5 | 0.3 MB |+| ClayBuildup | 13k | 24k (13) | 0.56 | 0.48 | 0.40 | 0.00 | 0.34 | **1.82** | 0.00 | 1.7 | 1.8 | 0.4 MB |+| Smooth | 7k | 16k (10) | 0.35 | 0.28 | 0.19 | 0.00 | 0.23 | **1.06** | 0.00 | 1.0 | 0.9 | 0.2 MB |+| Inflate | 7k | 16k (10) | 0.28 | 0.26 | 0.20 | 0.00 | 0.22 | **0.98** | 0.00 | 0.8 | 1.1 | 0.2 MB |+| DamStandard | 7k | 16k (10) | 0.30 | 0.26 | 0.19 | 0.00 | 0.21 | **0.98** | 0.00 | 0.8 | 1.2 | 0.2 MB |+| Layer | 7k | 16k (10) | 0.60 | 0.27 | 0.18 | 0.00 | 0.22 | **1.31** | 0.00 | 0.7 | 0.7 | 0.2 MB |+| Move | 6k | 14k (9) | 0.03 | 0.15 | 0.17 | 0.00 | 0.18 | **0.59** | 0.00 | 0.4 | 0.4 | 0.1 MB |+| Recipe (pattern) | 8k | 17k (11) | 0.83 | 0.28 | 0.20 | 0.00 | 0.23 | **1.57** | 0.00 | 1.5 | 1.0 | 0.2 MB |+| Mask | 8k | 16k (10) | 0.30 | 0.00 | 0.00 | 0.00 | 0.39 | **0.72** | 0.00 | 0.0 | 0.0 | 0.1 MB |+| Paint | 8k | 16k (10) | 0.25 | 0.00 | 0.00 | 0.00 | 0.60 | **0.88** | 0.00 | 0.0 | 0.0 | 0.2 MB || Operation | ms ||---|---:|-| Lower Res (to 8.3M, after edits) | 1541 |-| Higher Res (back up) | 10 |-| Lower Res again (no edits) | 40 |-| Higher Res again (no edits) | 10 |-| Motion proxy build (first move after an upload) | 127 |-| Orbit: frame time, 4x antialiasing | 15.3 (66 fps) |-| Orbit: frame time, no antialiasing | 12.2 (82 fps) |-| Orbit: triangles drawn | 33.2M (100%) |-| Orbit: frame time, Fast Navigation (no antialiasing, motion proxy) | 4.6 (218 fps) |-| Orbit: triangles drawn (motion proxy) | 6.5M (19%) |-| GPU memory with the motion proxy | 633 MB = 19.1 B/triangle |+| Lower Res (to 995k, after edits) | 170 |+| Higher Res (back up) | 1 |+| Lower Res again (no edits) | 5 |+| Higher Res again (no edits) | 1 |+| Save project (228 MB) | 81 |+| Open project | 572 |+| Orbit: frame time, 4x antialiasing | 5.0 (201 fps) |+| Orbit: frame time, Fast Navigation (no antialiasing) | 3.1 (325 fps) |-### After: feat/view, 64M+#### With the GPU, 16MThreads: 10, GPU: Apple M1 Pro (G13S C0), OpenGL 4.6 (Core Profile) Mesa 26.1.8. Brushes use X symmetry (two dabs per step), radius 0.12 on a unit sphere unless noted, 10 dabs per stroke. Times in milliseconds.-##### 63.7M triangles (31.9M vertices, 7 subdivision levels)+##### 15.9M triangles (8.0M vertices, 6 subdivision levels)| Setup | ||---|---|-| Divide up to this size | 4596 |-| BVH build | 3209 |-| First GPU upload | 784 |-| GPU memory (buffers) | 940 MB = 14.8 B/triangle |-| Mesh (incl. topology) | 3953 MB = 62 B/triangle |-| BVH | 1244 MB = 19.5 B/triangle |-| Subdivision levels (stack) | 4756 MB = 75 B/triangle |-| Process memory (RSS) | 10407 MB (+10337 MB) |+| Divide up to this size | 1206 |+| BVH build | 846 |+| First GPU upload | 344 |+| Mesh (incl. topology) | 988 MB = 62 B/triangle |+| BVH | 311 MB = 19.5 B/triangle |+| Subdivision levels (stack) | 1188 MB = 75 B/triangle |+| Process memory (RSS) | 2670 MB (+2600 MB) || Brush | verts/dab | uploaded verts (ranges) | kernel | normals | BVH refit | pick | GPU upload | **dab total** | stroke end (undo record) | undo | redo | undo step ||---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|-| Standard | 149k | 204k (46) | 5.29 | 3.40 | 2.23 | 0.00 | 3.79 | **16.17** | 0.00 | 10.5 | 10.2 | 5.3 MB |-| Standard (large, r 0.4) | 2.4M | 2.7M (141) | 42.11 | 43.62 | 28.13 | 0.01 | 40.24 | **167.87** | 0.00 | 125.7 | 123.4 | 67.9 MB |-| Clay | 129k | 180k (40) | 4.91 | 3.28 | 1.88 | 0.01 | 3.40 | **14.67** | 0.00 | 9.4 | 10.1 | 4.5 MB |-| ClayBuildup | 204k | 271k (46) | 7.79 | 4.76 | 2.66 | 0.01 | 4.79 | **21.48** | 0.00 | 11.7 | 12.6 | 6.0 MB |-| Smooth | 120k | 167k (37) | 4.84 | 3.12 | 1.42 | 0.01 | 3.01 | **13.37** | 0.01 | 10.0 | 10.1 | 4.0 MB |-| Inflate | 117k | 164k (37) | 4.65 | 3.14 | 1.93 | 0.01 | 3.13 | **13.81** | 0.01 | 8.1 | 8.1 | 3.9 MB |-| DamStandard | 116k | 165k (37) | 4.61 | 3.07 | 1.62 | 0.01 | 3.27 | **13.70** | 0.00 | 7.5 | 7.7 | 3.9 MB |-| Layer | 120k | 169k (39) | 8.03 | 3.36 | 1.44 | 0.01 | 3.09 | **16.93** | 0.01 | 10.5 | 11.0 | 4.0 MB |-| Move | 93k | 130k (29) | 0.74 | 1.46 | 1.60 | 0.01 | 2.43 | **7.76** | 0.00 | 3.7 | 3.8 | 1.6 MB |-| Recipe (pattern) | 125k | 175k (40) | 7.13 | 3.07 | 1.37 | 0.02 | 3.43 | **16.15** | 0.01 | 10.4 | 10.4 | 4.0 MB |-| Mask | 126k | 174k (39) | 4.59 | 0.00 | 0.00 | 0.02 | 3.66 | **9.19** | 0.00 | 0.6 | 0.6 | 2.0 MB |-| Paint | 126k | 174k (39) | 4.64 | 0.00 | 0.00 | 0.01 | 7.28 | **12.88** | 0.00 | 0.9 | 0.9 | 4.0 MB |+| Standard | 37k | 60k (12) | 1.75 | 1.89 | 1.10 | 0.00 | 1.04 | **5.93** | 0.00 | 3.2 | 4.2 | 1.3 MB |+| Standard (large, r 0.4) | 589k | 650k (53) | 11.94 | 13.01 | 7.83 | 0.01 | 9.43 | **43.06** | 0.00 | 34.7 | 36.6 | 17.0 MB |+| Clay | 32k | 53k (11) | 1.48 | 1.48 | 0.82 | 0.00 | 0.87 | **4.77** | 0.00 | 2.7 | 3.3 | 1.1 MB |+| ClayBuildup | 51k | 77k (13) | 2.11 | 1.87 | 1.15 | 0.00 | 1.27 | **6.57** | 0.00 | 4.1 | 4.4 | 1.5 MB |+| Smooth | 30k | 51k (10) | 1.37 | 1.48 | 0.79 | 0.00 | 0.86 | **4.62** | 0.00 | 2.5 | 2.8 | 1.0 MB |+| Inflate | 29k | 50k (10) | 1.21 | 1.36 | 0.70 | 0.00 | 0.84 | **4.24** | 0.00 | 2.3 | 2.4 | 1.0 MB |+| DamStandard | 29k | 49k (10) | 1.18 | 1.39 | 0.76 | 0.00 | 0.81 | **4.29** | 0.00 | 2.4 | 2.6 | 1.0 MB |+| Layer | 30k | 51k (10) | 2.25 | 1.54 | 0.64 | 0.00 | 0.83 | **5.37** | 0.00 | 2.5 | 2.3 | 1.0 MB |+| Move | 23k | 42k (9) | 0.20 | 0.53 | 0.65 | 0.00 | 0.90 | **2.55** | 0.00 | 2.0 | 1.1 | 0.4 MB |+| Recipe (pattern) | 31k | 52k (11) | 2.03 | 1.41 | 0.76 | 0.00 | 0.87 | **5.20** | 0.00 | 2.4 | 2.7 | 1.0 MB |+| Mask | 31k | 52k (11) | 1.41 | 0.00 | 0.00 | 0.01 | 1.83 | **3.37** | 0.00 | 0.1 | 0.1 | 0.5 MB |+| Paint | 31k | 52k (11) | 1.01 | 0.00 | 0.00 | 0.00 | 2.25 | **3.36** | 0.00 | 0.2 | 0.1 | 1.0 MB || Operation | ms ||---|---:|-| Lower Res (to 15.9M, after edits) | 2842 |-| Higher Res (back up) | 19 |-| Lower Res again (no edits) | 77 |-| Higher Res again (no edits) | 19 |-| Motion proxy build (first move after an upload) | 241 |-| Orbit: frame time, 4x antialiasing | 14.0 (71 fps) |-| Orbit: frame time, no antialiasing | 11.3 (88 fps) |-| Orbit: triangles drawn | 29.9M (47%) |-| Orbit: frame time, Fast Navigation (no antialiasing, motion proxy) | 6.5 (154 fps) |-| Orbit: triangles drawn (motion proxy) | 12.4M (19%) |-| GPU memory with the motion proxy | 1214 MB = 19.1 B/triangle |+| Lower Res (to 4.0M, after edits) | 717 |+| Higher Res (back up) | 5 |+| Lower Res again (no edits) | 20 |+| Higher Res again (no edits) | 5 |+| Save project (913 MB) | 357 |+| Open project | 2279 |+| Orbit: frame time, 4x antialiasing | 11.8 (85 fps) |+| Orbit: frame time, Fast Navigation (no antialiasing) | 8.0 (125 fps) |-### After: feat/view, 104M (--bench-view)+#### With the GPU, 33M (no project round trip)Threads: 10, GPU: Apple M1 Pro (G13S C0), OpenGL 4.6 (Core Profile) Mesa 26.1.8. Brushes use X symmetry (two dabs per step), radius 0.12 on a unit sphere unless noted, 10 dabs per stroke. Times in milliseconds.-##### 104.0M triangles (52.0M vertices, 8 subdivision levels)+##### 33.2M triangles (16.6M vertices, 7 subdivision levels)| Setup | ||---|---|-| Divide up to this size | 7638 |-| BVH build | 5301 |-| First GPU upload | 1283 |-| GPU memory (buffers) | 1535 MB = 14.8 B/triangle |-| Mesh (incl. topology) | 6455 MB = 62 B/triangle |-| BVH | 2043 MB = 19.6 B/triangle |-| Subdivision levels (stack) | 7765 MB = 75 B/triangle |-| Process memory (RSS) | 16656 MB (+16586 MB) |+| Divide up to this size | 2570 |+| BVH build | 1748 |+| First GPU upload | 705 |+| Mesh (incl. topology) | 2062 MB = 62 B/triangle |+| BVH | 648 MB = 19.5 B/triangle |+| Subdivision levels (stack) | 2481 MB = 75 B/triangle |+| Process memory (RSS) | 5486 MB (+5415 MB) || Brush | verts/dab | uploaded verts (ranges) | kernel | normals | BVH refit | pick | GPU upload | **dab total** | stroke end (undo record) | undo | redo | undo step ||---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|-| Standard | 244k | 321k (59) | 8.15 | 5.73 | 3.85 | 0.01 | 6.60 | **26.45** | 0.00 | 17.3 | 17.0 | 8.6 MB |-| Mask | 237k | 309k (58) | 8.68 | 0.00 | 0.00 | 0.01 | 6.54 | **17.23** | 0.00 | 1.2 | 1.2 | 4.2 MB |-| Paint | 237k | 309k (58) | 8.79 | 0.00 | 0.00 | 0.01 | 12.77 | **23.43** | 0.00 | 2.0 | 1.9 | 8.4 MB |+| Standard | 78k | 117k (18) | 3.10 | 2.88 | 1.58 | 0.00 | 2.49 | **10.32** | 0.00 | 5.5 | 5.9 | 2.8 MB |+| Standard (large, r 0.4) | 1.2M | 1.3M (67) | 26.54 | 27.08 | 17.16 | 0.02 | 20.26 | **92.91** | 0.00 | 69.1 | 68.2 | 35.5 MB |+| Clay | 68k | 104k (17) | 2.77 | 2.45 | 1.56 | 0.00 | 1.69 | **8.71** | 0.00 | 5.7 | 5.3 | 2.4 MB |+| ClayBuildup | 107k | 151k (21) | 3.98 | 3.02 | 1.62 | 0.01 | 2.51 | **11.46** | 0.00 | 6.5 | 6.6 | 3.1 MB |+| Smooth | 63k | 98k (17) | 2.93 | 2.28 | 1.18 | 0.01 | 1.77 | **8.39** | 0.00 | 4.5 | 5.6 | 2.1 MB |+| Inflate | 61k | 96k (16) | 2.50 | 2.17 | 1.19 | 0.01 | 1.87 | **7.97** | 0.00 | 4.8 | 4.8 | 2.1 MB |+| DamStandard | 61k | 96k (16) | 2.62 | 2.24 | 1.28 | 0.01 | 1.59 | **8.01** | 0.00 | 4.6 | 4.6 | 2.0 MB |+| Layer | 63k | 99k (17) | 4.87 | 2.34 | 1.26 | 0.01 | 1.81 | **10.57** | 0.00 | 4.7 | 4.9 | 2.1 MB |+| Move | 49k | 79k (14) | 0.42 | 0.91 | 1.05 | 0.01 | 1.65 | **4.61** | 0.00 | 2.2 | 1.9 | 0.9 MB |+| Recipe (pattern) | 65k | 102k (18) | 4.29 | 2.39 | 1.18 | 0.01 | 2.08 | **10.19** | 0.00 | 4.9 | 5.1 | 2.1 MB |+| Mask | 66k | 101k (18) | 2.52 | 0.00 | 0.00 | 0.01 | 3.03 | **5.76** | 0.01 | 0.3 | 0.2 | 1.0 MB |+| Paint | 66k | 101k (18) | 2.47 | 0.00 | 0.00 | 0.05 | 5.08 | **7.82** | 0.01 | 0.4 | 0.4 | 2.1 MB || Operation | ms ||---|---:|-| Motion proxy build (first move after an upload) | 408 |-| Orbit: frame time, 4x antialiasing | 19.6 (51 fps) |-| Orbit: frame time, no antialiasing | 16.9 (59 fps) |-| Orbit: triangles drawn | 48.1M (46%) |-| Orbit: frame time, Fast Navigation (no antialiasing, motion proxy) | 9.9 (101 fps) |-| Orbit: triangles drawn (motion proxy) | 20.1M (19%) |-| GPU memory with the motion proxy | 1982 MB = 19.1 B/triangle |+| Lower Res (to 8.3M, after edits) | 1529 |+| Higher Res (back up) | 11 |+| Lower Res again (no edits) | 55 |+| Higher Res again (no edits) | 14 |+| Orbit: frame time, 4x antialiasing | 20.6 (49 fps) |+| Orbit: frame time, Fast Navigation (no antialiasing) | 14.0 (71 fps) |++#### CPU only, 64M (no project round trip)++Threads: 10. Brushes use X symmetry (two dabs per step), radius 0.12 on a unit sphere unless noted, 40 dabs per stroke. Times in milliseconds.++##### 63.7M triangles (31.9M vertices, 7 subdivision levels)++| Setup | |+|---|---|+| Divide up to this size | 4788 |+| BVH build | 3266 |+| Mesh (incl. topology) | 3953 MB = 62 B/triangle |+| BVH | 1244 MB = 19.5 B/triangle |+| Subdivision levels (stack) | 4756 MB = 75 B/triangle |+| Process memory (RSS) | 10081 MB (+10070 MB) |++| Brush | verts/dab | uploaded verts (ranges) | kernel | normals | BVH refit | pick | **dab total** | stroke end (undo record) | undo | redo | undo step |+|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|+| Standard | 198k | 259k (28) | 6.61 | 4.61 | 2.82 | 0.00 | **14.58** | 0.00 | 42.3 | 42.2 | 21.8 MB |+| Standard (large, r 0.4) | 1.9M | 2.0M (79) | 33.95 | 38.18 | 23.82 | 0.01 | **98.42** | 0.00 | 148.1 | 147.0 | 74.0 MB |+| Clay | 110k | 155k (21) | 4.07 | 3.18 | 1.76 | 0.02 | **9.41** | 0.00 | 27.8 | 27.2 | 13.8 MB |+| ClayBuildup | 120k | 166k (23) | 4.52 | 3.34 | 1.79 | 0.03 | **10.06** | 0.00 | 30.7 | 30.3 | 15.1 MB |+| Smooth | 71k | 108k (19) | 3.22 | 2.54 | 1.28 | 0.03 | **7.35** | 0.00 | 22.7 | 22.6 | 10.8 MB |+| Inflate | 69k | 106k (19) | 2.73 | 2.62 | 1.37 | 0.03 | **7.02** | 0.00 | 22.5 | 22.5 | 10.7 MB |+| DamStandard | 68k | 104k (18) | 2.76 | 2.60 | 1.27 | 0.03 | **6.94** | 0.00 | 22.5 | 22.5 | 10.4 MB |+| Layer | 70k | 107k (19) | 3.75 | 2.64 | 1.32 | 0.03 | **8.00** | 0.00 | 21.5 | 22.9 | 10.8 MB |+| Move | 64k | 98k (13) | 0.50 | 1.06 | 1.12 | 0.03 | **3.04** | 0.00 | 2.5 | 2.5 | 1.0 MB |+| Recipe (pattern) | 72k | 109k (19) | 4.24 | 2.53 | 1.24 | 0.03 | **8.32** | 0.00 | 22.0 | 22.7 | 10.6 MB |+| Mask | 72k | 108k (19) | 2.35 | 0.00 | 0.00 | 0.03 | **2.59** | 0.00 | 1.7 | 1.3 | 5.3 MB |+| Paint | 72k | 108k (19) | 2.41 | 0.00 | 0.00 | 0.03 | **2.65** | 0.00 | 2.6 | 2.4 | 10.7 MB |++| Operation | ms |+|---|---:|+| Lower Res (to 15.9M, after edits) | 2793 |+| Higher Res (back up) | 20 |+| Lower Res again (no edits) | 79 |+| Higher Res again (no edits) | 20 |