This project has been tested only on Windows.
All parts of the MDL-SDK can be built through configurations generated by CMake. The recommended way to do this is through the CMake GUI. Below are some notes which may address issues that arise from configuring CMake.
- It requires
vcpkgto manage and retrieve dependencies.- If CMake cannot find the vcpkg toolchain automatically, set
CMAKE_TOOL_CHAINfile as the path to the vcpkg binary. - If
vcpkgwas cloned locally, then setCMAKE_TOOL_CHAINto<PATH TO VCPKG>/scripts/buildsystems/vcpkg.cmake.
- If CMake cannot find the vcpkg toolchain automatically, set
- Boost and OpenImageIO are additional dependencies, which should be installed with
vcpkg:- Use the following commands:
vcpkg install --triplet=x64-windows-static boost-any vcpkg install --triplet=x64-windows-static boost-uuid vcpkg install --triplet=x64-windows-static openimageio[gif,openjpeg,tools,webp]
- Use the following commands:
- GLFW is an additional dependency:
- Installing the
glfw3package fromvcpkgmight work. - Otherwise, build AND install glfw3 from source (with CMake) and set
glfw3_DIRto<GLFW BUILD DIR>/install/x64-Release/lib/cmake/glfw3
- Installing the
- The following options can be disabled for the purposes of this project:
MDL_BUILD_DOCUMENTATIONMDL_ENABLE_CUDA_EXAMPLESMDL_ENABLE_OPENGL_EXAMPLESMDL_ENABLE_QT_EXAMPLES
- Python (3.12+ works) should be installed in your system.
- DXC is required:
- Set
DXR_DIRto the folder which contains thebin,libandincludedirectories. - See the release page to download DXC.
- Set
- LLVM is required (12.0.1 works)
- If CMake is not automatically finding
clang_PATHthen set it as the path to theclangexecutable. - The LLVM version must be the SAME as the clang version; otherwise, there may be errors with examples being unable to parse
libbsdf.
- If CMake is not automatically finding
- If there are linking errors with
OGLCompiler.lib, then its safe to remove all references to it from any CMake files- This should already be done, but regardless this library should not be needed
To interface with Slang, download the latest Slang release and extract it into the root directory of this repository. This is necesary for the DXR and df_vulkan examples below.
Notes:
- DXR app requires 32 derivative samples from textures:
--enable_derivs --tex_res 32

