Skip to content

Commit

Permalink
MDL SDK 2024.0.1 (377400.2109)
Browse files Browse the repository at this point in the history
  • Loading branch information
jreichel-nvidia committed Jul 22, 2024
1 parent a71786e commit 203d514
Show file tree
Hide file tree
Showing 982 changed files with 66,521 additions and 46,948 deletions.
301 changes: 301 additions & 0 deletions CHANGELOG.md

Large diffs are not rendered by default.

31 changes: 23 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ endif()

#--------------------------------------------------------------------------------------------------
# configuration options
option(MDL_BUILD_SDK "Build the MDL SDK, otherwise only Core." ON)
option(MDL_BUILD_SDK_EXAMPLES "Adds MDL SDK examples to the build." ON)
option(MDL_BUILD_CORE_EXAMPLES "Adds MDL Core examples to the build." ON)
option(MDL_BUILD_ARNOLD_PLUGIN "Enable the build of the MDL Arnold plugin." OFF)
Expand All @@ -92,16 +93,25 @@ endif()
# general setup
include(${MDL_BASE_FOLDER}/cmake/setup.cmake)

# if the SDK is not build, also disable...
if(NOT MDL_BUILD_SDK)
set(MDL_BUILD_SDK_EXAMPLES OFF CACHE BOOL "" FORCE) # the SDK examples
set(MDL_ENABLE_PYTHON_BINDINGS OFF CACHE BOOL "" FORCE) # the SDK Bindings
set(MDL_BUILD_ARNOLD_PLUGIN OFF CACHE BOOL "" FORCE) # the Arnold Plugin
endif()

if(MDL_LOG_PLATFORM_INFOS)
MESSAGE(STATUS "[INFO] MDL_BUILD_SDK: ${MDL_BUILD_SDK}")
MESSAGE(STATUS "[INFO] MDL_BUILD_SDK_EXAMPLES: ${MDL_BUILD_SDK_EXAMPLES}")
MESSAGE(STATUS "[INFO] MDL_BUILD_CORE_EXAMPLES: ${MDL_BUILD_CORE_EXAMPLES}")
MESSAGE(STATUS "[INFO] MDL_BUILD_ARNOLD_PLUGIN: ${MDL_BUILD_ARNOLD_PLUGIN}")
MESSAGE(STATUS "[INFO] MDL_BUILD_OPENIMAGEIO_PLUGIN: ${MDL_BUILD_OPENIMAGEIO_PLUGIN}")
MESSAGE(STATUS "[INFO] MDL_BUILD_DDS_PLUGIN: ${MDL_BUILD_DDS_PLUGIN}")
MESSAGE(STATUS "[INFO] MDL_ENABLE_PYTHON_BINDINGS: ${MDL_ENABLE_PYTHON_BINDINGS}")
endif()

# enable CTest if requested
if(MDL_ENABLE_TESTS OR MDL_ENABLE_UNIT_TESTS)
if(MDL_ENABLE_UNIT_TESTS)
enable_testing()
endif()

Expand Down Expand Up @@ -137,7 +147,9 @@ if (MDL_BUILD_SDK_EXAMPLES OR MDL_BUILD_CORE_EXAMPLES)
endif()

# Shared code used by MDL SDK examples, Python bindings, and other tools
add_subdirectory(${MDL_EXAMPLES_FOLDER}/mdl_sdk/shared)
if(MDL_BUILD_SDK)
add_subdirectory(${MDL_EXAMPLES_FOLDER}/mdl_sdk/shared)
endif()

