Skip to content

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.

Studio pipelines: VFX Reference Platform, Python API, Rez; fix Windows build

islandmed94ac7b4648a5
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index c9182ed7..a6dc2885 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -27,16 +27,54 @@ jobs:
- { name: Windows, os: windows-2022 }
steps:
- uses: actions/checkout@v4
-
+ - uses: actions/setup-python@v5
+ with:
+ python-version: '3.13'
- name: Install Linux dependencies
if: runner.os == 'Linux'
run: sudo ./packaging/linux/install-build-deps.sh
-
- name: Configure
- run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DSCULPTFORGE_USE_SYSTEM_SDL=OFF
-
+ run: >
+ cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DSCULPTFORGE_USE_SYSTEM_SDL=OFF
+ -DSCULPTFORGE_BUILD_PYTHON=ON -DPython_EXECUTABLE="${{ env.pythonLocation }}/${{ runner.os == 'Windows' && 'python.exe' || 'bin/python3' }}"
- name: Build
run: cmake --build build --config Release --parallel
-
- - name: Test
+ - name: Test (C++ and Python API)
run: ctest --test-dir build -C Release --output-on-failure
+
+ # VFX Reference Platform (vfxplatform.com): GCC 14.2 with glibc 2.28 (CY2026, EL8)
+ # or glibc 2.34 (CY2027, EL9), C++20, Python 3.13.
+ vfx-platform:
+ name: VFX Reference Platform ${{ matrix.cy }} (${{ matrix.image }})
+ runs-on: ubuntu-24.04
+ container: ${{ matrix.image }}
+ strategy:
+ fail-fast: false
+ matrix:
+ include:
+ - { cy: CY2026, image: 'rockylinux:8', glibc: '2.28' }
+ - { cy: CY2027, image: 'rockylinux:9', glibc: '2.34' }
+ steps:
+ - run: dnf -y install git
+ - uses: actions/checkout@v4
+ - run: ./packaging/linux/install-build-deps.sh
+ - name: Python 3.13 (python-build-standalone via uv)
+ run: |
+ curl -LsSf https://astral.sh/uv/0.9.5/install.sh | sh
+ ~/.local/bin/uv python install 3.13
+ echo "PYTHON313=$(~/.local/bin/uv python find 3.13)" >> "$GITHUB_ENV"
+ - name: Build and test with GCC 14
+ run: |
+ source /opt/rh/gcc-toolset-14/enable
+ gcc --version | head -1
+ cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DSCULPTFORGE_USE_SYSTEM_SDL=OFF \
+ -DSCULPTFORGE_BUILD_PYTHON=ON -DPython_EXECUTABLE="$PYTHON313"
+ cmake --build build --parallel
+ ctest --test-dir build --output-on-failure
+ - name: Check binary compatibility (glibc <= ${{ matrix.glibc }})
+ run: |
+ for f in build/sculptforge build/sculptforge-cli build/sculptforge*.so; do
+ max=$(objdump -T "$f" | grep -o 'GLIBC_[0-9.]*' | sort -V | tail -1)
+ echo "$f needs $max"
+ [ "$(printf '%s\n' "GLIBC_${{ matrix.glibc }}" "$max" | sort -V | tail -1)" = "GLIBC_${{ matrix.glibc }}" ]
+ done
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 2b31cf54..c000acce 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -54,32 +54,45 @@ jobs:
build/*.tar.gz
build/*.AppImage
- rpm:
- name: RPM ${{ matrix.arch }} (Fedora, RHEL 9+)
+ vfx:
+ name: ${{ matrix.label }} ${{ matrix.arch }}
runs-on: ${{ matrix.os }}
- container: almalinux:9
+ container: ${{ matrix.image }}
strategy:
fail-fast: false
matrix:
include:
- - { arch: x86_64, os: ubuntu-24.04 }
- - { arch: arm64, os: ubuntu-24.04-arm }
+ # CY2026: EL8 / glibc 2.28 also gives the .rpm for RHEL 8, 9, 10 and Fedora.
+ - { label: 'RPM + VFX CY2026', suffix: vfx2026, generators: 'RPM;TGZ', image: 'rockylinux:8', arch: x86_64, os: ubuntu-24.04 }
+ - { label: 'RPM + VFX CY2026', suffix: vfx2026, generators: 'RPM;TGZ', image: 'rockylinux:8', arch: arm64, os: ubuntu-24.04-arm }
+ - { label: 'VFX CY2027', suffix: vfx2027, generators: 'TGZ', image: 'rockylinux:9', arch: x86_64, os: ubuntu-24.04 }
+ - { label: 'VFX CY2027', suffix: vfx2027, generators: 'TGZ', image: 'rockylinux:9', arch: arm64, os: ubuntu-24.04-arm }
steps:
- run: dnf -y install git
- uses: actions/checkout@v4
with: { ref: '${{ env.TAG }}' }
- run: ./packaging/linux/install-build-deps.sh
- - name: Build, test and package
+ - name: Python 3.13
run: |
- source /opt/rh/gcc-toolset-13/enable
- cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DSCULPTFORGE_USE_SYSTEM_SDL=OFF
+ curl -LsSf https://astral.sh/uv/0.9.5/install.sh | sh
+ ~/.local/bin/uv python install 3.13
+ echo "PYTHON313=$(~/.local/bin/uv python find 3.13)" >> "$GITHUB_ENV"
+ - name: Build, test and package with GCC 14
+ run: |
+ source /opt/rh/gcc-toolset-14/enable
+ cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DSCULPTFORGE_USE_SYSTEM_SDL=OFF \
+ -DSCULPTFORGE_BUILD_PYTHON=ON -DPython_EXECUTABLE="$PYTHON313" -DSCULPTFORGE_PYTHON_INSTALL_DIR=lib/sculptforge/python
cmake --build build --parallel
ctest --test-dir build --output-on-failure
- cd build && cpack -G RPM
+ cd build
+ cpack -G TGZ -D CPACK_PACKAGE_FILE_NAME=SculptForge-${TAG#v}-linux-${{ matrix.arch }}-${{ matrix.suffix }}
+ if [ "${{ matrix.generators }}" = "RPM;TGZ" ]; then cpack -G RPM; fi
- uses: actions/upload-artifact@v4
with:
- name: rpm-${{ matrix.arch }}
- path: build/*.rpm
+ name: vfx-${{ matrix.suffix }}-${{ matrix.arch }}
+ path: |
+ build/*.rpm
+ build/*.tar.gz
macos:
name: macOS (universal .dmg)
@@ -122,7 +135,7 @@ jobs:
publish:
name: Publish GitHub Release
- needs: [linux, rpm, macos, windows]
+ needs: [linux, vfx, macos, windows]
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 173e014d..26fd1ce7 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -30,6 +30,11 @@ First public release.
- Game-ready presets: one-click LOD chains; Unreal Engine preset and **Send to Unreal** over Python remote
execution (same machine or local network).
- `sculptforge-cli` for scripting and pipelines, with an MCP server (`--mcp`) for AI agents.
+
+### Studios
+- VFX Reference Platform CY2026 / CY2027 builds (Rocky Linux 8/9, GCC 14, C++20), verified in CI.
+- Python 3.13 module (`import sculptforge`): every command, NumPy mesh access, layers, scripts.
+- Rez package (`packaging/rez`).
- Headless thumbnail/turntable rendering and scripted demo recording.
[0.1.0]: https://github.com/islandmed/SculptForge/releases/tag/v0.1.0
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 75d59025..dd5a6db0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -11,8 +11,15 @@ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
endif()
option(SCULPTFORGE_BUILD_APP "Build the SculptForge desktop application" ON)
+option(SCULPTFORGE_BUILD_PYTHON "Build the Python module (import sculptforge)" OFF)
+set(SCULPTFORGE_PACKAGE_SUFFIX "" CACHE STRING "Extra tag in package file names, e.g. vfx2026")
option(SCULPTFORGE_BUILD_TESTS "Build unit tests" ON)
option(SCULPTFORGE_USE_SYSTEM_SDL "Use an installed SDL3 if one is found" ON)
+if(SCULPTFORGE_BUILD_TESTS)
+ enable_testing()
+endif()
+# Position-independent code so the core libraries can also go into the Python module.
+set(CMAKE_POSITION_INDEPENDENT_CODE ON)
include(cmake/Dependencies.cmake)
@@ -191,6 +198,9 @@ if(APPLE AND CMAKE_OSX_ARCHITECTURES MATCHES ";")
set(SF_ARCH universal)
endif()
set(CPACK_PACKAGE_FILE_NAME "SculptForge-${PROJECT_VERSION}-${SF_OS}-${SF_ARCH}")
+if(SCULPTFORGE_PACKAGE_SUFFIX)
+ string(APPEND CPACK_PACKAGE_FILE_NAME "-${SCULPTFORGE_PACKAGE_SUFFIX}")
+endif()
set(CPACK_STRIP_FILES ON)
# Debian / Ubuntu
set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT)
@@ -225,10 +235,32 @@ else()
endif()
include(CPack)
+# --- Python module ---
+if(SCULPTFORGE_BUILD_PYTHON)
+ find_package(Python 3.9 REQUIRED COMPONENTS Interpreter Development.Module)
+ FetchContent_Declare(pybind11
+ URL https://github.com/pybind/pybind11/archive/refs/tags/v3.0.4.tar.gz
+ DOWNLOAD_EXTRACT_TIMESTAMP TRUE)
+ FetchContent_MakeAvailable(pybind11)
+ pybind11_add_module(sculptforge_python MODULE src/python/module.cpp)
+ set_target_properties(sculptforge_python PROPERTIES OUTPUT_NAME sculptforge)
+ target_link_libraries(sculptforge_python PRIVATE sculptforge_core sculptforge_ai)
+ target_compile_definitions(sculptforge_python PRIVATE SCULPTFORGE_VERSION="${PROJECT_VERSION}")
+ set(SCULPTFORGE_PYTHON_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/python${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/site-packages"
+ CACHE STRING "Where to install the Python module")
+ install(TARGETS sculptforge_python LIBRARY DESTINATION ${SCULPTFORGE_PYTHON_INSTALL_DIR})
+ if(SCULPTFORGE_BUILD_TESTS)
+ add_test(NAME python_api COMMAND ${CMAKE_COMMAND} -E env PYTHONPATH=$<TARGET_FILE_DIR:sculptforge_python>
+ ${Python_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/tests/test_python.py)
+ endif()
+endif()
+
# --- Tests ---
if(SCULPTFORGE_BUILD_TESTS)
- enable_testing()
add_executable(sculptforge_tests tests/test_main.cpp src/cli/McpServer.cpp)
target_link_libraries(sculptforge_tests PRIVATE sculptforge_core sculptforge_ai)
+ if(MSVC)
+ target_compile_options(sculptforge_tests PRIVATE /utf-8)
+ endif()
add_test(NAME sculptforge_tests COMMAND sculptforge_tests)
endif()
diff --git a/README.md b/README.md
index 15f85ccc..786ab495 100644
--- a/README.md
+++ b/README.md
@@ -109,6 +109,13 @@ SculptForge doesn't read ZBrush's proprietary `.ZTL`/`.ZPR` files; bring models
</tr>
</table>
+## For studios and pipelines
+
+Built for studios with their own pipelines: **[VFX Reference Platform](https://vfxplatform.com) CY2026/CY2027
+builds** (GCC 14, glibc 2.28/2.34, C++20, Python 3.13), a **Python API** (`import sculptforge`), a **Rez**
+package, headless CLI and farm rendering, OpenUSD/FBX/glTF, native Linux, and no licence server. The GPL lets
+you modify it in-house without publishing your changes. See **[docs/studios.md](docs/studios.md)**.
+
## Install
Download the latest build for your system from the
@@ -119,7 +126,8 @@ Download the latest build for your system from the
| Windows 10/11 | Installer (`.exe`) or portable `.zip` |
| macOS 11+ (Apple Silicon & Intel) | `.dmg` |
| Ubuntu / Debian / Mint / Pop!_OS | `.deb` (x86_64, ARM64): `sudo apt install ./sculptforge_*.deb` |
-| Fedora / RHEL 9+ / Rocky / Alma | `.rpm` (x86_64, ARM64): `sudo dnf install ./sculptforge-*.rpm` |
+| Fedora / RHEL / Rocky / Alma 8+ | `.rpm` (x86_64, ARM64): `sudo dnf install ./sculptforge-*.rpm` |
+| Studio pipelines | VFX Reference Platform `…-vfx2026.tar.gz` / `…-vfx2027.tar.gz`, or the [Rez package](packaging/rez/package.py) |
| Any Linux | `.AppImage` (x86_64, ARM64) |
| Arch Linux | AUR: `yay -S sculptforge` ([PKGBUILD](packaging/arch/PKGBUILD)) |
@@ -210,7 +218,8 @@ src/link Live links to game engines (Unreal Python remote execution)
src/cli sculptforge-cli and its MCP server
src/render OpenGL 3.3 renderer, splat renderer, offscreen capture
src/app SDL3 + Dear ImGui application, scripted demo recorder
-packaging Linux desktop/AppStream files, Windows resources, Arch PKGBUILD
+src/python Python module (import sculptforge)
+packaging Linux desktop/AppStream files, Windows resources, Arch PKGBUILD, Rez package
website Project website (GitHub Pages)
tests Unit tests
```
diff --git a/ROADMAP.md b/ROADMAP.md
index ccd2db67..cc6d636a 100644
--- a/ROADMAP.md
+++ b/ROADMAP.md
@@ -69,6 +69,7 @@ retopology, a full ZBrush feature list, rendering/animation (use Blender).
- ✅ PLY mesh / point cloud import
- ✅ Unreal Engine: binary FBX 7.4 export (LOD groups, blend shapes), FBX import (ufbx), Unreal preset,
Send to Unreal over Python remote execution (same machine or LAN)
+- ✅ Studio pipelines: VFX Reference Platform CY2026/CY2027 builds, Python 3.13 API, Rez package
- ✅ MCP server (`sculptforge-cli --mcp`): every command as a tool for Claude Code / Claude Desktop / any MCP client
## Phase 2 — Detail & workflow (v0.2–0.3)
@@ -106,6 +107,7 @@ retopology, a full ZBrush feature list, rendering/animation (use Blender).
## Phase 5 — Ecosystem (v1.0)
-- 📋 Python scripting & plugin API built on the command registry
+- 📋 OpenColorIO viewport, Alembic export, USD layers/variants/references and `.usdc`
+- 📋 Plugin API on top of the Python module
- 📋 Installers: AppImage/Flatpak, signed macOS .dmg, Windows MSI
- 📋 Documentation site and tutorials
diff --git a/docs/studios.md b/docs/studios.md
new file mode 100644
index 00000000..05024894
--- /dev/null
+++ b/docs/studios.md
@@ -0,0 +1,97 @@
+# SculptForge for studios and pipelines
+
+SculptForge is built to drop into animation, VFX and game studios that run their own pipelines:
+Linux-first, scriptable, standards-based, with no licence server and nothing to phone home.
+
+## VFX Reference Platform
+
+SculptForge tracks the [VFX Reference Platform](https://vfxplatform.com). CI builds and tests every commit
+in the platform's reference environments:
+
+| | CY2026 (current) | CY2027 | SculptForge |
+|---|---|---|---|
+| Linux compiler | GCC 14.2 | GCC 14.2 | Built and tested with `gcc-toolset-14` |
+| glibc | 2.28 (EL8) | 2.34 (EL9) | Rocky Linux 8 and 9 builds; CI verifies no newer glibc symbols are used |
+| C++ | C++20 | C++20 | C++20 |
+| Python | 3.13 | 3.13 | `import sculptforge` module built and tested against 3.13 |
+| Windows | VS 2022 17.6+ | VS build tools 14.44+ | Visual Studio 2022 |
+| macOS minimum | 14.0 | 14.0 | Universal binary, deployment target 11.0 (runs on 14.0+) |
+| FBX | 2020.x | 2020.x | Writes FBX 7.4 binary, which FBX SDK 2020 reads |
+
+SculptForge doesn't depend on Qt, OpenEXR, Boost, TBB or other platform libraries, so it can't conflict
+with the versions your other tools load. Its few dependencies (SDL3, Dear ImGui, GLM, ufbx) are linked
+statically into the binaries.
+
+Each release includes `SculptForge-<version>-linux-<arch>-vfx2026.tar.gz` (Rocky 8, glibc 2.28) and
+`…-vfx2027.tar.gz` (Rocky 9, glibc 2.34), with the Python module under `lib/sculptforge/python`.
+
+## Deploying with Rez
+
+`packaging/rez/package.py` builds and installs a Rez package:
+
+```sh
+cd packaging/rez
+SCULPTFORGE_PYTHON=$(which python3.13) rez-build --install # or --release for your release repository
+rez-env sculptforge -- sculptforge # the app
+rez-env sculptforge -- sculptforge-cli --list # every pipeline command
+rez-env sculptforge python-3.13 -- python -c "import sculptforge"
+```
+
+The package puts `bin/` on `PATH`, puts the Python module on `PYTHONPATH`, and sets `SCULPTFORGE_ROOT`.
+
+## Python API
+
+```python
+import sculptforge as sf
+
+doc = sf.Document()
+sf.run(doc, "open", path="/show/assets/troll/troll_base.fbx")
+sf.run(doc, "remesh", resolution=320)
+sf.run(doc, "export_usd", path="/show/assets/troll/troll_sculpt.usda")
+
+verts, tris = doc.vertices, doc.triangles # NumPy (N, 3) float32 and (M, 3) uint32
+doc.set_mesh(my_vertices, my_triangles) # bring meshes in from your own tools
+for name, weight in doc.layers: # sculpt layers / blend shapes
+ print(name, weight, doc.layer_delta(0).shape)
+
+sf.run_script(doc, "decimate ratio=0.25; export_lods path=/out/troll.glb levels=4")
+print([c["name"] for c in sf.commands()]) # everything the app can do
+```
+
+Failures raise `sculptforge.CommandError`. Long operations release the GIL.
+
+## Headless and farm use
+
+- `sculptforge-cli` runs every editor operation without a display: imports, remeshing, decimation, LODs,
+ FBX/USD/glTF export, splat conversion, AI generation.
+- `sculptforge --render out.png --turntable 8` renders review images and turntables offscreen.
+- `sculptforge-cli --mcp` exposes the same operations to AI agents through the Model Context Protocol.
+
+## Formats in your pipeline
+
+| Format | Read | Write | Notes |
+|---|---|---|---|
+| OpenUSD (`.usda`, `.usdz`) | ✓ | ✓ | Meshes, xform ops, Z-up stages, UsdSkel blend shapes, ParticleField Gaussian splats; checked with OpenUSD 26.08 `usdchecker` |
+| FBX | ✓ (any version, via ufbx) | ✓ (7.4 binary) | LOD groups, blend shapes, cm units |
+| glTF / GLB | ✓ | ✓ | Morph targets, `KHR_gaussian_splatting`; checked with the Khronos validator |
+| OBJ, PLY | ✓ | ✓ (OBJ) | PLY meshes, point clouds and splats |
+
+Binary `.usdc` and USD references/payloads aren't read yet; convert with `usdcat in.usd -o out.usda`.
+
+## Licensing for studios
+
+SculptForge is GPL-3.0-or-later. In practice:
+
+- **Using it is unrestricted**, commercially or otherwise, on any number of machines. There are no seats,
+ licence servers or accounts.
+- **Your artwork belongs to you.** The GPL covers the program, not the models you make with it.
+- **You can modify it in-house.** Fork it and wire it into your asset system. The GPL only requires you to
+ share source if you *distribute* the modified program outside your organisation. Internal use, including
+ across your own facilities and farm, isn't distribution. (This is the common reading of the GPL, not
+ legal advice; check with your counsel.)
+- Contributions back upstream are welcome, but never required for internal use.
+
+## Roadmap items for pipelines
+
+Planned, roughly in this order: OpenColorIO viewport display, Alembic export, fuller USD authoring (layers,
+variants, references, `.usdc`), multiresolution sculpting and masking. Pipeline requests are welcome as issues.
diff --git a/packaging/linux/install-build-deps.sh b/packaging/linux/install-build-deps.sh
index 3928a537..3d809ffd 100755
--- a/packaging/linux/install-build-deps.sh
+++ b/packaging/linux/install-build-deps.sh
@@ -7,16 +7,17 @@ if command -v apt-get >/dev/null 2>&1; then
build-essential cmake pkg-config git file ca-certificates \
libx11-dev libxext-dev libxrandr-dev libxcursor-dev libxfixes-dev libxi-dev libxss-dev libxtst-dev \
libxkbcommon-dev libwayland-dev wayland-protocols libdecor-0-dev libegl1-mesa-dev libgl1-mesa-dev \
- libdbus-1-dev libudev-dev libcurl4-openssl-dev
+ libdbus-1-dev libudev-dev libcurl4-openssl-dev python3-dev
elif command -v dnf >/dev/null 2>&1; then
dnf -y install dnf-plugins-core
- dnf config-manager --set-enabled crb 2>/dev/null || true
+ # Extra development repositories: "crb" on EL9+, "powertools" on EL8.
+ dnf config-manager --set-enabled crb 2>/dev/null || dnf config-manager --set-enabled powertools 2>/dev/null || true
dnf -y install gcc-c++ cmake make pkgconf-pkg-config git file rpm-build \
libX11-devel libXext-devel libXrandr-devel libXcursor-devel libXfixes-devel libXi-devel libXScrnSaver-devel \
libXtst-devel libxkbcommon-devel wayland-devel wayland-protocols-devel mesa-libEGL-devel mesa-libGL-devel \
dbus-devel systemd-devel libcurl-devel
- # RHEL 9 ships GCC 11; use the newer toolset when available.
- dnf -y install gcc-toolset-13 2>/dev/null || true
+ # EL8/EL9 ship older system compilers. GCC 14 matches the VFX Reference Platform (CY2026/CY2027).
+ dnf -y install gcc-toolset-14 2>/dev/null || dnf -y install gcc-toolset-13 2>/dev/null || true
else
echo "Unsupported distribution: install a C++20 compiler, CMake 3.24+, X11/Wayland/GL development headers and libcurl." >&2
exit 1
diff --git a/packaging/release-notes-footer.md b/packaging/release-notes-footer.md
index 47e55d92..28299d16 100644
--- a/packaging/release-notes-footer.md
+++ b/packaging/release-notes-footer.md
@@ -8,7 +8,8 @@
| Windows 10/11 (x64) | `SculptForge-…-windows-x86_64.exe` (installer) or `.zip` (portable) |
| macOS 11+ (Apple Silicon and Intel) | `SculptForge-…-darwin-universal.dmg` |
| Ubuntu / Debian / Mint / Pop!_OS | `sculptforge_…_amd64.deb` or `…_arm64.deb` |
-| Fedora / RHEL 9+ / Rocky / Alma | `sculptforge-…x86_64.rpm` or `…aarch64.rpm` |
+| Fedora / RHEL / Rocky / Alma 8+ | `sculptforge-…x86_64.rpm` or `…aarch64.rpm` |
+| Studio pipelines ([VFX Reference Platform](https://vfxplatform.com)) | `SculptForge-…-linux-…-vfx2026.tar.gz` (GCC 14.2, glibc 2.28) or `…-vfx2027.tar.gz` (glibc 2.34), with the Python 3.13 module |
| Any Linux | `SculptForge-…-linux-x86_64.AppImage` or `…-arm64.AppImage` |
| Arch Linux | `yay -S sculptforge` (AUR) |
diff --git a/packaging/rez/build.sh b/packaging/rez/build.sh
new file mode 100755
index 00000000..ef826aee
--- /dev/null
+++ b/packaging/rez/build.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+# Called by rez-build from packaging/rez with the build directory as the working directory.
+set -euo pipefail
+source_dir="$REZ_BUILD_SOURCE_PATH/../.."
+python="${SCULPTFORGE_PYTHON:-$(command -v python3 || true)}"
+python_args=(-DSCULPTFORGE_BUILD_PYTHON=OFF)
+if [ -n "$python" ]; then
+ python_args=(-DSCULPTFORGE_BUILD_PYTHON=ON "-DPython_EXECUTABLE=$python" -DSCULPTFORGE_PYTHON_INSTALL_DIR=python)
+fi
+cmake -S "$source_dir" -B . -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$REZ_BUILD_INSTALL_PATH" \
+ -DCMAKE_INSTALL_BINDIR=bin -DCMAKE_INSTALL_LIBDIR=lib "${python_args[@]}"
+cmake --build . --parallel
+ctest --output-on-failure
+if [ "${1:-}" = "install" ]; then
+ cmake --install .
+fi
diff --git a/packaging/rez/package.py b/packaging/rez/package.py
new file mode 100644
index 00000000..b9718fad
--- /dev/null
+++ b/packaging/rez/package.py
@@ -0,0 +1,26 @@
+# Rez package for studio deployment (https://github.com/AcademySoftwareFoundation/rez).
+#
+# cd packaging/rez && rez-build --install # build into your local packages
+# rez-env sculptforge -- sculptforge # run it
+# rez-env sculptforge python-3.13 -- python -c "import sculptforge"
+name = "sculptforge"
+
+version = "0.1.0"
+
+description = "Free, open-source digital sculpting with game and animation pipelines (OpenUSD, FBX, glTF, Send to Unreal)."
+
+authors = ["The SculptForge contributors"]
+
+help = [["Website", "https://islandmed.github.io/SculptForge/"], ["Docs", "https://github.com/islandmed/SculptForge#readme"]]
+
+tools = ["sculptforge", "sculptforge-cli"]
+
+# Builds with the CMake and compiler on PATH (GCC 14 for the VFX Reference Platform). The Python module is built
+# for the first python3 found; set SCULPTFORGE_PYTHON to a specific interpreter to choose.
+build_command = "bash {root}/build.sh {install}"
+
+
+def commands():
+ env.PATH.prepend("{root}/bin")
+ env.PYTHONPATH.prepend("{root}/python")
+ env.SCULPTFORGE_ROOT = "{root}"
diff --git a/src/python/module.cpp b/src/python/module.cpp
new file mode 100644
index 00000000..e3019034
--- /dev/null
+++ b/src/python/module.cpp
@@ -0,0 +1,174 @@
+// SculptForge - open source digital sculpting
+// SPDX-License-Identifier: GPL-3.0-or-later
+//
+// Python bindings (`import sculptforge`) for studio pipelines: every editor
+// command, the document's mesh data as NumPy arrays, and the tool schema.
+//
+// import sculptforge as sf
+// doc = sf.Document()
+// sf.run(doc, "new_sphere", subdivisions=5)
+// sf.run(doc, "export_usd", path="/tmp/head.usdz")
+// verts, tris = doc.vertices, doc.triangles # (N, 3) float32, (M, 3) uint32
+#include "ai/AiCommands.h"
+#include "core/Commands.h"
+#include "core/Script.h"
+
+#include <pybind11/numpy.h>
+#include <pybind11/pybind11.h>
+#include <pybind11/stl.h>
+
+#include <cstring>
+
+namespace py = pybind11;
+using namespace sf;
+
+namespace {
+
+const CommandRegistry& registry() {
+ static CommandRegistry r = [] {
+ CommandRegistry reg;
+ ai::registerAiCommands(reg, [] { return ai::AiSettings::load(ai::defaultAiSettingsPath()); });
+ return reg;
+ }();
+ return r;
+}
+
+struct CommandError : std::runtime_error {
+ using std::runtime_error::runtime_error;
+};
+
+Args toArgs(const py::kwargs& kwargs) {
+ Args args;
+ for (auto item : kwargs) {
+ const std::string key = py::cast<std::string>(item.first);
+ const py::handle value = item.second;
+ if (py::isinstance<py::bool_>(value)) args[key] = value.cast<bool>();
+ else if (py::isinstance<py::int_>(value) || py::isinstance<py::float_>(value)) args[key] = value.cast<double>();
+ else args[key] = py::cast<std::string>(py::str(value)); // str, pathlib.Path, ...
+ }
+ return args;
+}
+
+std::string run(Document& doc, const std::string& name, const py::kwargs& kwargs) {
+ const Args args = toArgs(kwargs); // touches Python objects: needs the GIL
+ CommandResult r;
+ {
+ py::gil_scoped_release release; // long operations (remesh, AI services) don't block other Python threads
+ r = registry().execute(doc, name, args);
+ }
+ if (!r.ok) throw CommandError(name + ": " + r.message);
+ return r.message;
+}
+
+py::array_t<float> vec3Array(const std::vector<glm::vec3>& v) {
+ py::array_t<float> a({py::ssize_t(v.size()), py::ssize_t(3)});
+ if (!v.empty()) std::memcpy(a.mutable_data(), v.data(), v.size() * sizeof(glm::vec3));
+ return a;
+}
+
+} // namespace
+
+PYBIND11_MODULE(sculptforge, m) {
+ m.doc() = "SculptForge: free, open-source digital sculpting - Python API for pipelines";
+ m.attr("__version__") = SCULPTFORGE_VERSION;
+ py::register_exception<CommandError>(m, "CommandError", PyExc_RuntimeError);
+
+ py::class_<Document>(m, "Document", "A scene: the sculpt mesh (with layers), Gaussian splats and edit history.")
+ .def(py::init<>())
+ .def_property_readonly("vertices", [](const Document& d) { return vec3Array(d.mesh.positions); },
+ "Current vertex positions, (N, 3) float32 (a copy).")
+ .def_property_readonly("base_vertices", [](const Document& d) { return vec3Array(d.mesh.basePositions()); },
+ "Vertex positions with every layer at zero, (N, 3) float32.")
+ .def_property_readonly("normals", [](const Document& d) { return vec3Array(d.mesh.normals); })
+ .def_property_readonly(
+ "triangles",
+ [](const Document& d) {
+ py::array_t<uint32_t> a({py::ssize_t(d.mesh.triangleCount()), py::ssize_t(3)});
+ if (d.mesh.triangleCount())
+ std::memcpy(a.mutable_data(), d.mesh.triangles.data(), d.mesh.triangleCount() * sizeof(glm::uvec3));
+ return a;
+ },
+ "Triangle vertex indices, (M, 3) uint32 (a copy).")
+ .def_property_readonly("layers",
+ [](const Document& d) {
+ py::list out;
+ for (const auto& l : d.mesh.layers) out.append(py::make_tuple(l.name, l.weight));
+ return out;
+ },
+ "Sculpt layers (blend shapes) as (name, weight) tuples.")
+ .def("layer_delta", [](const Document& d, int index) {
+ if (index < 0 || index >= int(d.mesh.layers.size())) throw py::index_error("no such layer");
+ return vec3Array(d.mesh.layers[size_t(index)].delta);
+ }, py::arg("index"), "Per-vertex offsets of a layer, (N, 3) float32.")
+ .def(
+ "set_mesh",
+ [](Document& d, py::array_t<float, py::array::c_style | py::array::forcecast> vertices,
+ py::array_t<uint32_t, py::array::c_style | py::array::forcecast> triangles) {
+ if (vertices.ndim() != 2 || vertices.shape(1) != 3 || triangles.ndim() != 2 || triangles.shape(1) != 3)
+ throw py::value_error("expected vertices (N, 3) and triangles (M, 3)");
+ Mesh mesh;
+ mesh.positions.resize(size_t(vertices.shape(0)));
+ std::memcpy(mesh.positions.data(), vertices.data(), mesh.positions.size() * sizeof(glm::vec3));
+ mesh.triangles.resize(size_t(triangles.shape(0)));
+ std::memcpy(mesh.triangles.data(), triangles.data(), mesh.triangles.size() * sizeof(glm::uvec3));
+ for (const auto& t : mesh.triangles)
+ if (t.x >= mesh.vertexCount() || t.y >= mesh.vertexCount() || t.z >= mesh.vertexCount())
+ throw py::value_error("triangle index out of range");
+ mesh.rebuildTopology();
+ mesh.recomputeAllNormals();
+ d.setMesh(std::move(mesh));
+ },
+ py::arg("vertices"), py::arg("triangles"), "Replace the sculpt with your own mesh (clears undo).")
+ .def_property_readonly("splat_count", [](const Document& d) { return d.splats.size(); })
+ .def("__repr__", [](const Document& d) {
+ return "<sculptforge.Document " + std::to_string(d.mesh.vertexCount()) + " vertices, " +
+ std::to_string(d.mesh.triangleCount()) + " triangles, " + std::to_string(d.mesh.layers.size()) +
+ " layers, " + std::to_string(d.splats.size()) + " splats>";
+ });
+
+ m.def("run", &run, py::arg("document"), py::arg("command"),
+ "Run a SculptForge command on a document, e.g. run(doc, 'remesh', resolution=256). "
+ "Returns the command's message; raises sculptforge.CommandError on failure.");
+
+ m.def(
+ "run_script",
+ [](Document& doc, const std::string& script) {
+ std::vector<ScriptStatement> statements;
+ std::string err;
+ if (!parseScript(script, statements, err)) throw CommandError(err);
+ py::list messages;
+ for (const auto& st : statements) {
+ CommandResult r;
+ {
+ py::gil_scoped_release release;
+ r = registry().execute(doc, st.command, st.args);
+ }
+ if (!r.ok) throw CommandError("line " + std::to_string(st.line) + " (" + st.command + "): " + r.message);
+ messages.append(r.message);
+ }
+ return messages;
+ },
+ py::arg("document"), py::arg("script"),
+ "Run a script in sculptforge-cli syntax: 'new_sphere subdivisions=5; export_glb path=out.glb'.");
+
+ m.def(
+ "commands",
+ [] {
+ py::list out;
+ for (const auto& c : registry().all()) {
+ py::list params;
+ for (const auto& p : c.params) {
+ const char* type = p.type == ParamSpec::Type::Bool ? "bool" : p.type == ParamSpec::Type::Number ? "number" : "string";
+ params.append(py::dict(py::arg("name") = p.name, py::arg("type") = type,
+ py::arg("description") = p.description, py::arg("required") = p.required));
+ }
+ out.append(py::dict(py::arg("name") = c.name, py::arg("description") = c.description,
+ py::arg("params") = params));
+ }
+ return out;
+ },
+ "Every available command with its parameters.");
+
+ m.def("tool_schema", [] { return registry().toolSchemaJson(); },
+ "Commands as LLM tool definitions (JSON), for wiring SculptForge into your own agents.");
+}
diff --git a/tests/test_main.cpp b/tests/test_main.cpp
index b3b102f1..7039c9a1 100644
--- a/tests/test_main.cpp
+++ b/tests/test_main.cpp
@@ -379,7 +379,8 @@ TEST(script_parser_and_pipeline) {
TEST(json_roundtrip) {
Json j;
std::string err;
- CHECK(Json::parse(R"({"a":[1,2.5,-3e2],"b":{"c":"x\"yé\n"},"d":true,"e":null})", j, err));
+ const std::string text = "{\"a\":[1,2.5,-3e2],\"b\":{\"c\":\"x\\\"y\xc3\xa9\\n\"},\"d\":true,\"e\":null}";
+ CHECK(Json::parse(text, j, err));
CHECK(j["a"].size() == 3 && j["a"][1].asNumber() == 2.5 && j["a"][2].asNumber() == -300.0);
CHECK(j["b"]["c"].asString() == "x\"y\xc3\xa9\n");
CHECK(j["d"].asBool() && j["e"].isNull() && j["missing"].isNull());
diff --git a/tests/test_python.py b/tests/test_python.py
new file mode 100644
index 00000000..374af46c
--- /dev/null
+++ b/tests/test_python.py
@@ -0,0 +1,37 @@
+# SculptForge - Python API smoke test (run by ctest when SCULPTFORGE_BUILD_PYTHON=ON).
+# SPDX-License-Identifier: GPL-3.0-or-later
+import os
+import tempfile
+
+import sculptforge as sf
+
+doc = sf.Document()
+assert "triangles" in sf.run(doc, "new_sphere", subdivisions=3)
+verts, tris = doc.vertices, doc.triangles
+assert verts.shape == (642, 3) and str(verts.dtype) == "float32", verts.shape
+assert tris.shape == (1280, 3) and str(tris.dtype) == "uint32", tris.shape
+
+sf.run(doc, "layer_add", name="Smile")
+assert doc.layers == [("Smile", 1.0)], doc.layers
+assert doc.layer_delta(0).shape == (642, 3)
+
+names = {c["name"] for c in sf.commands()}
+assert {"remesh", "export_usd", "unreal_send", "image_to_3d", "text_to_3d"} <= names, names
+
+with tempfile.TemporaryDirectory() as d:
+ out = os.path.join(d, "head.usda")
+ messages = sf.run_script(doc, f'remesh resolution=48; export_usd path="{out}"')
+ assert len(messages) == 2 and os.path.getsize(out) > 0
+
+try:
+ sf.run(doc, "open", path="/no/such/file.obj")
+ raise AssertionError("expected CommandError")
+except sf.CommandError:
+ pass
+
+# Bring your own mesh in from a pipeline.
+doc.set_mesh([[0, 0, 0], [1, 0, 0], [0, 1, 0], [0, 0, 1]], [[0, 2, 1], [0, 1, 3], [0, 3, 2], [1, 2, 3]])
+assert doc.triangles.shape == (4, 3)
+assert "Document" in repr(doc) and sf.__version__
+assert '"name":"remesh"' in sf.tool_schema()
+print("python api ok:", sf.__version__)
diff --git a/website/index.html b/website/index.html
index 1933d3ba..866e2cd8 100644
--- a/website/index.html
+++ b/website/index.html
@@ -23,6 +23,7 @@
<nav aria-label="Main">
<a href="#features">Features</a>
<a href="#demos">Demos</a>
+ <a href="#studios">Studios</a>
<a href="#download">Download</a>
<a href="https://github.com/islandmed/SculptForge#readme">Docs</a>
<a class="gh" href="https://github.com/islandmed/SculptForge">GitHub</a>
@@ -185,6 +186,7 @@
<tr><td>Image / text to 3D</td><td class="yes">Built in</td><td>No</td><td>Add-ons</td><td>No</td></tr>
<tr><td>Gaussian splats</td><td class="yes">Built in</td><td>No</td><td>Add-ons</td><td>No</td></tr>
<tr><td>AI agent control (MCP)</td><td class="yes">Built in</td><td>No</td><td>Add-ons</td><td>No</td></tr>
+ <tr><td>VFX Reference Platform builds</td><td class="yes">CY2026/27</td><td>No</td><td class="yes">Yes</td><td>No</td></tr>
</tbody>
</table>
</div>
@@ -194,6 +196,39 @@
</div>
</section>
+ <section id="studios" class="section">
+ <div class="wrap two-col">
+ <div>
+ <h2>Built for studio pipelines</h2>
+ <p>Animation, VFX and game studios run their own pipelines. SculptForge fits into them instead of
+ asking them to fit around it.</p>
+ <ul class="checks">
+ <li><strong>VFX Reference Platform CY2026 &amp; CY2027.</strong> Built and tested on Rocky Linux 8 and 9
+ with GCC 14.2, C++20 and Python 3.13.</li>
+ <li><strong>Python API</strong> (<code>import sculptforge</code>) with NumPy mesh access, plus a
+ <strong>Rez</strong> package for deployment.</li>
+ <li><strong>Native Linux</strong>, a headless CLI, farm rendering, and <strong>no licence server</strong>,
+ seats or accounts.</li>
+ <li><strong>OpenUSD, FBX and glTF</strong> in and out, with blend shapes and LODs.</li>
+ </ul>
+ <p><a href="https://github.com/islandmed/SculptForge/blob/main/docs/studios.md">Read the studio guide →</a></p>
+ </div>
+ <div>
+ <h2>Make it yours</h2>
+ <p>SculptForge is GPL-3.0. Fork it and wire it into your asset system. The GPL only asks you to share
+ source if you <em>distribute</em> a modified version outside your organisation, so in-house changes can
+ stay in-house.</p>
+ <pre class="code"><code>import sculptforge as sf
+
+doc = sf.Document()
+sf.run(doc, "open", path="troll_base.fbx")
+sf.run(doc, "remesh", resolution=320)
+sf.run(doc, "export_usd", path="troll.usda")
+verts = doc.vertices # NumPy (N, 3)</code></pre>
+ </div>
+ </div>
+ </section>
+
<section id="download" class="section alt">
<div class="wrap">
<h2>Download</h2>
diff --git a/website/style.css b/website/style.css
index f5477c36..042996cd 100644
--- a/website/style.css
+++ b/website/style.css
@@ -132,3 +132,7 @@ p { margin: 0 0 1em; }
@media (prefers-reduced-motion: reduce) {
html { scroll-behavior: auto; }
}
+
+.code { background: #0b0b0e; border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; overflow-x: auto;
+ font: 0.88rem/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: #e4e4ea; }
+.code code { background: none; padding: 0; }