Free, open-source 3D sculpting for Linux, macOS and Windows: dense meshes, remeshing, painting, built-in AI (image/text to 3D), Send to Unreal, game-ready LODs, Gaussian splats and OpenUSD.
C++ 3d3d-sculptingcppdear-imguidigital-sculptingfbxgame-developmentgaussian-splattinggltfimage-to-3dmcpopenglopenusdsculptingtext-to-3dunreal-engine
Merge map baking (normal, displacement, AO, cavity, colour)
islandmed3b699158bf21
diff --cc CHANGELOG.mdindex 57ae862a,4c5685f7..fd3e3f96--- a/CHANGELOG.md+++ b/CHANGELOG.md@@@ -6,52 -6,25 +6,71 @@@ All notable changes to SculptForge are## [Unreleased]+### Subdivision levels (multiresolution)+- Divide (Tool > Geometry, Ctrl+D, `subdiv_divide`) adds a subdivision level per SubTool and keeps the lower+ ones: Catmull-Clark on meshes with quads (quads stay quads), Loop on triangle meshes, flat with Smt off.+- Lower Res / Higher Res (Shift+D / D, `subdiv_lower`, `subdiv_higher`) and the SDiv slider (`subdiv_level`)+ step between levels. Detail is stored per level as a displacement in the local frame of the smoothed level+ below, so reshaping a low level carries it along; edits at a high level are restricted (full weighting) to+ the lower ones. Round trips without edits are bit-for-bit.+- Mask, polypaint, paint layers, polygroups, hidden faces and UVs follow the levels (copied down, interpolated or+ inherited up where they changed); sculpt layers have their own detail per level; the texture is shared.+- Del Lower, Del Higher (`subdiv_delete_lower`, `subdiv_delete_higher`) and Reconstruct Subdiv+ (`subdiv_reconstruct`: finds the lower level of a regular Catmull-Clark or Loop subdivision, keeping the mesh+ and its vertex order). `subdiv_info` lists the levels; `subdiv_export` writes the visible SubTools at another+ level (e.g. the base cage) in any export format.+- Each level change is one undo step, as is each stroke at any level; level edits share unchanged levels+ copy-on-write. The two levels left last keep their topology and BVH, so stepping back and forth is instant+ (1-45 ms at 6.5M triangles).+- Projects save every level (project format 4). The SubTool list shows "SDiv n/m".+- Ctrl+D now runs Divide; the one-way Subdivide stays in Tool > Geometry and as `subdivide`.++### Gizmo 3D (moving, scaling, rotating and posing)+- Gizmo 3D modes, as in ZBrush: W Move, E Scale, R Rotate, Q back to Draw (top shelf, Transform palette, F3).+ Move has axis arrows, plane squares and a view-plane centre; Rotate has axis rings and a view ring; Scale has+ axis boxes and a uniform centre. Shift snaps (15 degrees, a round grid step, 10%). The amount shows beside the+ gizmo while dragging. Dragging off the handles still navigates; Ctrl still masks.+- Transforms move the active SubTool, or only its unmasked part: partly masked vertices move partly, hidden ones+ never. Falloff eases the movement in over a distance from the mask's edge (measured along the surface, as a+ share of the size) for soft joints when posing. With symmetry on, a masked transform is mirrored across the+ symmetry plane.+- Pivot: follows the centre of what moves; Alt+drag the gizmo to move it (or turn its axes) without the model,+ Alt+click the model or To Surface to put it on the surface, Reset; World or Surface axes (Y along the normal,+ turning with rotations). The gizmo follows undo / redo of its own steps and is saved in projects (`gizmo` key,+ no format bump).+- Gizmo 3D panel: pivot, options and numeric Move / Rotate / Scale with Apply; All SubTools (Transpose All, one+ undo step per SubTool).+- `transform` command (translate, rotate, scale, pivot, orient, masked, falloff, symmetry, all); each gizmo drag+ is echoed to the console as the command that repeats it.+- One undo step per drag that restores positions bit for bit. Sculpt layers move with the surface (the base and+ every layer's offsets). Topology, quads, UVs, textures, polypaint and polygroups are untouched.+- Fast on big meshes: a drag recomputes from the drag's start (no drift), transforms only the moving vertices+ through a per-weight lookup table on several threads, turns normals of rigid parts and recomputes only where+ the movement varies, uploads only the changed vertex range and refits the BVH once on release. On 1.3M+ triangles: about 2 ms to transform and 7 ms to upload per drag frame, 20-40 ms on release.++ ### Normal, displacement and AO map baking+ - Tool > Bake (and the `bake` command) bakes a high-poly source (one SubTool, or every visible one but the+ active) onto the active SubTool's UVs: tangent-space normal, object-space normal, displacement, ambient+ occlusion, cavity and colour (polypaint or painted texture) maps, 1K to 8K.+ - Tangent-space maps use MikkTSpace tangents (vendored, zlib), as Blender, Unreal, Unity and Godot compute them;+ OpenGL or DirectX green convention. Unit-tested to decode to the high-poly's normals within 0.2 degrees on+ average.+ - Rays along the low-poly's smoothed normals through a front / rear cage, measured automatically by default or+ set by hand, keeping the high-poly hit nearest the low-poly; 1-16 rays per texel of anti-aliasing; padding+ around UV islands; tile-parallel on every core over a dedicated thread-safe BVH, in the background with+ progress and Cancel.+ - Displacement as a 16-bit PNG (mid-grey = 0, scale reported) and a 32-bit float OpenEXR in world units.+ - The baked normal map shows on the low-poly in the viewport (new normal-map shader with per-corner MikkTSpace+ tangents), with a Preview Normal Map toggle.+ - Send to Unreal imports the baked normal map too (`T_<Name>_N`, normal-map compression, green flipped for+ OpenGL maps) when the editor runs on the same computer.+ - Maps are written as `<SubTool>_normal.png`, `_ao.png`, `_displacement.png` / `.exr` and so on, beside the+ last export by default.++### Changed+- Wireframe (PolyF) is Shift+F only: W is now the Gizmo 3D's Move, as in ZBrush.+## [0.4.2] - 2026-10-23### Texture painting on UV mapsdiff --cc CMakeLists.txtindex 8468ac32,9ef3d352..c461d620--- a/CMakeLists.txt+++ b/CMakeLists.txt@@@ -57,10 -55,12 +57,14 @@@ add_library(sculptforge_core STATIsrc/core/PaintLayer.cppsrc/core/Texture.cppsrc/core/TextureCommands.cpp+ src/core/Multires.cpp+ src/core/MultiresCommands.cppsrc/core/AutoUv.cppthird_party/xatlas/xatlas.cpp+ src/core/Bake.cpp+ src/core/BakeImage.cpp+ src/core/Tangents.cpp+ third_party/mikktspace/mikktspace.csrc/core/Matcap.cppsrc/core/Project.cppsrc/core/Guide.cpp@@@ -164,8 -164,7 +168,9 @@@ if(SCULPTFORGE_BUILD_APPsrc/app/PanelPolypaint.cppsrc/app/PanelPaintLayers.cppsrc/app/PanelTexture.cpp+ src/app/PanelGeometry.cpp+ src/app/Gizmo.cpp+ src/app/PanelBake.cppsrc/app/PanelGoz.cppsrc/app/PanelProject.cppsrc/app/PanelSubTools.cppdiff --cc ROADMAP.mdindex d4e5f622,2c5e5aac..1a5750f0--- a/ROADMAP.md+++ b/ROADMAP.md@@@ -109,12 -109,12 +109,12 @@@ always-latest downloadsRanked by what sculptors cite most on the ZBrush, Polycount, Blender and Mudbox forums:-- π Multiresolution subdivision levels (step up and down, keep detail, reconstruct)+- β Multiresolution subdivision levels (step up and down, keep detail, reconstruct)- π ZRemesher-class quad retopology with guides and density, plus Project / Project All detail transfer- β Automatic UV unwrapping (Auto UV, xatlas) and texture painting on UV maps (v0.5)- - π Normal / displacement map baking+ - β Normal / displacement / AO / cavity / colour map baking with MikkTSpace tangents and a viewport preview (v0.5)- π Performance at 20-100M polygons, multithreaded brushes, fast undo-- π A transpose / gizmo tool for posing and moving parts+- β Gizmo 3D for moving, scaling, rotating and posing parts (W / E / R, masked falloff, Transpose All) (v0.5)## Phase 3 β AI assistant, beyond brushesdiff --cc docs/guide/index.mdindex df54ebb9,17bcf648..d1458576--- a/docs/guide/index.md+++ b/docs/guide/index.md@@@ -40,16 -38,17 +40,17 @@@ You can read it inside SculptForge (**H## Files and pipelines- 19. [Exporting, Unreal and ZBrush](exporting.md)- 20. [Projects, autosave and QuickSave](projects.md)- 21. [Scripting and automation](scripting.md)- 22. [SculptForge for studios](studios.md)-17. [Baking normal and displacement maps](baking.md)-18. [Exporting, Unreal and ZBrush](exporting.md)-19. [Projects, autosave and QuickSave](projects.md)-20. [Scripting and automation](scripting.md)-21. [SculptForge for studios](studios.md)++19. [Baking normal and displacement maps](baking.md)++20. [Exporting, Unreal and ZBrush](exporting.md)++21. [Projects, autosave and QuickSave](projects.md)++22. [Scripting and automation](scripting.md)++23. [SculptForge for studios](studios.md)## Reference- 23. [Keyboard and mouse](shortcuts.md)- 24. [Troubleshooting and FAQ](troubleshooting.md)- 25. [Glossary](glossary.md)-22. [Keyboard and mouse](shortcuts.md)-23. [Troubleshooting and FAQ](troubleshooting.md)-24. [Glossary](glossary.md)++24. [Keyboard and mouse](shortcuts.md)++25. [Troubleshooting and FAQ](troubleshooting.md)++26. [Glossary](glossary.md)## Getting helpdiff --cc docs/guide/whats-new.mdindex 29f90747,9861ec3a..1a1defcb--- a/docs/guide/whats-new.md+++ b/docs/guide/whats-new.md@@@ -7,43 -7,24 +7,61 @@@ chapter opens by itself the first time## Next version (in development)+### Subdivision levels++Sculpt one model at several resolutions, as with ZBrush's SDiv: big forms low, fine detail high, and back down+without losing anything.++- **Divide** (<kbd>Ctrl</kbd>+<kbd>D</kbd>) adds a level and keeps the ones below. Quads stay quads+ (Catmull-Clark); **Smt** off divides without smoothing.+- **Lower Res** / **Higher Res** (<kbd>Shift</kbd>+<kbd>D</kbd> / <kbd>D</kbd>) and the **SDiv** slider step+ between levels. Detail sculpted high rides along when you reshape low, and edits high show up softened below.+ Stepping back and forth is instant, even at millions of polygons.+- Mask, polypaint, paint layers, polygroups, hidden faces, UVs and sculpt layers follow the levels.+- **Del Lower**, **Del Higher** and **Reconstruct Subdiv** (find the lower levels of a model subdivided+ elsewhere). Undo walks back through strokes and level changes; projects save every level; the SubTool list+ shows "SDiv 3/5".+- <kbd>Ctrl</kbd>+<kbd>D</kbd> now divides with levels; the old one-way **Subdivide** is still in+ **Tool > Geometry**.++See [Subdivision levels](subdivision-levels.md).++### Gizmo 3D: move, scale, rotate and pose++ZBrush's Gizmo 3D, with the same keys: <kbd>W</kbd> Move, <kbd>E</kbd> Scale, <kbd>R</kbd> Rotate, <kbd>Q</kbd>+back to Draw (also on the top shelf and in the **Transform** palette).++- **Handles over the model.** Arrows, plane squares and a free-move centre; axis rings and a view ring; axis+ boxes and a uniform centre. <kbd>Shift</kbd> snaps to 15 degrees, the grid or 10% steps.+- **Only the unmasked part moves**, so posing is: mask the body, <kbd>Alt</kbd>+click the shoulder to put the+ pivot there, raise **Falloff** for a soft joint, turn the arm. With X symmetry both arms move together.+- **Pivot tools**: <kbd>Alt</kbd>+drag the gizmo to move it alone, **Reset**, **To Surface**, World or Surface+ axes.+- **Numeric entry** in the Gizmo 3D panel, **All SubTools** (Transpose All), one undo step per drag, sculpt+ layers move with the surface, and the `transform` command for scripts.+- Fast on big models: a drag frame on 1.3 million triangles takes about 10 ms.++<kbd>W</kbd> no longer toggles the wireframe: use <kbd>Shift</kbd>+<kbd>F</kbd> (as in ZBrush) or **PolyF** on the+right shelf. See [Moving, rotating and posing](gizmo.md).++ ### Normal, displacement and AO map baking++ Bake the detail of a high-poly sculpt into maps on a low-poly's UVs, for game engines and renderers:+ **Tool > Bake**.++ - **Six maps in one go**: tangent-space normal, object-space normal, displacement (16-bit PNG with mid-grey =+ 0, plus a 32-bit EXR in world units), ambient occlusion, cavity and colour (polypaint or texture).+ - **Right in every engine.** Tangent-space maps use MikkTSpace tangents, as Blender, Unreal, Unity and Godot+ do; pick the OpenGL or DirectX green convention.+ - **Check it on the model.** The low-poly shows its baked normal map in the viewport as soon as the bake ends,+ next to the high-poly.+ - **ZBrush-style controls**: source SubTool, 1K-8K, anti-aliasing, automatic or manual front and rear ray+ distances, padding around UV islands. Bakes run in the background on every core, with progress and Cancel.+ - **Send to Unreal** brings the normal map along, set up as a normal map. The `bake` command does it all from+ scripts.++ See [Baking normal and displacement maps](baking.md).+## Version 0.4.2### Texture painting on UV mapsdiff --cc src/app/Config.cppindex eb1c34a4,7f1c6edb..414361b7--- a/src/app/Config.cpp+++ b/src/app/Config.cpp@@@ -330,7 -307,7 +330,8 @@@ void App::initActions()// the same id and own P (Paint), the symmetry toggles and Tab.registerShellActions();registerTextureUiActions(); // Tool > Texture Map, the Vertex / Texture paint target (PanelTexture.cpp)+ registerGizmoActions(); // Q W E R: Draw, and the Gizmo 3D's Move, Scale, Rotate (Gizmo.cpp)+ registerBakeUiActions(); // Tool > Bake (PanelBake.cpp)// Every command, so the command palette finds anything scriptable.actions_.registerCommands(diff --cc src/app/Palettes.cppindex c5f94aff,95815869..ff51cc2c--- a/src/app/Palettes.cpp+++ b/src/app/Palettes.cpp@@@ -357,9 -357,12 +357,14 @@@ void App::drawPalette_Tool()drawTextureMapContents();Demo::popScope();}+ if (subpalette("tool.bake", "Bake")) {+ Demo::pushScope("Bake");+ drawBakeContents();+ Demo::popScope();+ }if (subpalette("tool.geometry", "Geometry")) {+ Demo::pushScope("Geometry");+ drawGeometrySection();actionRow(*this, {"geometry.subdivide"});const float half = (ImGui::GetContentRegionAvail().x - ImGui::GetStyle().ItemSpacing.x) * 0.5f;if (ImGui::Button("Decimate", ImVec2(half, 0))) runCommand("decimate", {{"ratio", double(decimateRatio_)}});diff --cc src/app/UiTest.cppindex 45e2f823,27ac7436..01be0b97--- a/src/app/UiTest.cpp+++ b/src/app/UiTest.cpp@@@ -62,10 -56,8 +62,12 @@@// texture_painted (texels of the texture composite that aren't white),// texture_mean_r / texture_mean_g / texture_mean_b (mean composite, sRGB 0-255),// auto_uv_running+// sdiv (the current subdivision level, 1 = base; 0 without levels), sdiv_levels (0 = none)+// gizmo_mode (0 Draw, 1 Move, 2 Scale, 3 Rotate), gizmo_hover (handle under the cursor,+// 0 = none, in gizmo_drag's order from 1), gizmo_falloff, pivot_x / pivot_y / pivot_z,+// center_x / center_y / center_z and size_x / size_y / size_z (active mesh bounds)+ // bake_running, baked_maps (maps in the last bake), bake_size, bake_files (files it wrote),+ // normal_map_preview (1 when the active SubTool shows its baked normal map)// (mesh values are the active SubTool's)// snapshot remember the active mesh's vertices (for the moved* values)// remember VALUE NAME keep VALUE's current value as $NAMEdiff --cc src/core/Commands.cppindex 2060f7a3,c2e8c493..22c23c25--- a/src/core/Commands.cpp+++ b/src/core/Commands.cpp@@@ -756,10 -754,9 +757,11 @@@ CommandRegistry::CommandRegistry()registerMaskingCommands(*this);registerPolygroupCommands(*this);registerSubToolCommands(*this);+ registerSubdivCommands(*this); // subdiv_* (core/MultiresCommands.cpp)+ registerTransformCommands(*this); // transform (core/MeshTransform.h)registerPaintCommands(*this); // core/Polypaint.cppregisterGozCommands(*this); // goz_import/export/send/receive, export_stl (io/GozCommands.cpp)+ registerBakeCommands(*this); // bake (core/Bake.cpp)registerProjectCommands(*this); // keep last (core/Project.cpp)}diff --cc tests/ui/whats_new.sfuiindex a0548e4c,e2bb1bcb..93350cdb--- a/tests/ui/whats_new.sfui+++ b/tests/ui/whats_new.sfui@@@ -5,7 -5,6 +5,8 @@@ click "What's New##help.whats_newexpect_value guide_open == 1expect_guide whats-new.mdexpect_text "Version 0.4.2"-# The newest section is on screen (the in-development one while a version is being built).expect_text "Next version (in development)"+expect_text "Subdivision levels"+expect_text "Gizmo 3D: move, scale, rotate and pose"++# The newest section is on screen (the in-development one while a version is being built).shot whats-new