# MDL SDK
if(MDL_BUILD_SDK_EXAMPLES)
Expand Down Expand Up @@ -177,11 +189,7 @@ if(MDL_BUILD_SDK_EXAMPLES)
if(MDL_ENABLE_OPENGL_EXAMPLES)
add_subdirectory(${MDL_EXAMPLES_FOLDER}/mdl_sdk/df_cuda)
if(MDL_ENABLE_OPTIX7_EXAMPLES)
if(WINDOWS)
add_subdirectory(${MDL_EXAMPLES_FOLDER}/mdl_sdk/optix7)
else()
message(WARNING "The OptiX 7 example is currently only available for Windows.")
endif()
add_subdirectory(${MDL_EXAMPLES_FOLDER}/mdl_sdk/optix7)
endif()
endif()
endif()
Expand All @@ -199,6 +207,7 @@ endif()
if(MDL_BUILD_CORE_EXAMPLES)
add_subdirectory(${MDL_EXAMPLES_FOLDER}/mdl_core/shared)
add_subdirectory(${MDL_EXAMPLES_FOLDER}/mdl_core/calls)
add_subdirectory(${MDL_EXAMPLES_FOLDER}/mdl_core/code_gen)
if(MDL_ENABLE_CUDA_EXAMPLES)
add_subdirectory(${MDL_EXAMPLES_FOLDER}/mdl_core/execution_cuda)
if(MDL_ENABLE_OPENGL_EXAMPLES)
Expand Down Expand Up @@ -236,15 +245,21 @@ if(MDL_BUILD_DOCUMENTATION)
add_subdirectory(${MDL_DOC_FOLDER}/mdl_sdkapi ${CMAKE_BINARY_DIR}/doc/mdl_sdkapi)
add_custom_target(doc ALL DEPENDS doc-mdl_coreapi doc-mdl_sdkapi)
set_target_properties(doc PROPERTIES PROJECT_LABEL "ALL" FOLDER "doc")
install(DIRECTORY ${MDL_DOC_FOLDER}/mdl_coreapi/html DESTINATION doc/mdl_coreapi)
install(DIRECTORY ${MDL_DOC_FOLDER}/mdl_sdkapi/html DESTINATION doc/mdl_sdkapi)
endif()

install(FILES ${MDL_DOC_FOLDER}/index.html DESTINATION doc)
foreach(_DIRECTORY base_module core_definitions css images js specification)
install(DIRECTORY ${MDL_DOC_FOLDER}/${_DIRECTORY} DESTINATION doc)
endforeach()


# add tests with the POST option; there require all regular targets to be defined already
foreach(_TEST_POST ${MDL_TEST_LIST_POST})
add_subdirectory(${_TEST_POST})
endforeach()


