From 435323311b05ca630e8512ade2c8f12f729c8d86 Mon Sep 17 00:00:00 2001 From: Jonathan Stone Date: Tue, 25 Jul 2023 09:55:28 -0700 Subject: [PATCH 1/4] Restore three.js to r136 This changelist restores three.js to r136, as we'll need updates to our mipmap selection for environment radiance textures before moving to newer versions. --- javascript/MaterialXView/package-lock.json | 58 +++++++++++----------- javascript/MaterialXView/package.json | 4 +- javascript/MaterialXView/source/viewer.js | 2 +- 3 files changed, 32 insertions(+), 32 deletions(-) diff --git a/javascript/MaterialXView/package-lock.json b/javascript/MaterialXView/package-lock.json index f22bb7674c..7bdf38ceba 100644 --- a/javascript/MaterialXView/package-lock.json +++ b/javascript/MaterialXView/package-lock.json @@ -10,8 +10,8 @@ "license": "ISC", "dependencies": { "dat.gui": "^0.7.9", - "three": "^0.140.2", - "webpack": "^5.88.1" + "three": "^0.136.0", + "webpack": "^5.88.2" }, "devDependencies": { "copy-webpack-plugin": "^8.1.1", @@ -166,9 +166,9 @@ } }, "node_modules/@types/eslint": { - "version": "8.44.0", - "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.44.0.tgz", - "integrity": "sha512-gsF+c/0XOguWgaOgvFs+xnnRqt9GwgTvIks36WpE6ueeI4KCEHHd8K/CKHqhOqrJKsYH8m27kRzQEvWXAwXUTw==", + "version": "8.44.1", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.44.1.tgz", + "integrity": "sha512-XpNDc4Z5Tb4x+SW1MriMVeIsMoONHCkWFMkR/aPJbzEsxqHy+4Glu/BqTdPrApfDeMaXbtNh6bseNgl5KaWrSg==", "dependencies": { "@types/estree": "*", "@types/json-schema": "*" @@ -245,9 +245,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "20.4.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.4.2.tgz", - "integrity": "sha512-Dd0BYtWgnWJKwO1jkmTrzofjK2QXXcai0dmtzvIBhcA+RsG5h8R3xlyta0kGOZRNfL9GuRtb1knmPEhQrePCEw==" + "version": "20.4.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.4.5.tgz", + "integrity": "sha512-rt40Nk13II9JwQBdeYqmbn2Q6IVTA5uPhvSO+JVqdXw/6/4glI6oR9ezty/A9Hg5u7JH4OmYmuQ+XvjKm0Datg==" }, "node_modules/@types/qs": { "version": "6.9.7", @@ -798,9 +798,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001515", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001515.tgz", - "integrity": "sha512-eEFDwUOZbE24sb+Ecsx3+OvNETqjWIdabMy52oOkIgcUtAsQifjUG9q4U9dgTHJM2mfk4uEPxc0+xuFdJ629QA==", + "version": "1.0.30001517", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001517.tgz", + "integrity": "sha512-Vdhm5S11DaFVLlyiKu4hiUTkpZu+y1KA/rZZqVQfOD5YdDT/eQKlkt7NaE0WGOFgX32diqt9MiP9CAiFeRklaA==", "funding": [ { "type": "opencollective", @@ -1223,9 +1223,9 @@ "dev": true }, "node_modules/electron-to-chromium": { - "version": "1.4.460", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.460.tgz", - "integrity": "sha512-kKiHnbrHME7z8E6AYaw0ehyxY5+hdaRmeUbjBO22LZMdqTYCO29EvF0T1cQ3pJ1RN5fyMcHl1Lmcsdt9WWJpJQ==" + "version": "1.4.470", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.470.tgz", + "integrity": "sha512-zZM48Lmy2FKWgqyvsX9XK+J6FfP7aCDUFLmgooLJzA7v1agCs/sxSoBpTIwDLhmbhpx9yJIxj2INig/ncjJRqg==" }, "node_modules/encodeurl": { "version": "1.0.2", @@ -1427,9 +1427,9 @@ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, "node_modules/fast-glob": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.0.tgz", - "integrity": "sha512-ChDuvbOypPuNjO8yIDf36x7BlZX1smcUMTTcyoIjycexOxd6DFsKsg21qVBzEmr3G7fUKIRy2/psii+CIUt7FA==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz", + "integrity": "sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==", "dev": true, "dependencies": { "@nodelib/fs.stat": "^2.0.2", @@ -3405,9 +3405,9 @@ } }, "node_modules/terser": { - "version": "5.19.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.19.0.tgz", - "integrity": "sha512-JpcpGOQLOXm2jsomozdMDpd5f8ZHh1rR48OFgWUH3QsyZcfPgv2qDCYbcDEAYNd4OZRj2bWYKpwdll/udZCk/Q==", + "version": "5.19.2", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.19.2.tgz", + "integrity": "sha512-qC5+dmecKJA4cpYxRa5aVkKehYsQKc+AHeKl0Oe62aYjBL8ZA33tTljktDHJSaxxMnbI5ZYw+o/S2DxxLu8OfA==", "dependencies": { "@jridgewell/source-map": "^0.3.3", "acorn": "^8.8.2", @@ -3468,9 +3468,9 @@ "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" }, "node_modules/three": { - "version": "0.140.2", - "resolved": "https://registry.npmjs.org/three/-/three-0.140.2.tgz", - "integrity": "sha512-DdT/AHm/TbZXEhQKQpGt5/iSgBrmXpjU26FNtj1KhllVPTKj1eG4X/ShyD5W2fngE+I1s1wa4ttC4C3oCJt7Ag==" + "version": "0.136.0", + "resolved": "https://registry.npmjs.org/three/-/three-0.136.0.tgz", + "integrity": "sha512-+fEMX7nYLz2ZesVP/dyifli5Jf8gR3XPAnFJveQ80aMhibFduzrADnjMbARXh8+W9qLK7rshJCjAIL/6cDxC+A==" }, "node_modules/thunky": { "version": "1.1.0", @@ -3500,9 +3500,9 @@ } }, "node_modules/tslib": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.0.tgz", - "integrity": "sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA==", + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.1.tgz", + "integrity": "sha512-t0hLfiEKfMUoqhG+U1oid7Pva4bbDPHYfJNiB7BiIjRkj1pyC++4N3huJfqY6aRH6VTB0rvtzQwjM4K6qpfOig==", "dev": true }, "node_modules/type-is": { @@ -3625,9 +3625,9 @@ } }, "node_modules/webpack": { - "version": "5.88.1", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.88.1.tgz", - "integrity": "sha512-FROX3TxQnC/ox4N+3xQoWZzvGXSuscxR32rbzjpXgEzWudJFEJBpdlkkob2ylrv5yzzufD1zph1OoFsLtm6stQ==", + "version": "5.88.2", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.88.2.tgz", + "integrity": "sha512-JmcgNZ1iKj+aiR0OvTYtWQqJwq37Pf683dY9bVORwVbUrDhLhdn/PlO2sHsFHPkj7sHNQF3JwaAkp49V+Sq1tQ==", "dependencies": { "@types/eslint-scope": "^3.7.3", "@types/estree": "^1.0.0", diff --git a/javascript/MaterialXView/package.json b/javascript/MaterialXView/package.json index 7ee8611600..adce3d2e82 100644 --- a/javascript/MaterialXView/package.json +++ b/javascript/MaterialXView/package.json @@ -11,8 +11,8 @@ "license": "ISC", "dependencies": { "dat.gui": "^0.7.9", - "three": "^0.140.2", - "webpack": "^5.88.1" + "three": "^0.136.0", + "webpack": "^5.88.2" }, "devDependencies": { "copy-webpack-plugin": "^8.1.1", diff --git a/javascript/MaterialXView/source/viewer.js b/javascript/MaterialXView/source/viewer.js index 126b5d5bca..0bc537faf0 100644 --- a/javascript/MaterialXView/source/viewer.js +++ b/javascript/MaterialXView/source/viewer.js @@ -777,7 +777,7 @@ export class Material Object.assign(uniforms, { u_numActiveLightSources: { value: lights.length }, u_lightData: { value: lightData }, - u_envMatrix: { value: new THREE.Matrix4().multiplyMatrices(getLightRotation(), new THREE.Matrix4().makeScale(1, -1, 1)) }, + u_envMatrix: { value: getLightRotation() }, u_envRadiance: { value: radianceTexture }, u_envRadianceMips: { value: Math.trunc(Math.log2(Math.max(radianceTexture.image.width, radianceTexture.image.height))) + 1 }, u_envRadianceSamples: { value: 16 }, From fa5b09323bfebf83823a70b7ded58bc9ebf4b7ed Mon Sep 17 00:00:00 2001 From: Jonathan Stone Date: Tue, 25 Jul 2023 17:36:07 -0700 Subject: [PATCH 2/4] Mark resources option as advanced This changelist marks the new MATERIALX_INSTALL_RESOURCES as advanced, so that it's not displayed at the top level of visual CMake environments. --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index a5624f0a64..69e5c8c0f3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -116,6 +116,7 @@ mark_as_advanced(MATERIALX_NAMESPACE_SUFFIX) mark_as_advanced(MATERIALX_LIBNAME_SUFFIX) mark_as_advanced(MATERIALX_PYTHON_LTO) mark_as_advanced(MATERIALX_INSTALL_PYTHON) +mark_as_advanced(MATERIALX_INSTALL_RESOURCES) mark_as_advanced(MATERIALX_TEST_RENDER) mark_as_advanced(MATERIALX_WARNINGS_AS_ERRORS) mark_as_advanced(MATERIALX_DYNAMIC_ANALYSIS) From 307f62b9a6cfc5c5fec4e314f075addde7ad578d Mon Sep 17 00:00:00 2001 From: Doug Smythe Date: Thu, 27 Jul 2023 14:36:14 -0700 Subject: [PATCH 3/4] Clarification of input node channel output (#1422) As discussed on Slack, add a line clarifying that an image node will output the first N channels from the image file if the image file has more channels than the image node. Also updated the link target for the surface_unlit node to conform to naming conventions used in other nodes with underscores in their name. --- documents/Specification/MaterialX.Specification.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/documents/Specification/MaterialX.Specification.md b/documents/Specification/MaterialX.Specification.md index 3a90a269fb..c6b4a66101 100644 --- a/documents/Specification/MaterialX.Specification.md +++ b/documents/Specification/MaterialX.Specification.md @@ -656,6 +656,7 @@ Standard Texture nodes: * **`image`**: samples data from a single image, or from a layer within a multi-layer image. When used in the context of rendering a geometry, the image is mapped onto the geometry based on geometry UV coordinates, with the lower-left corner of an image mapping to the (0,0) UV coordinate (or to the fractional (0,0) UV coordinate for tiled images). +The type of the <image> node determines the number of channels output, which may be less than the number of channels in the image file, outputting the first N channels from the image file. So a `float` <image> would return the Red channel of an RGB image, and a `color3` <image> would return the RGB channels of an RGBA image. * `file` (uniform filename): the URI of an image file. The filename can include one or more substitutions to change the file name (including frame number) that is accessed, as described in the [Filename Substitutions](#filename-substitutions) section above. * `layer` (uniform string): the name of the layer to extract from a multi-layer input file. If no value for `layer` is provided and the input file has multiple layers, then the "default" layer will be used, or "rgba" if there is no "default" layer. Note: the number of channels defined by the `type` of the `` must match the number of channels in the named layer. * `default` (float or colorN or vectorN): a default value to use if the `file` reference can not be resolved (e.g. if a <_geometry token_>, [_interface token_] or {_hostattr_} is included in the filename but no substitution value or default is defined, or if the resolved `file` URI cannot be read), or if the specified `layer` does not exist in the file. The `default` value must be the same type as the `` element itself. If `default` is not defined, the default color value will be 0.0 in all channels. @@ -2369,7 +2370,7 @@ An input with a shader-semantic type may be given a value of "" to indicate no s The Standard MaterialX Library defines the following nodes and node variants operating on "shader"-semantic types. Standard library shaders do not respond to external illumination; please refer to the [**MaterialX Physically Based Shading Nodes**](./MaterialX.PBRSpec.md#materialx-pbs-library) document for definitions of additional nodes and shader constructors which do respond to illumination. - + * **`surface_unlit`**: an unlit surface shader node, representing a surface that can emit and transmit light, but does not receive illumination from light sources or other surfaces. Output type surfaceshader. * `emission` (float): the surface emission amount; default is 1.0 From c34a1066bb194d36174454b3b763a6d68bc8480d Mon Sep 17 00:00:00 2001 From: Jonathan Stone Date: Thu, 27 Jul 2023 18:29:54 -0700 Subject: [PATCH 4/4] Remove Clang 13 from build matrix This changelist removes Clang 13 from the build matrix, as a workaround for a recent issue in GitHub Actions virtual environments. --- .github/workflows/main.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index fecdbf7a52..8787240cd9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -47,18 +47,12 @@ jobs: cmake_config: -DMATERIALX_BUILD_SHARED_LIBS=ON static_analysis: ON - - name: Linux_Clang_13_Python39 - os: ubuntu-22.04 - compiler: clang - compiler_version: "13" - python: 3.9 - test_render: ON - - name: Linux_Clang_14_Python311 os: ubuntu-22.04 compiler: clang compiler_version: "14" python: 3.11 + test_render: ON clang_format: ON - name: Linux_Clang_14_DynamicAnalysis