Build guide
F3D uses a CMake based build system, so building F3D just requires installing needed dependencies, configuring and building. If you are not used to such processes please take a look at our getting started guide.
Dependencies
- CMake >= 3.1.
- VTK >= 9.2.6 (9.3.1 recommended).
- A C++17 compiler.
- A CMake-compatible build system (Visual Studio, XCode, Ninja, Make, etc.).
- Optionally, Assimp >= 5.0.
- Optionally, Open CASCADE OCCT >= 7.5.2.
- Optionally, Alembic >= 1.7.
- Optionally, OpenUSD >= 23.05.
- Optionally, OpenVDB >= 10.0.0, enable
IOOpenVDB
VTK module. - Optionally, Draco >= 1.5.
- Optionally, Python >= 3.6 and pybind11 >= 2.2.
- Optionally, Java >= 18.
- Optionally, OpenEXR >= 3.0.
VTK compatibility
As stated in the dependencies, F3D is compatible with VTK >= 9.2.6, however, some features may not be available. We suggest using VTK 9.3.1 with RenderingRayTracing, RenderingExternal, IOExodus and IOOpenVDB modules enabled in order to get as many features as possible in F3D.
Configuration and building
Configure and generate the project with CMake, then build the software using your build system.
Here is some CMake options of interest:
F3D_BUILD_APPLICATION
: Build the F3D executable.BUILD_TESTING
: Enable the tests.F3D_MACOS_BUNDLE
: On macOS, build a.app
bundle.F3D_WINDOWS_GUI
: On Windows, build a Win32 application (without console).F3D_WINDOWS_BUILD_SHELL_THUMBNAILS_EXTENSION
: On Windows, build the shell thumbnails extension.F3D_PLUGINS_STATIC_BUILD
: Build all plugins as static library (embedded intolibf3d
) and automatically loaded by the application. Incompatible withF3D_MACOS_BUNDLE
.BUILD_SHARED_LIBS
: Build the libf3d and all plugins as static library (embedded intof3d
executable). Thelibrary
andplugin_sdk
component will not be installed.
Some modules, plugins and bindings depending on external libraries can be optionally enabled with the following CMake variables:
F3D_MODULE_RAYTRACING
: Support for raytracing rendering. Requires that VTK has been built withOSPRay
andVTK_MODULE_ENABLE_VTK_RenderingRayTracing
turned on. Disabled by default.F3D_MODULE_EXTERNAL_RENDERING
: Support for external render window. Requires that VTK has been built withVTK_MODULE_ENABLE_VTK_RenderingExternal
turned on. Disabled by default.F3D_MODULE_EXR
: Support for OpenEXR images. RequiresOpenEXR
. Disabled by default.F3D_PLUGIN_BUILD_EXODUS
: Support for ExodusII (.ex2) file format. Requires that VTK has been built withIOExodus
module (andhdf5
). Enabled by default.F3D_PLUGIN_BUILD_OCCT
: Support for STEP, IGES, BREP, and XBF file formats. RequiresOpenCASCADE
. Disabled by default.F3D_PLUGIN_BUILD_ASSIMP
: Support for FBX, DAE, OFF, DXF, X and 3MF file formats. RequiresAssimp
. Disabled by default.F3D_PLUGIN_BUILD_ALEMBIC
: Support for ABC file format. RequiresAlembic
. Disabled by default.F3D_PLUGIN_BUILD_DRACO
: Support for DRC file format. RequiresDraco
. Disabled by default.F3D_PLUGIN_BUILD_USD
: Support for USD file format. RequiresOpenUSD
. Disabled by default.F3D_PLUGIN_BUILD_VDB
: Support for VDB file format. Requires that VTK has been built withIOOpenVDB
module (andOpenVDB
). Disabled by default.F3D_BINDINGS_PYTHON
: Generate python bindings (requiresPython
andpybind11
). Disabled by default.F3D_BINDINGS_JAVA
: Generate java bindings (requiresJava
andJNI
). Disabled by default.
VCPKG
It’s possible to use VCPKG to automatically build dependencies. A manifest file vcpkg.json
is available at your convenience. Please read VCPKG documentation.
Basically, just install VCPKG, and configure F3D using -DCMAKE_TOOLCHAIN_FILE=[path to vcpkg]/scripts/buildsystems/vcpkg.cmake
option.
Installing
Installation can be done through CMake, by running the following command:
cmake --install ${your_build_dir}
Individual components can also be installed by specifying the component name:
cmake --install ${your_build_dir} --component ${component_name}
Here is the list of all the components:
Name | Installed by default | Operating system | Description |
---|---|---|---|
application | YES | ALL | F3D application. |
configuration | NO | ALL | Default configuration files, config and thumbnail . |
library | YES | ALL | libf3d library binaries. |
plugin | YES | ALL | libf3d plugins. |
dependencies | NO | ALL | libf3d runtime dependencies. Can be used to create a self-contained and relocatable package. System libraries are excluded. |
sdk | NO | ALL | libf3d SDK (headers and CMake config files) for library and application find_package components. |
plugin_sdk | NO | ALL | libf3d plugin SDK (headers and CMake config files including macros) for pluginsdk find_package components. |
licenses | YES | ALL | F3D and third party licenses. |
documentation | YES | Linux | man documentation. |
shellext | YES | Windows/Linux | Desktop integration. |
python | YES | ALL | Python bindings. |
java | YES | ALL | Java bindings. |
mimetypes | NO | Linux | Plugins mimetype XML files for integration with Freedesktop. |
assets | YES | Linux | Assets for integration with Freedesktop. |
colormaps | NO | ALL | Color maps presets, see documentation |