# Config
#--------------------------------------------------------------------------------------------------
set(mdl_config_cmake_in_dir "${CMAKE_CURRENT_SOURCE_DIR}")
Expand Down
114 changes: 73 additions & 41 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ particular development environment. It is required to use CMake 3.12 or later
(3.21 or later on Windows), which can be downloaded from the
[CMake Website](https://cmake.org/download/). When using a Unix-like system,
you can install the *cmake* package using the respective package management
systems. On the Mac OS X platform, third party dependencies can be resolved
using the [Homebrew Package Manager](https://brew.sh/index_de).
systems.


## Dependencies
Expand All @@ -29,7 +28,7 @@ might work as well.
<a name="thirdparty-dependencies-libs"></a>
The following third-party libraries and tools are required to build the MDL SDK:

- <a name="vcpkg">**vcpkg**</a> *(git commit ID fe1e9f5)*
- <a name="vcpkg">**vcpkg**</a> *(git commit ID 5d675c7e5)*
[Vcpkg](https://vcpkg.io/en/getting-started.html) is the recommended way to
install other dependencies like Boost, OpenImageIO, GLEW, and GLFW. The
vcpkg version mentioned above corresponds to the versions mentioned for
Expand All @@ -42,17 +41,17 @@ The following third-party libraries and tools are required to build the MDL SDK:
for further details. Add the vcpkg option *--triplet=x64-windows-static* to
the *install* command. There is no need to run the *integrate* command.

- **Boost** *(1.83.0)*
- **Boost** *(1.84.0)*
Installation via [vcpkg](#vcpkg) is strongly recommended. Install the vcpkg
packages *boost-any* and *boost-uuid*.
package *boost-headers*.

- **OpenImageIO** *(2.4.14.0)*
- **OpenImageIO** *(2.5.8.0)*
Installation via [vcpkg](#vcpkg) is strongly recommended. Install the vcpkg
packages *openimageio[gif,openjpeg,tools,webp]*.

- **Python3** *(3.8.0)*
- **Python3** *(3.10.0)*
Linux: Install the *python* package.
Windows and Max OS X: Download and install Python 3.8 from
Windows and Max OS X: Download and install Python 3.10 from
[python.org](https://www.python.org/downloads/).

- **Clang** *(12.0.1)*
Expand All @@ -79,11 +78,17 @@ The following tools are used to build the API reference documentation:
For generating and compiling the MDL Python Bindings, the following additional
dependencies are required:

- **Python3 Development Package** *(3.8.0)*
- **Python3 Development Package** *(3.10.0)*
Linux: Install the *python-dev* package in addition to *python*.
Windows and Max OS X: Download and install Python 3.8 from
Windows and Max OS X: Download and install Python 3.10 from
[python.org](https://www.python.org/downloads/).

- **Python3 Additional Packages**
The following pip packages are used by the bindings or examples:
* [coverage](https://pypi.org/project/coverage/) for creating test reports
* [numpy](https://pypi.org/search/?q=numpy) for high-level bindings
* [typing_extensions](https://pypi.org/project/typing-extensions/) in case the bindings are generated for Python 3.9 (or earlier)

- **SWIG** *(4.0.2)*
Follow the instructions for downloading or building on
[swig.org](http://www.swig.org/download.html).
Expand All @@ -108,7 +113,7 @@ of examples is of no interest to you.
Installation via [vcpkg](#vcpkg) is strongly recommended. Install the vcpkg
package *glew*.

- **GLFW** *(3.3.8)*
- **GLFW** *(3.4)*
This dependency is required for all OpenGL- and Vulkan-based examples.
Installation via [vcpkg](#vcpkg) is strongly recommended. Install the vcpkg
package *glfw3*.
Expand All @@ -118,11 +123,12 @@ of examples is of no interest to you.
Please follow the instructions on the
[CUDA Developer Website](https://developer.nvidia.com/cuda-toolkit).

- **Vulkan SDK** *(1.2.198.1)*
- **Vulkan SDK** *(Windows: 1.3.275.0, Linux: 1.2.198.1)*
This dependency is required for all Vulkan-based examples.
Please follow the instructions on the
[Vulkan SDK Website](https://vulkan.lunarg.com/sdk/home).
For debug builds on Windows, the debug libraries are required to be installed.
For debug builds on Windows, the debug libraries are required to be installed.
Note that the prebuilt binaries for version 1.3.275.0 do not work on CentOS 7.x.

The following third-party dependencies are only used by fewer or single
examples, or add additional features to other examples. Installation can be
Expand All @@ -135,7 +141,7 @@ features.
[Arnold Website](https://www.arnoldrenderer.com/arnold/download/) to
download the Arnold SDK.

- **MaterialX** *(github repository, tag: v1.38.7, Windows only)*
- **MaterialX** *(github repository, tag: v1.38.9, Windows only)*
This dependency adds MaterialX support to the DXR example.
Please download a release from
[github](https://github.com/AcademySoftwareFoundation/MaterialX/releases).
Expand Down Expand Up @@ -232,7 +238,7 @@ features.
for example: *C:/Qt/5.10.1/msvc2017_64*

- **VULKAN_SDK_DIR** in Ungrouped Entries (only if the environment variable VULKAN_SDK is not set),
for example: *C:/VulkanSDK/1.2.198.1*
for example: *C:/VulkanSDK/1.3.275.0*

- **PANTORA_AXF_DIR** in Ungrouped Entries,
for example: *C:/projects/thirdparty/pantora-axf-1.9.0*
Expand Down Expand Up @@ -507,18 +513,66 @@ features.
## Additional CMake Options

<a name="cmake-options"></a>
The following options enable you to select the components to be built and to
select particular logging information:
The following options enable you to select the components to be built:

- **MDL_BUILD_SDK**
[ON/OFF] enable/disable the MDL SDK itself. Disabling the MDL SDK can be
useful if you are only interested in MDL Core.

- **MDL_BUILD_OPENIMAGEIO_PLUGIN**
[ON/OFF] enable/disable the OpenImageIO plugin. Disabling the OpenImageIO
plugin can be useful for advanced integrations to avoid the dependency on
OpenImageIO.

- **MDL_BUILD_SDK_EXAMPLES**
[ON/OFF] enable/disable the MDL SDK examples.
[ON/OFF] enable/disable the MDL SDK examples (see also below for ways to
enable/disable examples based on their required thirdparty dependencies).

- **MDL_BUILD_CORE_EXAMPLES**
[ON/OFF] enable/disable the MDL Core examples.
[ON/OFF] enable/disable the MDL Core examples (see also below for ways to
enable/disable examples based on their required thirdparty dependencies).

- **MDL_BUILD_DOCUMENTATION**
[ON/OFF] enable/disable building of the API documentation.

- **MDL_ENABLE_UNIT_TESTS**
[ON/OFF] enable/disable the build of unit tests.

- **MDL_ENABLE_PYTHON_BINDINGS**
[ON/OFF] enable/disable the generation and compilation of the MDL Python
Bindings.

The following options enable you to select particular logging information
useful for debugging the CMake setup:

- **MDL_LOG_PLATFORM_INFOS**
[ON/OFF] enable/disable the logging of platform and CMake settings.

- **MDL_LOG_DEPENDENCIES**
[ON/OFF] enable/disable the logging of dependencies of the individual targets.

- **MDL_LOG_FILE_DEPENDENCIES**
[ON/OFF] enable/disable the logging of files that are copied to the output folder.

For any help request, please attach the log messages generated when the log
options are enabled.

The following options affect how various components are built:

- **MDL_TREAT_RUNTIME_DEPS_AS_BUILD_DEPS**
[ON/OFF] enable/disable treating runtime dependencies as build
dependencies. Enabling this option results in slightly slower builds, but
is safer for users not familiar with the runtime dependencies between
examples, libraries, and plugins.

- **MDL_MSVC_DYNAMIC_RUNTIME_EXAMPLES**
[ON/OFF] links the MSVC dynamic runtime (/MD) instead of static (/MT) when
creating the example executables.

The following options enable you to select the examples to be built based on
their required thirdparty dependencies (see also **MDL_BUILD_SDK_EXAMPLES**
and **MDL_BUILD_CORE_EXAMPLES** above):

- **MDL_ENABLE_CUDA_EXAMPLES**
[ON/OFF] enable/disable examples that require CUDA.

Expand All @@ -540,34 +594,12 @@ select particular logging information:
- **MDL_ENABLE_AXF_EXAMPLES**
[ON/OFF] enable/disable the AxF to MDL example.

- **MDL_ENABLE_PYTHON_BINDINGS**
[ON/OFF] enable/disable the generation and compilation of the MDL Python Bindings.

- **MDL_BUILD_ARNOLD_PLUGIN**
[ON/OFF] enable/disable the build of the MDL Arnold Plugin.

- **MDL_ENABLE_MATERIALX**
[ON/OFF] enable/disable MaterialX in examples that support it.

- **MDL_ENABLE_UNIT_TESTS**
[ON/OFF] enable/disable the build of unit tests.

- **MDL_LOG_PLATFORM_INFOS**
[ON/OFF] enable/disable the logging of platform and CMake settings.

- **MDL_LOG_DEPENDENCIES**
[ON/OFF] enable/disable the logging of dependencies of the individual targets.

- **MDL_LOG_FILE_DEPENDENCIES**
[ON/OFF] enable/disable the logging of files that are copied to the output folder.

- **MDL_MSVC_DYNAMIC_RUNTIME_EXAMPLES**
[ON/OFF] links the MSCV dynamic runtime (/MD) instead of static (/MT) when
creating the example executables.

For any help request, please attach the log messages generated when the log
options are enabled.


## Testing the Build

Expand Down
75 changes: 0 additions & 75 deletions LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,78 +26,3 @@ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


Images and Resource Files License
---------------------------------

The following images are licensed under the
[Creative Commons Attribution-NoDerivatives 4.0 International License](http://creativecommons.org/licenses/by-nd/4.0/)
![Creative Commons License](https://i.creativecommons.org/l/by-nd/4.0/80x15.png):

* [doc/images/mdl_material_examples.jpg](doc/images/mdl_material_examples.jpg)
* [doc/images/mdl_local_coordinates.jpg](doc/images/mdl_local_coordinates.jpg)
* [doc/images/mdl_icon.png](doc/images/mdl_icon.png)

Images (.png, .jpg and .hdr file extensions), lightprofile
files (.ies file extension), and BSDF measurement files (.mbsdf file extension) in the
[examples/mdl/nvidia/](examples/mdl/nvidia/) directory, are collectively called MDL Example
Resources and are licensed under the
[CC0 1.0 Universal Public Domain Dedication](http://creativecommons.org/publicdomain/zero/1.0/).
![CC0 License](https://licensebuttons.net/p/zero/1.0/80x15.png)
To the extent possible under law, NVIDIA Corporation has waived all copyright
and related or neighboring rights to the MDL Example Resources.


Copyrights and Licenses for Third-Party Software in the MDL SDK
===============================================================

The MDL SDK software contains code written by third parties. Such software will
have its own individual license file in the directory in which it appears.
This file will describe the copyrights, license, and restrictions which apply
to that code.

The following pieces of software have additional or alternate copyrights,
licenses, and/or restrictions:

* LLVM: [src/mdl/jit/llvm/dist/LICENSE.TXT](src/mdl/jit/llvm/dist/LICENSE.TXT)
* libzip: [src/base/lib/libzip/](src/base/lib/libzip/)
* zlib: [src/base/lib/zlib/README](src/base/lib/zlib/README)
* robin_hood: [src/base/lib/robin_hood/LICENSE](src/base/lib/robin_hood/LICENSE)
* Coco/R: [src/mdl/compiler/coco/LICENSE](src/mdl/compiler/coco/LICENSE) (1)
* tinyxml2:
[src/base/lib/tinyxml2/tinyxml2.h](src/base/lib/tinyxml2/tinyxml2.h)
[src/base/lib/tinyxml2/tinyxml2.cpp](src/base/lib/tinyxml2/tinyxml2.cpp)
[examples/thirdparty/tinyxml2/include/tinyxml2.h](examples/thirdparty/tinyxml2/include/tinyxml2.h)
[examples/thirdparty/tinyxml2/src/tinyxml2.cpp](examples/thirdparty/tinyxml2/src/tinyxml2.cpp)
* Dear ImGui with stb: [examples/thirdparty/imgui/LICENSE.txt](examples/thirdparty/imgui/LICENSE.txt) (2)
* D3DX12 Helper Library: [examples/thirdparty/d3dx12/license.txt](examples/thirdparty/d3dx12/license.txt) (2)
* fx-gltf: [examples/thirdparty/gltf/fx/license.txt](examples/thirdparty/gltf/fx/license.txt) (2)
* nlohmann/json: [examples/thirdparty/gltf/nlohmann/license.txt](examples/thirdparty/gltf/nlohmann/license.txt) (2)
* Google Noto Fonts: [examples/thirdparty/content/fonts/LICENSE.txt](examples/thirdparty/content/fonts/LICENSE.txt) (2)

The documentation uses the following fonts, CSS, and JavaScript frameworks with
additional or alternate copyrights, licenses, and/or restrictions:

* jQuery v3.6.4: [doc/js/jquery/jquery-3.6.4.min.js](doc/js/jquery/jquery-3.6.4.min.js), see https://jquery.org/license
* jQuery v3.7.0: [doc/base_module/ext/jquery/jquery-3.7.0.min.js](doc/base_module/ext/jquery/jquery-3.7.0.min.js),
[doc/core_definitions/ext/jquery/jquery-3.7.0.min.js](doc/core_definitions/ext/jquery/jquery-3.7.0.min.js), see https://jquery.org/license
* jQuery UI v1.12.1: [doc/base_module/ext/jquery/jquery-ui-1.12.1.custom/LICENSE.txt](doc/base_module/ext/jquery/jquery-ui-1.12.1.custom/LICENSE.txt),
[doc/core_definitions/ext/jquery/jquery-ui-1.12.1.custom/LICENSE.txt](doc/core_definitions/ext/jquery/jquery-ui-1.12.1.custom/LICENSE.txt)
* Linux Libertine font: [doc/css/linux-libertine/SIL Open Font License.txt](doc/css/linux-libertine/SIL Open Font License.txt),
[doc/base_module/ext/fonts/linux-libertine/SIL Open Font License.txt](doc/base_module/ext/fonts/linux-libertine/SIL Open Font License.txt),
[doc/core_definitions/ext/fonts/linux-libertine/SIL Open Font License.txt](doc/core_definitions/ext/fonts/linux-libertine/SIL Open Font License.txt)
* Noto Sans font: [doc/css/noto-sans/OFL.txt](doc/css/noto-sans/OFL.txt),
[doc/base_module/ext/fonts/noto-sans/OFL.txt](doc/base_module/ext/fonts/noto-sans/OFL.txt),
[doc/core_definitions/ext/fonts/noto-sans/OFL.txt](doc/core_definitions/ext/fonts/noto-sans/OFL.txt)
* Roboto Mono font: [doc/css/roboto-mono/LICENSE.txt](doc/css/roboto-mono/LICENSE.txt),
[doc/base_module/ext/fonts/roboto-mono/LICENSE.txt](doc/base_module/ext/fonts/roboto-mono/LICENSE.txt),
[doc/core_definitions/ext/fonts/roboto-mono/LICENSE.txt](doc/core_definitions/ext/fonts/roboto-mono/LICENSE.txt)

**Notes**

(1) Coco/R is only used for code generation in the build process and is not
integrated by itself in the MDL SDK binaries.

(2) Dear ImGui, stb, D3DX12, fx-gltf, nlohmann/json, and the Google Noto Fonts are only used in the examples
and are not integrated by themselves in the MDL SDK binaries.
19 changes: 19 additions & 0 deletions LICENSE_IMAGES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyrights and Licenses for Images and Resource Files in the MDL SDK
====================================================================

The following images are licensed under the
[Creative Commons Attribution-NoDerivatives 4.0 International License](http://creativecommons.org/licenses/by-nd/4.0/)
![Creative Commons License](https://i.creativecommons.org/l/by-nd/4.0/80x15.png):

* [doc/images/mdl_material_examples.jpg](doc/images/mdl_material_examples.jpg)
* [doc/images/mdl_local_coordinates.jpg](doc/images/mdl_local_coordinates.jpg)
* [doc/images/mdl_icon.png](doc/images/mdl_icon.png)

Images (.png, .jpg and .hdr file extensions), lightprofile
files (.ies file extension), and BSDF measurement files (.mbsdf file extension) in the
[examples/mdl/nvidia/](examples/mdl/nvidia/) directory, are collectively called MDL Example
Resources and are licensed under the
[CC0 1.0 Universal Public Domain Dedication](http://creativecommons.org/publicdomain/zero/1.0/).
![CC0 License](https://licensebuttons.net/p/zero/1.0/80x15.png)
To the extent possible under law, NVIDIA Corporation has waived all copyright
and related or neighboring rights to the MDL Example Resources.
Loading

0 comments on commit 203d514

Please sign in to comment.