Skip to content

Commit

Permalink
MDL SDK 2023.1.2 (373000.1755)
Browse files Browse the repository at this point in the history
  • Loading branch information
mkroll-nv committed Feb 2, 2024
1 parent 112a792 commit 41100f4
Show file tree
Hide file tree
Showing 43 changed files with 1,442 additions and 764 deletions.
43 changes: 42 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,50 @@
Change Log
==========
MDL SDK 2023.1.0 (373000.1077): 14 Dec 2023
MDL SDK 2023.1.2 (373000.1755): 23 Jan 2024
-----------------------------------------------


ABI compatible with the MDL SDK 2023.1.2 (373000.1755) binary release
(see [https://developer.nvidia.com/mdl-sdk](https://developer.nvidia.com/mdl-sdk))

**Added and Changed Features**

- General
- libbsdf:
- The roughness values computed by the generated auxiliary functions changed to contain
only glossy contributions.
- The color weights for normals and roughness in the generated auxiliary functions
are now reduced by luminance instead of average.

- MDL Compiler and Backends
- Allow more direct assignments of vectors instead of element-wise assignments for HLSL.
- Avoid unnecessary calls to functions whose values are not actually used.
- Avoid reading whole arrays from argument blocks or read-only data segments when
providing those arrays as function parameters. This especially improves rendering
performance of `axf_importer` materials.
- Avoid array copies when accessing arrays provided as function parameters for HLSL/GLSL.

- MDL SDK examples
- Add options to configure the lambda return mode and the generation of PDF and auxiliary
functions to code_gen example.
- Rename "`-p`" parameter of `df_cuda` example to "`--cam`" and use "`-p`" as short form
for "`--mdl_path`" as in other examples.

**Fixed Bugs**

- General
- `nvidia::core_definitions`: Fixed `'--'` in display names.
- Fixed type computation of ternary operator in MDL SDK/neuray.

- MDL Compiler and Backends
- Fixed a rare crash that could happen in an MDL module imports other modules and
import the same module (diamond pattern).
- Fixed default constructor of enum values which sometimes did not choose
the first enumerator as default value.

MDL SDK 2023.1.0 (373000.1077): 14 Dec 2023
-----------------------------------------------

ABI compatible with the MDL SDK 2023.1.0 (373000.1077) binary release
(see [https://developer.nvidia.com/mdl-sdk](https://developer.nvidia.com/mdl-sdk))

Expand Down
8 changes: 4 additions & 4 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ of examples is of no interest to you.
corresponding SDK 10.0.18362.0. Additionally the optional *Graphic Tools*
feature has to be installed.

- **DirectX Shader Compiler support** *(June 2022)* *(Windows only)*
- **DirectX Shader Compiler support** *(July 2022)* *(Windows only)*
Building the DXR example requires an updated version of the DirectX Shader
Compiler.
Download and extract the pre-compiled x64 binaries from
Expand Down Expand Up @@ -180,12 +180,12 @@ features.
binaries.

It is recommended that you build into a subdirectory, not into the repository root.
*C:/projects/mdl-sdk/build/vs2017* for example is fine, assuming you cloned the repository to:
*C:/projects/mdl-sdk/build/vs2022* for example is fine, assuming you cloned the repository to:

C:/projects/mdl-sdk

3. After clicking ``Configure``, CMake asks you to choose the Generator.
Select `Visual Studio 15 2017` (or higher), enter `host=x64` as toolset
Select `Visual Studio 17 2022` (or higher), enter `host=x64` as toolset
and click `Finish`. CMake starts to configure the build and stops several
times when user input is required to resolve dependencies.

Expand All @@ -203,7 +203,7 @@ features.
During this process, you may need to setup the following entries based on the selected components:

- **ARNOLD_SDK_DIR** in Ungrouped Entries,
for example: *C:/projects/thirdparty/Arnold-6.0.3.0-windows*
for example: *C:/projects/thirdparty/Arnold-6.2.0.1-windows*

- **clang_PATH** in Ungrouped Entries (only if not found in the PATH),
for example: *C:/Program Files/LLVM-12/bin/clang.exe*
Expand Down
4 changes: 2 additions & 2 deletions doc/base_module/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,10 @@ <h3>Edge</h3>

</div><div id="blackfooter">
<span class="footeritem">
12&#160;December&#160;2023,&#160;13:11,&#160;rev374077, v1.3
23&#160;January&#160;2024,&#160;11:22,&#160;rev374755, v1.3
</span>
<span class="footeritem">
<a href="https://www.nvidia.com/en-us/about-nvidia/legal-info/">&copy; 2023 NVIDIA&nbsp;Corporation.</a> All rights reserved.
<a href="https://www.nvidia.com/en-us/about-nvidia/legal-info/">&copy; 2024 NVIDIA&nbsp;Corporation.</a> All rights reserved.
</span>

</div>
Expand Down
4 changes: 2 additions & 2 deletions doc/build/doxygen_footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
<!-- start footer part -->
<!--BEGIN GENERATE_TREEVIEW-->
<div id="nav-path">
<span class="footeritem">MDL SDK 2023.1.0 (373000.1077): $datetime</span>
<span class="footeritem">MDL SDK 2023.1.2 (373000.1755): $datetime</span>
<span class="footeritem">
<a href="http://www.nvidia.com/">
&copy;&#160;2023&#160;NVIDIA&#160;Corporation.</a>
&copy;&#160;2024&#160;NVIDIA&#160;Corporation.</a>
&#160;All&#160;rights&#160;reserved.
</span>
</div>
Expand Down
16 changes: 8 additions & 8 deletions doc/core_definitions/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -144,19 +144,19 @@
<li><span class="nodestatus level2" data-depth="2"></span>
<span class="navlink" data-basename="functions" data-target="perlin-noise-texture"><span class="navnumber">3.4</span> Perlin noise texture</span></li>
<li><span class="nodestatus level2" data-depth="2"></span>
<span class="navlink" data-basename="functions" data-target="perlin-noise-texture-bump-mapping"><span class="navnumber">3.5</span> Perlin noise texture &#8211; bump mapping</span></li>
<span class="navlink" data-basename="functions" data-target="perlin-noise-texture-bump-mapping"><span class="navnumber">3.5</span> Perlin noise texture - bump mapping</span></li>
<li><span class="nodestatus level2" data-depth="2"></span>
<span class="navlink" data-basename="functions" data-target="cellular-noise-texture"><span class="navnumber">3.6</span> Cellular noise texture</span></li>
<li><span class="nodestatus level2" data-depth="2"></span>
<span class="navlink" data-basename="functions" data-target="cellular-noise-texture-bump-mapping"><span class="navnumber">3.7</span> Cellular noise texture &#8211; bump mapping</span></li>
<span class="navlink" data-basename="functions" data-target="cellular-noise-texture-bump-mapping"><span class="navnumber">3.7</span> Cellular noise texture - bump mapping</span></li>
<li><span class="nodestatus level2" data-depth="2"></span>
<span class="navlink" data-basename="functions" data-target="flow-noise-texture"><span class="navnumber">3.8</span> Flow noise texture</span></li>
<li><span class="nodestatus level2" data-depth="2"></span>
<span class="navlink" data-basename="functions" data-target="flow-noise-texture-bump-mapping"><span class="navnumber">3.9</span> Flow noise texture &#8211; bump mapping</span></li>
<span class="navlink" data-basename="functions" data-target="flow-noise-texture-bump-mapping"><span class="navnumber">3.9</span> Flow noise texture - bump mapping</span></li>
<li><span class="nodestatus level2" data-depth="2"></span>
<span class="navlink" data-basename="functions" data-target="3d-checker-texture"><span class="navnumber">3.10</span> 3D checker texture</span></li>
<li><span class="nodestatus level2" data-depth="2"></span>
<span class="navlink" data-basename="functions" data-target="3d-checker-texture-bump-mapping"><span class="navnumber">3.11</span> 3D checker texture &#8211; bump mapping</span></li>
<span class="navlink" data-basename="functions" data-target="3d-checker-texture-bump-mapping"><span class="navnumber">3.11</span> 3D checker texture - bump mapping</span></li>
<li><span class="nodestatus level2" data-depth="2"></span>
<span class="navlink" data-basename="functions" data-target="bitmap-texture-bump"><span class="navnumber">3.12</span> Bitmap texture, bump</span></li>
<li><span class="nodestatus level2" data-depth="2"></span>
Expand Down Expand Up @@ -202,8 +202,8 @@ <h2>Page cannot be loaded</h2>
bottom of the page or from the following links:</p>

<div style="padding-left:2em;">
<a href="mdl_core_definitions.231212.A4.pdf">View documentation in A4 format</a><br>
<a href="mdl_core_definitions.231212.LTR.pdf">View documentation in US Letter format</a><br>
<a href="mdl_core_definitions.240123.A4.pdf">View documentation in A4 format</a><br>
<a href="mdl_core_definitions.240123.LTR.pdf">View documentation in US Letter format</a><br>
</div>
<h3>Overriding security settings</h3>

Expand Down Expand Up @@ -277,10 +277,10 @@ <h3>Edge</h3>
<span class="footeritem">
</span>
<span class="footeritem">
12&#160;December&#160;2023,&#160;13:12,&#160;rev374077, v1.4
23&#160;January&#160;2024,&#160;11:24,&#160;rev374755, v1.4
</span>
<span class="footeritem">
<a href="https://www.nvidia.com/en-us/about-nvidia/legal-info/">&copy; 2023 NVIDIA&nbsp;Corporation.</a> All rights reserved.
<a href="https://www.nvidia.com/en-us/about-nvidia/legal-info/">&copy; 2024 NVIDIA&nbsp;Corporation.</a> All rights reserved.
</span>

</div>
Expand Down
8 changes: 4 additions & 4 deletions doc/core_definitions/pages/functions.html
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ <h2 id="perlin-noise-texture" class="headerlink"><span class="sectionnumber">3.4
</table>
</div>

<h2 id="perlin-noise-texture-bump-mapping" class="headerlink"><span class="sectionnumber">3.5</span>Perlin noise texture &#8211; bump mapping</h2>
<h2 id="perlin-noise-texture-bump-mapping" class="headerlink"><span class="sectionnumber">3.5</span>Perlin noise texture - bump mapping</h2>


<img id="perlin-noise-bump-texture" src="pages/img/perlin_noise_bump_texture.jpg" data-resize="true" data-wmax="200" data-hmax="200" data-aspect="1.0" data-width="1" data-height="1.0" class="s-imgmargin"></img>
Expand Down Expand Up @@ -816,7 +816,7 @@ <h2 id="cellular-noise-texture" class="headerlink"><span class="sectionnumber">3
</table>
</div>

<h2 id="cellular-noise-texture-bump-mapping" class="headerlink"><span class="sectionnumber">3.7</span>Cellular noise texture &#8211; bump mapping</h2>
<h2 id="cellular-noise-texture-bump-mapping" class="headerlink"><span class="sectionnumber">3.7</span>Cellular noise texture - bump mapping</h2>


<img id="worley-noise-bump-texture" src="pages/img/worley_noise_bump_texture.jpg" data-resize="true" data-wmax="200" data-hmax="200" data-aspect="1.0" data-width="1" data-height="1.0" class="s-imgmargin"></img>
Expand Down Expand Up @@ -1104,7 +1104,7 @@ <h2 id="flow-noise-texture" class="headerlink"><span class="sectionnumber">3.8</
</table>
</div>

<h2 id="flow-noise-texture-bump-mapping" class="headerlink"><span class="sectionnumber">3.9</span>Flow noise texture &#8211; bump mapping</h2>
<h2 id="flow-noise-texture-bump-mapping" class="headerlink"><span class="sectionnumber">3.9</span>Flow noise texture - bump mapping</h2>


<img id="flow-noise-bump-texture" src="pages/img/flow_noise_bump_texture.jpg" data-resize="true" data-wmax="200" data-hmax="200" data-aspect="1.0" data-width="1" data-height="1.0" class="s-imgmargin"></img>
Expand Down Expand Up @@ -1372,7 +1372,7 @@ <h2 id="3d-checker-texture" class="headerlink"><span class="sectionnumber">3.10<
</table>
</div>

<h2 id="3d-checker-texture-bump-mapping" class="headerlink"><span class="sectionnumber">3.11</span>3D checker texture &#8211; bump mapping</h2>
<h2 id="3d-checker-texture-bump-mapping" class="headerlink"><span class="sectionnumber">3.11</span>3D checker texture - bump mapping</h2>


<img id="checker-bump-texture" src="pages/img/checker_bump_texture.jpg" data-resize="true" data-wmax="200" data-hmax="200" data-aspect="1.0" data-width="1" data-height="1.0" class="s-imgmargin"></img>
Expand Down
4 changes: 2 additions & 2 deletions doc/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@
</div>
<div id="blackfooter">
<span class="footeritem">
MDL SDK 2023.1.0 (373000.1077): 14 Dec 2023
MDL SDK 2023.1.2 (373000.1755): 23 Jan 2024
</span>
<span class="footeritem">
<a href="http://www.nvidia.com/">&copy;&#160;2023&#160;NVIDIA&#160;Corporation.</a> &#160;All&#160;rights&#160;reserved.
<a href="http://www.nvidia.com/">&copy;&#160;2024&#160;NVIDIA&#160;Corporation.</a> &#160;All&#160;rights&#160;reserved.
</span>
</div>

Expand Down
10 changes: 5 additions & 5 deletions doc/mdl_sdkapi/getting_started.dox
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ of examples is of no interest to you.
corresponding SDK 10.0.18362.0. Additionally the optional *Graphic Tools*
feature has to be installed.

- **DirectX Shader Compiler support** (June 2022) (Windows only) \n
- **DirectX Shader Compiler support** (July 2022) (Windows only) \n
Building the DXR example requires an updated version of the DirectX Shader
Compiler. \n
Download and extract the pre-compiled x64 binaries from
Expand Down Expand Up @@ -147,7 +147,7 @@ features.
Pre-compiled binaries can be found on
[llvm.org](http://releases.llvm.org/download.html#12.0.1).

- **MaterialX** (github repository, tag: v1.38.4, Windows only) \n
- **MaterialX** (github repository, tag: v1.38.7, Windows only) \n
This dependency adds MaterialX support to the DXR example. \n
Please download a release from
[github](https://github.com/AcademySoftwareFoundation/MaterialX/releases). \n
Expand All @@ -160,7 +160,7 @@ features.
The old version is available in the
[CUDA Toolkit Archive](https://developer.nvidia.com/cuda-toolkit-archive).

- **OptiX** (7.x) \n
- **OptiX** (7.0 to 7.5) \n
This dependency is required to build the OptiX 7 example. \n
Please follow the instructions on the [OptiX Website](https://developer.nvidia.com/designworks/optix/download).

Expand Down Expand Up @@ -202,7 +202,7 @@ features.
example binaries.

It is recommended that you build into a subdirectory, not into the example root.
C:/projects/mdl-sdk/examples/build/vs2017 for example is fine, assuming you extracted the mdl-sdk to:
C:/projects/mdl-sdk/examples/build/vs2022 for example is fine, assuming you extracted the mdl-sdk to:

C:/projects/mdl-sdk

Expand All @@ -224,7 +224,7 @@ features.
During this process, you may need to setup the following entries based on the selected components:

- **ARNOLD_SDK_DIR** in Ungrouped Entries, \n
for example: *C:/projects/thirdparty/Arnold-6.0.3.0-windows*
for example: *C:/projects/thirdparty/Arnold-6.2.0.1-windows*

- **clang_PATH** in Ungrouped Entries (only if not found in the PATH), \n
for example: *C:/Program Files/LLVM-12/bin/clang.exe*
Expand Down
8 changes: 4 additions & 4 deletions examples/mdl/nvidia/core_definitions.mdl
Original file line number Diff line number Diff line change
Expand Up @@ -863,7 +863,7 @@ export float3 perlin_noise_bump_texture(
]]
)
[[
anno::display_name("Perlin noise texture -- bump mapping"),
anno::display_name("Perlin noise texture - bump mapping"),
anno::description("Enable bump-map texturing with a random noise pattern"),
anno::thumbnail(".thumbs/perlin_noise_bump_texture.png"),
anno::in_group("Texturing, high level"),
Expand Down Expand Up @@ -1068,7 +1068,7 @@ export float3 worley_noise_bump_texture(
anno::ui_order(6)
]])
[[
anno::display_name("Cellular noise texture -- bump mapping"),
anno::display_name("Cellular noise texture - bump mapping"),
anno::description("Allow texturing with a cell forming pattern"),
anno::thumbnail(".thumbs/worley_noise_bump_texture.png"),
anno::in_group("Texturing, high level"),
Expand Down Expand Up @@ -1332,7 +1332,7 @@ export float3 flow_noise_bump_texture(
anno::ui_order(10)
]])
[[
anno::display_name("Flow noise texture -- bump mapping"),
anno::display_name("Flow noise texture - bump mapping"),
anno::description("Allow texturing with a 2D noise pattern suitable for waves"),
anno::thumbnail(".thumbs/flow_noise_bump_texture.png"),
anno::in_group("Texturing, high level"),
Expand Down Expand Up @@ -1500,7 +1500,7 @@ export float3 checker_bump_texture(
]]
)
[[
anno::display_name("3D checker texture -- bump mapping"),
anno::display_name("3D checker texture - bump mapping"),
anno::description("Allows texturing a checkerboard pattern"),
anno::thumbnail(".thumbs/checker_bump_texture.png"),
anno::in_group("Texturing, high level"),
Expand Down
30 changes: 29 additions & 1 deletion examples/mdl_sdk/code_gen/example_code_gen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ class Options
bool m_fold_all_enum_parameters = false;
bool m_single_init = false;
bool m_ignore_noinline = true;
bool m_disable_pdf = false;
bool m_enable_aux = false;
std::string m_lambda_return_mode;
bool m_warn_spectrum_conv = false;
std::string m_backend = "hlsl";
bool m_use_derivatives = false;
Expand Down Expand Up @@ -374,7 +377,16 @@ void code_gen(mi::neuraylib::INeuray* neuray, Options& options)
options.m_adapt_normal ? "on" : "off");
backend->set_option("use_renderer_adapt_microfacet_roughness",
options.m_adapt_microfacet_roughness ? "on" : "off");

backend->set_option("enable_pdf",
!options.m_disable_pdf ? "on" : "off");
backend->set_option("enable_auxiliary",
options.m_enable_aux ? "on" : "off");
if (!options.m_lambda_return_mode.empty()) {
if (backend->set_option(
"lambda_return_mode", options.m_lambda_return_mode.c_str()) != 0) {
exit_failure("Setting 'lambda_return_mode' option failed.");
}
}

// ----------------------------------------------------------------------------------------

Expand Down Expand Up @@ -583,6 +595,10 @@ code_gen [options] <qualified_material_name>
--fe Fold enum parameters.
--single-init Compile in single init mode.
--dian Disable ignoring anno::noinline() annotations.
--disable_pdf Disable generation of separate PDF function.
--enable_aux Enable generation of auxiliary function.
--lambda_return_mode <mode> Set how base types and vector types are returned for PTX and LLVM
backends. One of {default, sret, value}.
--adapt_normal Enable renderer callback to adapt the normal.
--adapt_microfacet_roughness Enable renderer callback to adapt the roughness for
microfacet BSDFs.
Expand Down Expand Up @@ -621,6 +637,18 @@ bool Options::parse(int argc, char* argv[])
m_single_init = true;
else if (arg == "--dian")
m_ignore_noinline = false;
else if (arg == "--disable_pdf")
m_disable_pdf = true;
else if (arg == "--enable_aux")
m_enable_aux = true;
else if (arg == "--lambda_return_mode") {
if (i == argc - 1)
{
std::cerr << "error: Argument for --lambda_return_mode missing." << std::endl;
return false;
}
m_lambda_return_mode = argv[++i];
}
else if (arg == "--adapt_normal")
m_adapt_normal = true;
else if (arg == "--adapt_microfacet_roughness")
Expand Down
Loading

0 comments on commit 41100f4

Please sign in to comment.