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
Guide: Kelvinlet brushes, Capture from view, Detail Clone; changelog [Unreleased]
islandmed56182373c734
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 067543ea..2352781f 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -6,6 +6,38 @@ All notable changes to SculptForge are listed here. The format follows## [Unreleased]+### Added+- **Kelvinlet brushes**: physically based elastic brushes from the regularized Kelvinlets of de Goes & James+ (SIGGRAPH 2017): the exact displacement of an elastic solid under a softened point load, so the surface moves+ like clay pushed with a thumb, with no falloff edge. **KelvinGrab** (an elastic Move: tri-scale kernel, 1/r^5+ falloff), **KelvinTwist** (press and drag right to turn clockwise around that point; every ring turns rigidly,+ so volume is kept), **KelvinScale** (drag left to pinch, right to swell; integrated as a radial flow, so it never+ folds through the centre) and **KelvinSnake** (a multi-scale SnakeHook whose pull narrows as it travels, so+ horns taper by themselves). **Brush > Kelvinlet & Capture**: **Squash** is Poisson's ratio, from rubbery (0) to+ incompressible clay that bulges around the thumb (100); **Sharpness** a tighter, cusped peak with the same+ reach. Symmetry (the twist mirrors as a pseudovector), masks, hidden parts, sculpt layers, pressure and undo work+ as with every brush. Each move touches only the points inside an adaptive cutoff (where the move is still more+ than 2% of its largest, the last part faded smoothly to 0), evaluates the kernel from a radial table, works out a+ fast drag in pieces in one pass, and passes on only what moved to undo, normals and the BVH. KelvinGrab and+ DetailClone are on the bottom shelf; all five are in the brush picker, the LightBox and the `stroke` command.+- **Capture from view** (<kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>C</kbd>, askNK's request): drag a square (Shift: a+ circle) over any sculpted detail and get, side by side, a **grayscale height alpha** (height toward the viewer+ over a fitted plane, normalized, optionally detail-only) and a **vector displacement map**: each point's true 3D+ offset from a smooth base (the broad form as a fitted quadric, the rest by implicit fairing with the rim held),+ in the base's own tangent frame, so overhangs and sideways leans come along. Options: Base Smoothing, Edge Fade,+ Resolution, Fit plane, Invert. **Use as Alpha**, **Use as VDM**, **Detail Clone** or **Save to Library** (the+ alpha as a PNG in the LightBox Alphas folder, the VDM in the brush library; VDMs now show in the LightBox Brush+ tab with their thumbnails). Commands `capture_alpha` and `capture_vdm`.+- **DetailClone** brush: stamps the VDM brush's map along the stroke, one copy every stamp width (Clone Spacing),+ each turned to follow the stroke (Clone follows stroke) and shaped to the surface under it; a click stamps one.+- `new_bench_sphere millions=N` makes the benchmark's sphere of N million triangles (with subdivision levels),+ and `SF_MEASURE_BRUSH=<brush>` makes `--measure-stroke` measure another built-in brush (`SF_KELVIN_LOG=1` logs+ each Kelvinlet move: pieces, vertices, kernel / normals / BVH milliseconds).+- Tests: tests/test_kelvinlet.cpp (kernel normalization and far-field cancellation, divergence against Squash,+ bulge, exact twist, pinch without folding, symmetry, mask, undo, sculpt layers, threads, Detail Clone, the+ captures with a VDM round trip within 9% RMS and a curved-surface capture; a dense-mesh timing check with+ SF_BENCH_LIMITS=1) and the UI test kelvinlet_capture.+## [0.9.7] - 2026-10-31Speed first: big brushes on dense meshes take a third less time per frame, trail the pen by half as far and nodiff --git a/docs/guide/images/capture-from-view.jpg b/docs/guide/images/capture-from-view.jpgnew file mode 100644index 00000000..6f881966Binary files /dev/null and b/docs/guide/images/capture-from-view.jpg differdiff --git a/docs/guide/images/kelvinlet-brushes.jpg b/docs/guide/images/kelvinlet-brushes.jpgnew file mode 100644index 00000000..69116653Binary files /dev/null and b/docs/guide/images/kelvinlet-brushes.jpg differdiff --git a/docs/guide/sculpting.md b/docs/guide/sculpting.mdindex aff55753..f2d8ddb9 100644--- a/docs/guide/sculpting.md+++ b/docs/guide/sculpting.md@@ -25,7 +25,7 @@ works on the active SubTool, and only on parts that are visible and not masked.## Built-in brushes-SculptForge has fourteen sculpting brushes plus the Paint brush. The first ten have number keys; all of them+SculptForge has nineteen sculpting brushes plus the Paint brush. The first ten have number keys; all of themare on the bottom shelf by default and in the brush picker.| Brush | Key | What it does | With <kbd>Alt</kbd> |@@ -44,12 +44,18 @@ are on the bottom shelf by default and in the brush picker.| **Trim** | | Trim Dynamic: shaves away everything above a plane for hard surfaces. | Fills up to the plane || **Layer** | | Raises the surface to one fixed height per stroke; overlapping passes never stack. | Lowers to a fixed depth || **Nudge** | | Slides the surface sideways along the stroke without lifting it. | No change |+| **VDM** | | Stamps a vector displacement map, overhangs and all (see [below](#vector-displacement-brushes)). | Digs the shape in |+| **KelvinGrab** | | Elastic move: drags the surface like real clay, with no falloff edge (see [Kelvinlet brushes](#kelvinlet-brushes)). | No change |+| **KelvinTwist** | | Press and drag right to turn the surface clockwise around that point, left to turn it back. | Turns the other way |+| **KelvinScale** | | Press and drag left to pinch the surface toward that point, right to swell it. | The other way |+| **KelvinSnake** | | An elastic SnakeHook: smooth horns and tendrils that taper as they stretch. | No change |+| **DetailClone** | | Paints copies of a captured detail (the VDM brush's map) along the stroke, each turned to follow it. | Digs them in || **Paint** | <kbd>P</kbd> | Paints colour without sculpting. See [Polypaint and materials](polypaint.md). | Paints back to white |Notes on particular brushes:-- **Move** and **SnakeHook** move the surface with the cursor instead of placing dabs, so stroke types- (Dots, Spray and so on) don't apply to them.+- **Move**, **SnakeHook** and the Kelvinlet brushes (except Detail Clone) move the surface with the cursor+ instead of placing dabs, so stroke types (Dots, Spray and so on) don't apply to them.- **Layer** sets its height from the brush size and **Z Intensity**. Pen pressure lowers the height when**Pressure > Strength** is on, so you can feather the edge of a layer.- **Trim** gives crisp planes on cylinders and edges. Use it with **Front** on when you work on thin shapes.@@ -327,6 +333,83 @@ angle=30`, `vdm_new_plane`, `vdm_capture name="My horn" exr=horn.exr`, `vdm_expo> several VDMs in one brush (ZBrush's *Create Multiple Alpha Brush*), MidValue and the alpha options for 3D> alphas, and reading ZBrush's own brush files.+## Kelvinlet brushes++**KelvinGrab**, **KelvinTwist**, **KelvinScale** and **KelvinSnake** move the surface the way an elastic solid+moves when you push, twist or squeeze it. Each is the exact solution of the equations of elasticity for a+softened point load (the "regularized Kelvinlets" of de Goes and James, SIGGRAPH 2017), so the surface follows+your hand like clay: there is no falloff edge to see, the deformation fades smoothly over about twice the brush+radius, and the material around it reacts the way real material does.++++- **KelvinGrab** works like Move: press on the model and drag; the point under the cursor goes where the cursor+ goes and the surface around it follows elastically.+- **KelvinTwist** turns the surface around where you pressed, about the view direction. Drag right to turn+ clockwise, left to turn back; the turn is strongest at the centre and fades out, and every ring keeps its+ shape (a true rotation), so twisted shapes keep their volume. Good for twisting horns, tentacles, folds of cloth+ and spiral shells.+- **KelvinScale** pinches (drag left) or swells (drag right) the surface toward or away from where you pressed.+ It never folds the surface through the centre, however hard you pinch.+- **KelvinSnake** pulls horns, tentacles and spikes out along the stroke like SnakeHook, but its pull narrows as it+ travels, so shapes taper to a tip by themselves.++Their settings are in **Brush > Kelvinlet & Capture**:++- **Squash** (0-100) is how the material keeps its volume (its Poisson's ratio). At 0 it's rubbery: pulling it+ just stretches it. At 100 it's incompressible clay: pressing in makes the surface bulge up around your thumb and+ pulling out draws the sides in, as clay does. 50 is the default.+- **Sharpness** gives the brush a tighter, more pointed peak at its centre while keeping its soft reach, for+ pulling out points and tips.++**Z Intensity** sets how strongly the surface follows (50 and above: the grabbed point follows the cursor+exactly), pen pressure scales it, and like every brush they respect symmetry, the mask, hidden parts and sculpt+layers, and each stroke is one undo step. They don't remesh with dynamic topology on (like Move).++> **How it stays fast:** a Kelvinlet's influence never quite reaches zero, so each move works out how far its+> effect is still bigger than a few thousandths of the brush radius and only touches the points inside that+> distance, fading the last part smoothly to nothing. A fast drag between two frames is worked out in small pieces+> in one pass, so the brush keeps up on meshes of tens of millions of triangles (see+> [Performance](performance.md)).++## Capture an alpha or a VDM from the model++Any detail you have sculpted can become a brush in two seconds: **Capture from view**+(<kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>C</kbd>, or the button in **Brush > Kelvinlet & Capture**).++++1. Press <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>C</kbd> and drag a square over the detail, corner to corner (hold+ <kbd>Shift</kbd> as you press to drag a circle from its centre instead). <kbd>Esc</kbd> cancels.+2. The **Capture from view** window shows two results, side by side:+ - a **height alpha**: the surface's height toward you, measured from a plane fitted to the surface and+ scaled to black-to-white;+ - a **vector displacement map**: the true 3D offset of every point from a smooth base surface, in that base's+ own frame, so overhangs and sideways leans come along.+3. Adjust if needed: **Base Smoothing** decides what counts as detail (0 measures from a flat plane, the whole+ shape; higher takes more of the broad form away, so a wrinkle captured on a curved forehead stamps flat),+ **Edge Fade** blends the border out, **Resolution** sets the pixels, **Fit plane** and **Invert** apply to the+ alpha. Changes capture again from the same square.+4. Use it: **Use as Alpha** (it shapes every brush), **Use as VDM** (the VDM brush stamps it with DragRect),+ **Detail Clone** (paint copies along strokes) or **Save to Library**: the alpha goes to your LightBox+ **Alphas** folder as a PNG and the VDM to your brush library, both with thumbnails (the VDM also shows in the+ LightBox **Brush** tab, the alpha picker and Brush > Vector Displacement).++The square is captured along your view, so look at the detail straight on. The capture takes about a tenth of a+second for a small detail and a second or so for a large patch of a 20-million-triangle model.++> **ZBrush:** this is "GrabDoc" for alphas, and more: ZBrush can only make a VDM from its special VDM plane,+> here any detail on any model becomes one. The commands `capture_alpha` and `capture_vdm` do the same from a+> script.++### Detail Clone++**DetailClone** stamps the VDM brush's map (a captured one or any other) along your stroke, one copy every stamp+width, each turned so its top points the way the stroke goes: rows of scales, rivets, stitches or warts that+follow a curve. **Clone Spacing** sets the distance between copies (1 = edge to edge) and **Clone follows+stroke** can keep every copy upright instead. Draw Size sets their size and Z Intensity their depth; a click+without moving stamps one. Each copy is shaped to the surface under it.+## SymmetrySymmetry mirrors every stroke, including mask and paint strokes.diff --git a/docs/guide/shortcuts.md b/docs/guide/shortcuts.mdindex a08d37e8..3b1e1bb2 100644--- a/docs/guide/shortcuts.md+++ b/docs/guide/shortcuts.md@@ -24,6 +24,7 @@ action registry, the same source as the Controls window.| Action | Keys | What it does ||---|---|---|| Brush picker | <kbd>B</kbd> | Pop up every brush under the cursor. Type the first letter of a brush, then the orange letter on its tile (B S T = Standard). |+| Capture from view | <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>C</kbd> | Alpha and VDM from the viewport: drag a square over any sculpted detail (Shift for a circle) and capture it as a grayscale height alpha and as a vector displacement brush, ready to stamp with the VDM brush or along strokes with Detail Clone, and to save in your library. || Paste brush | <kbd>Ctrl</kbd>+<kbd>V</kbd> | Add the brush on the clipboard: a brush code someone shared, or the text of a .sfbrush file. |### Colordiff --git a/tools/guide/kelvinlet_shots.sfui b/tools/guide/kelvinlet_shots.sfuinew file mode 100644index 00000000..8577f973--- /dev/null+++ b/tools/guide/kelvinlet_shots.sfui@@ -0,0 +1,28 @@+# Pictures for the guide's Kelvinlet and Capture sections (crop with make_images.py or by hand):+# build/sculptforge --ui-test tools/guide/kelvinlet_shots.sfui --ui-out build/guide-shots/kelvinlet+run new_sphere subdivisions=8+run kelvinlet_settings squash=1+wait_idle 30+click "KelvinGrab##brush.kelvingrab"+stroke 0.70 0.40 0.86 0.30+stroke 0.30 0.70 0.20 0.82+run stroke brush=KelvinTwist points="0,0,2 0.25,0,2" radius=0.35 strength=1+wait_idle 60+shot kelvinlet-brushes++# A detail captured from the model and cloned along a stroke.+run new_sphere subdivisions=8+run vdm_set name=horn+run vdm_stamp point=0,0,2 view=0,0,-1 radius=0.18 angle=30+run stroke brush=DamStandard points="-0.12,-0.1,2 0.12,-0.14,2" radius=0.03+wait_idle 30+key ctrl+alt+c+view_drag 0.355 0.42 0.47 0.6+wait_value capture_open == 1+wait_idle 60+shot capture-from-view+click "Detail Clone##capture"+run kelvinlet_settings clone_spacing=1.1+stroke 0.30 0.70 0.62 0.74+wait_idle 60+shot detail-clone