Start here

Building from source

The current installation path for the native libraries, Unity plug-ins, Android target, tests, and Unreal SDK.

Prerequisites

  • CMake 3.20 or newer.
  • Ninja.
  • A vcpkg checkout with VCPKG_ROOT set.
  • A platform compiler and SDK.

vcpkg manifest mode builds FFmpeg, Draco, libcurl, OpenSSL, zlib, and nlohmann JSON. The first build can take several minutes.

Desktop native build

cd OpenVolumetricNative
cmake --preset vcpkg
cmake --build --preset vcpkg
ctest --preset vcpkg

Use -DBUILD_TESTING=OFF for a production-only configuration. Clang and GCC can run AddressSanitizer and UndefinedBehaviorSanitizer through the vcpkg-sanitizers presets.

Development container

Open the repository in Visual Studio Code and run Dev Containers: Reopen in Container. Select the vcpkg CMake preset, configure, and build. The container targets the portable Linux core; native graphics integrations require their platform SDKs.

Android ARM64

Install Android Build Support through Unity Hub and point both NDK variables at Unity’s NDK:

export ANDROID_NDK_ROOT=/path/to/Unity/PlaybackEngines/AndroidPlayer/NDK
export ANDROID_NDK_HOME="$ANDROID_NDK_ROOT"

cd OpenVolumetricNative
cmake --preset vcpkg-android-arm64
cmake --build --preset vcpkg-android-arm64

The preset targets API 29 and arm64-v8a and stages the stripped Unity library under Unity/Assets/Plugins/OpenVolumetric/Android/arm64-v8a/.

Windows

Build with MSVC on Windows. D3D11 and D3D12 cannot be produced by the Linux container. For Unreal, use vcpkg’s x64-windows-static-md triplet so static dependencies retain Unreal’s dynamic MSVC runtime.

Install the C++ SDK

cmake -S OpenVolumetricNative \
  -B OpenVolumetricNative/build/sdk \
  -G Ninja \
  -DCMAKE_BUILD_TYPE=Release \
  -DCMAKE_TOOLCHAIN_FILE="$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake" \
  -DCMAKE_INSTALL_PREFIX=/path/to/openvolumetric-sdk
cmake --build OpenVolumetricNative/build/sdk
cmake --install OpenVolumetricNative/build/sdk

A CMake consumer can then use:

find_package(OpenVolumetric CONFIG REQUIRED)
target_link_libraries(MyPlayer PRIVATE OpenVolumetric::Core)

Stage the Unreal SDK

python3 tools/stage_unreal_sdk.py \
  --sdk /path/to/openvolumetric-sdk \
  --dependencies /path/to/vcpkg_installed/TRIPLET \
  --platform Mac

Use --platform Win64 for the compatible Windows SDK. Generated staged headers and archives are ignored in source control and should be recreated or included in a binary plug-in distribution.

For exact platform commands and current triplets, consult the repository’s complete build guide.