CVT is a bgfx/GLFW-based viewer for colloid and particle trajectory files. This is still somewhat experimental, but feel free to try it out. A set of sample configuration files are given in the TestInputFiles folder.
DISCLAIMER: Please not that any analysis provided by this tool is intended for quick exploration, and to more easily understand any structure you see in the visualized snapshots. Analysis outputs are not intended for direct publication. If you see something interesting, please run your own version of the analysis to make sure results are fully correct.
For more information, and a link to directly install this for Windows from the Microsoft store, see the website.
For a typical fresh setup:
git clone --recurse-submodules https://github.com/FSmallenburg/CVT
cd CVTThen build CVT using the preset for your platform:
- Linux:
cmake --preset releasethencmake --build --preset release - Windows (MSYS2 MinGW64):
cmake --preset mingw-releasethencmake --build --preset build-mingw-release - macOS:
cmake --preset macos-releasethencmake --build --preset build-macos-release
Note that the first build may take some time.
You can use compileshaders.sh to recompile the shaders, but in principle this should happen during the cmake build.
bgfx, bx, and bimg are bundled as nested submodules inside third_party/bgfx.cmake
and are compiled automatically by cmake --build. No separate pre-build step is needed.
For a fresh checkout, prefer:
git clone --recurse-submodules <repo-url>If you already have the repo, pull and refresh submodules with:
git pull --recurse-submodules
git submodule update --init --recursiveCompile the runtime shaders manually before the first run only if you are not using the CMake build targets:
./compileshaders.shNote:
compileshaders.shneeds ashadercbinary to compile the shaders. It searches several known locations automatically (including the project build directories andthird_party/bgfx.cmake/bgfx/tools/bin/<platform>/shaderc). Ifshadercis not found, the script will build it automatically fromthird_party/bgfx.cmakeintobuild-shaderc/using CMake — no manual bgfx tool build is required. You can override the binary path with theSHADERCenvironment variable.
Install a C++ toolchain plus the GLFW and pkg-config development packages. For example on Debian/Ubuntu:
sudo apt install build-essential cmake ninja-build pkg-config libglfw3-devLinux presets are already included in CMakePresets.json:
cmake --preset debug
cmake --build --preset debug
cmake --preset release
cmake --build --preset releaseYou can also configure manually:
cmake -S . -B build-release -G Ninja -DCMAKE_BUILD_TYPE=Release
cmake --build build-release./build-release/cvt TestInputFiles/polydisperse.osphThe current project presets are set up for MSYS2 MinGW64. Install at least from an MSYS2 MinGW64 shell:
pacman -S --needed mingw-w64-x86_64-gcc mingw-w64-x86_64-cmake \
mingw-w64-x86_64-ninja mingw-w64-x86_64-pkgconf mingw-w64-x86_64-glfwUse the included presets:
cmake --preset mingw-release
cmake --build --preset build-mingw-release.\build-release\cvt.exe TestInputFiles\polydisperse.osphInstall Xcode Command Line Tools and Homebrew packages:
xcode-select --install
brew install cmake ninja pkg-config glfwA dedicated macOS preset is included:
cmake --preset macos-release
cmake --build --preset build-macos-releaseYou can still configure manually if needed:
cmake -S . -B build-mac-release -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_PREFIX_PATH="$(brew --prefix)"
cmake --build build-mac-releaseOn Apple Silicon, set the architecture explicitly if needed:
cmake -S . -B build-mac-release -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_PREFIX_PATH="$(brew --prefix)" \
-DCMAKE_OSX_ARCHITECTURES=arm64
cmake --build build-mac-release./build-mac-release/cvt TestInputFiles/polydisperse.osphTry recompiling the shaders:
./compileshaders.shand confirm that the expected directories exist under shaders/:
glsl/dxbc/(Windows)metal/(macOS)
Install GLFW development files and make sure CMake can find either:
- a
glfw/glfw3CMake target, or glfw3throughpkg-config
© 2026 Frank Smallenburg. Released under the MIT License.