Precompiled release builds for Windows can be found at https://github.com/jaaamesey/SUSMA/releases.
https://www.youtube.com/watch?v=RAlXO2y42c0
https://github.com/jaaamesey/SUSMA/blob/main/13203260_Thesis.pdf
This application is a Godot project that hooks into custom C++ code through the GDExtension API.
The OpenVDB C++ library is used for rasterizing the internal SDF representation of the sculpt to a grid, and converting it to a polygonal mesh that Godot can display. It is also used for converting meshes to SDF
C++ code is located inside /cpp/src/
, with the Godot project sitting at the root of the repository.
In general, C++ is only used for:
- Handling the internal SDF representation of the sculpt
- Rasterizing that representation to a grid and mesh through OpenVDB
Godot and GDScript (its bespoke scripting language) is used for everything else, including:
- Rendering the rasterized mesh
- UI
- Handling input
- VR support
The following steps assume you're on Windows (x86_64). This project has not been tested on other platforms, but should in theory still compile with some tweaking.
Ensure the repository is cloned recursively, i.e. submodules such as godot-cpp are included:
git clone --recursive https://github.com/jaaamesey/ImplicitSurfaceSculpting
- Install scons with
pip install scons
- this requires python3 - Ensure VS build tools are installed, with
"Desktop development with C++" selected during installation
- If not on Windows, just ensure you have g++ or clang installed
- Install OpenVDB and its dependencies, preferably through vcpkg like so:
- Clone https://github.com/microsoft/vcpkg to
./_ignore/
- Run the included bootstrap script (
./_ignore/vcpkg/bootstrap-vcpkg.bat
on Windows) - Install openvdb through vcpkg:
If you're not on Windows, not using vcpkg to install openvdb, or not installing it to
./_ignore/vcpkg/vcpkg install openvdb:x64-windows # Use the relevant version for your OS
/_ignore/
, you may also need to modify the paths defined incpp/SConstruct
to reflect its actual install location. - Copy the contents of
./_ignore/vcpkg/installed/x64-windows/bin
to./bin/
.
- Clone https://github.com/microsoft/vcpkg to
- From the root of the repository, run:
This will generate C++ bindings for Godot.
cd ./cpp/godot-cpp scons
- Run:
This will build the necessary C++ code for the application.
cd ../ # Navigates to cpp/ scons
- Download Godot 4.1. It might be easiest to move the executable to
./_ignore/
, and rename it to something likegodot.exe
. - From the root of the repository, run the Godot editor:
It will then take some time to import assets.
./_ignore/godot.exe --editor
- Once the editor has finished importing, click the play button in the top right to confirm that the application works.
Once these steps are complete, you can run the project without the editor with ./_ignore/godot.exe
.
- When any files inside
cpp/src/
are modified, you will need to runscons
in that directory to re-build the C++ code. The Godot editor should probably be closed whilst this is happening. - If for some reason files inside
cpp/godot-cpp/
have been modified, you will need to runscons
again in bothcpp/godot-cpp/
andcpp/src/
. - Changes to standard Godot files (
.gd
,.tscn
, etc) will not require a re-build, as GDScript is an interpreted language.