{"id":27940650,"url":"https://github.com/khronosgroup/gltf-materialx-converter","last_synced_at":"2025-05-07T10:19:25.884Z","repository":{"id":258270991,"uuid":"861831639","full_name":"KhronosGroup/glTF-MaterialX-Converter","owner":"KhronosGroup","description":"Prototype tooling between glTF (JSON) and MaterialX (XML) file formats.","archived":false,"fork":false,"pushed_at":"2025-01-21T14:43:39.000Z","size":19062,"stargazers_count":12,"open_issues_count":2,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-05-07T10:18:47.057Z","etag":null,"topics":["gltf","materialx","openusd","procedural-textures"],"latest_commit_sha":null,"homepage":"https://github.khronos.org/glTF-MaterialX-Converter/","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KhronosGroup.png","metadata":{"files":{"readme":"README.html","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-23T15:26:47.000Z","updated_at":"2025-04-04T03:12:47.000Z","dependencies_parsed_at":"2024-11-11T19:31:51.079Z","dependency_job_id":"552d09ae-3c51-48f0-ba12-483dfd60f01f","html_url":"https://github.com/KhronosGroup/glTF-MaterialX-Converter","commit_stats":null,"previous_names":["khronosgroup/gltf-materialx-converter"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KhronosGroup%2FglTF-MaterialX-Converter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KhronosGroup%2FglTF-MaterialX-Converter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KhronosGroup%2FglTF-MaterialX-Converter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KhronosGroup%2FglTF-MaterialX-Converter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KhronosGroup","download_url":"https://codeload.github.com/KhronosGroup/glTF-MaterialX-Converter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252856566,"owners_count":21814858,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gltf","materialx","openusd","procedural-textures"],"created_at":"2025-05-07T10:19:25.175Z","updated_at":"2025-05-07T10:19:25.855Z","avatar_url":"https://github.com/KhronosGroup.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!DOCTYPE html\u003e\n\u003chtml\u003e\n\u003chead\u003e\n\u003ctitle\u003eREADME.md\u003c/title\u003e\n\u003cmeta http-equiv=\"Content-type\" content=\"text/html;charset=UTF-8\"\u003e\n\n\u003cstyle\u003e\n/* https://github.com/microsoft/vscode/blob/master/extensions/markdown-language-features/media/markdown.css */\n/*---------------------------------------------------------------------------------------------\n *  Copyright (c) Microsoft Corporation. All rights reserved.\n *  Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nbody {\n\tfont-family: var(--vscode-markdown-font-family, -apple-system, BlinkMacSystemFont, \"Segoe WPC\", \"Segoe UI\", \"Ubuntu\", \"Droid Sans\", sans-serif);\n\tfont-size: var(--vscode-markdown-font-size, 14px);\n\tpadding: 0 26px;\n\tline-height: var(--vscode-markdown-line-height, 22px);\n\tword-wrap: break-word;\n}\n\n#code-csp-warning {\n\tposition: fixed;\n\ttop: 0;\n\tright: 0;\n\tcolor: white;\n\tmargin: 16px;\n\ttext-align: center;\n\tfont-size: 12px;\n\tfont-family: sans-serif;\n\tbackground-color:#444444;\n\tcursor: pointer;\n\tpadding: 6px;\n\tbox-shadow: 1px 1px 1px rgba(0,0,0,.25);\n}\n\n#code-csp-warning:hover {\n\ttext-decoration: none;\n\tbackground-color:#007acc;\n\tbox-shadow: 2px 2px 2px rgba(0,0,0,.25);\n}\n\nbody.scrollBeyondLastLine {\n\tmargin-bottom: calc(100vh - 22px);\n}\n\nbody.showEditorSelection .code-line {\n\tposition: relative;\n}\n\nbody.showEditorSelection .code-active-line:before,\nbody.showEditorSelection .code-line:hover:before {\n\tcontent: \"\";\n\tdisplay: block;\n\tposition: absolute;\n\ttop: 0;\n\tleft: -12px;\n\theight: 100%;\n}\n\nbody.showEditorSelection li.code-active-line:before,\nbody.showEditorSelection li.code-line:hover:before {\n\tleft: -30px;\n}\n\n.vscode-light.showEditorSelection .code-active-line:before {\n\tborder-left: 3px solid rgba(0, 0, 0, 0.15);\n}\n\n.vscode-light.showEditorSelection .code-line:hover:before {\n\tborder-left: 3px solid rgba(0, 0, 0, 0.40);\n}\n\n.vscode-light.showEditorSelection .code-line .code-line:hover:before {\n\tborder-left: none;\n}\n\n.vscode-dark.showEditorSelection .code-active-line:before {\n\tborder-left: 3px solid rgba(255, 255, 255, 0.4);\n}\n\n.vscode-dark.showEditorSelection .code-line:hover:before {\n\tborder-left: 3px solid rgba(255, 255, 255, 0.60);\n}\n\n.vscode-dark.showEditorSelection .code-line .code-line:hover:before {\n\tborder-left: none;\n}\n\n.vscode-high-contrast.showEditorSelection .code-active-line:before {\n\tborder-left: 3px solid rgba(255, 160, 0, 0.7);\n}\n\n.vscode-high-contrast.showEditorSelection .code-line:hover:before {\n\tborder-left: 3px solid rgba(255, 160, 0, 1);\n}\n\n.vscode-high-contrast.showEditorSelection .code-line .code-line:hover:before {\n\tborder-left: none;\n}\n\nimg {\n\tmax-width: 100%;\n\tmax-height: 100%;\n}\n\na {\n\ttext-decoration: none;\n}\n\na:hover {\n\ttext-decoration: underline;\n}\n\na:focus,\ninput:focus,\nselect:focus,\ntextarea:focus {\n\toutline: 1px solid -webkit-focus-ring-color;\n\toutline-offset: -1px;\n}\n\nhr {\n\tborder: 0;\n\theight: 2px;\n\tborder-bottom: 2px solid;\n}\n\nh1 {\n\tpadding-bottom: 0.3em;\n\tline-height: 1.2;\n\tborder-bottom-width: 1px;\n\tborder-bottom-style: solid;\n}\n\nh1, h2, h3 {\n\tfont-weight: normal;\n}\n\ntable {\n\tborder-collapse: collapse;\n}\n\ntable \u003e thead \u003e tr \u003e th {\n\ttext-align: left;\n\tborder-bottom: 1px solid;\n}\n\ntable \u003e thead \u003e tr \u003e th,\ntable \u003e thead \u003e tr \u003e td,\ntable \u003e tbody \u003e tr \u003e th,\ntable \u003e tbody \u003e tr \u003e td {\n\tpadding: 5px 10px;\n}\n\ntable \u003e tbody \u003e tr + tr \u003e td {\n\tborder-top: 1px solid;\n}\n\nblockquote {\n\tmargin: 0 7px 0 5px;\n\tpadding: 0 16px 0 10px;\n\tborder-left-width: 5px;\n\tborder-left-style: solid;\n}\n\ncode {\n\tfont-family: Menlo, Monaco, Consolas, \"Droid Sans Mono\", \"Courier New\", monospace, \"Droid Sans Fallback\";\n\tfont-size: 1em;\n\tline-height: 1.357em;\n}\n\nbody.wordWrap pre {\n\twhite-space: pre-wrap;\n}\n\npre:not(.hljs),\npre.hljs code \u003e div {\n\tpadding: 16px;\n\tborder-radius: 3px;\n\toverflow: auto;\n}\n\npre code {\n\tcolor: var(--vscode-editor-foreground);\n\ttab-size: 4;\n}\n\n/** Theming */\n\n.vscode-light pre {\n\tbackground-color: rgba(220, 220, 220, 0.4);\n}\n\n.vscode-dark pre {\n\tbackground-color: rgba(10, 10, 10, 0.4);\n}\n\n.vscode-high-contrast pre {\n\tbackground-color: rgb(0, 0, 0);\n}\n\n.vscode-high-contrast h1 {\n\tborder-color: rgb(0, 0, 0);\n}\n\n.vscode-light table \u003e thead \u003e tr \u003e th {\n\tborder-color: rgba(0, 0, 0, 0.69);\n}\n\n.vscode-dark table \u003e thead \u003e tr \u003e th {\n\tborder-color: rgba(255, 255, 255, 0.69);\n}\n\n.vscode-light h1,\n.vscode-light hr,\n.vscode-light table \u003e tbody \u003e tr + tr \u003e td {\n\tborder-color: rgba(0, 0, 0, 0.18);\n}\n\n.vscode-dark h1,\n.vscode-dark hr,\n.vscode-dark table \u003e tbody \u003e tr + tr \u003e td {\n\tborder-color: rgba(255, 255, 255, 0.18);\n}\n\n\u003c/style\u003e\n\n\u003cstyle\u003e\n/* Tomorrow Theme */\n/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */\n/* Original theme - https://github.com/chriskempson/tomorrow-theme */\n\n/* Tomorrow Comment */\n.hljs-comment,\n.hljs-quote {\n\tcolor: #8e908c;\n}\n\n/* Tomorrow Red */\n.hljs-variable,\n.hljs-template-variable,\n.hljs-tag,\n.hljs-name,\n.hljs-selector-id,\n.hljs-selector-class,\n.hljs-regexp,\n.hljs-deletion {\n\tcolor: #c82829;\n}\n\n/* Tomorrow Orange */\n.hljs-number,\n.hljs-built_in,\n.hljs-builtin-name,\n.hljs-literal,\n.hljs-type,\n.hljs-params,\n.hljs-meta,\n.hljs-link {\n\tcolor: #f5871f;\n}\n\n/* Tomorrow Yellow */\n.hljs-attribute {\n\tcolor: #eab700;\n}\n\n/* Tomorrow Green */\n.hljs-string,\n.hljs-symbol,\n.hljs-bullet,\n.hljs-addition {\n\tcolor: #718c00;\n}\n\n/* Tomorrow Blue */\n.hljs-title,\n.hljs-section {\n\tcolor: #4271ae;\n}\n\n/* Tomorrow Purple */\n.hljs-keyword,\n.hljs-selector-tag {\n\tcolor: #8959a8;\n}\n\n.hljs {\n\tdisplay: block;\n\toverflow-x: auto;\n\tcolor: #4d4d4c;\n\tpadding: 0.5em;\n}\n\n.hljs-emphasis {\n\tfont-style: italic;\n}\n\n.hljs-strong {\n\tfont-weight: bold;\n}\n\u003c/style\u003e\n\n\u003cstyle\u003e\n/*\n * Markdown PDF CSS\n */\n\n body {\n\tfont-family: -apple-system, BlinkMacSystemFont, \"Segoe WPC\", \"Segoe UI\", \"Ubuntu\", \"Droid Sans\", sans-serif, \"Meiryo\";\n\tpadding: 0 12px;\n}\n\npre {\n\tbackground-color: #f8f8f8;\n\tborder: 1px solid #cccccc;\n\tborder-radius: 3px;\n\toverflow-x: auto;\n\twhite-space: pre-wrap;\n\toverflow-wrap: break-word;\n}\n\npre:not(.hljs) {\n\tpadding: 23px;\n\tline-height: 19px;\n}\n\nblockquote {\n\tbackground: rgba(127, 127, 127, 0.1);\n\tborder-color: rgba(0, 122, 204, 0.5);\n}\n\n.emoji {\n\theight: 1.4em;\n}\n\ncode {\n\tfont-size: 14px;\n\tline-height: 19px;\n}\n\n/* for inline code */\n:not(pre):not(.hljs) \u003e code {\n\tcolor: #C9AE75; /* Change the old color so it seems less like an error */\n\tfont-size: inherit;\n}\n\n/* Page Break : use \u003cdiv class=\"page\"/\u003e to insert page break\n-------------------------------------------------------- */\n.page {\n\tpage-break-after: always;\n}\n\n\u003c/style\u003e\n\n\u003cscript src=\"https://unpkg.com/mermaid/dist/mermaid.min.js\"\u003e\u003c/script\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n  \u003cscript\u003e\n    mermaid.initialize({\n      startOnLoad: true,\n      theme: document.body.classList.contains('vscode-dark') || document.body.classList.contains('vscode-high-contrast')\n          ? 'dark'\n          : 'default'\n    });\n  \u003c/script\u003e\n\u003ch2 id=\"materialx--gltf-procedurals-interop\"\u003eMaterialX / glTF Procedurals Interop\u003c/h2\u003e\n\u003cp\u003e\u003ca href=\"https://github.com/KhronosGroup/glTF-MaterialX-Converter/actions?query=branch%3Amain\"\u003e\u003cimg src=\"https://github.com/KhronosGroup/glTF-MaterialX-Converter/workflows/main/badge.svg\" alt=\"Build Status\"\u003e\u003c/a\u003e\u003c/p\u003e\n\u003ch3 id=\"introduction\"\u003eIntroduction\u003c/h3\u003e\n\u003cp\u003eThis package supports the bi-directional translation between MaterialX material graphs and the glTF Procedural Textures extension.\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003eThe Khronos extensions can be found here:\n\u003cul\u003e\n\u003cli\u003e\u003ca href=\"https://github.com/KhronosGroup/glTF/tree/KHR_texture_procedurals/extensions/2.0/Khronos/KHR_texture_procedurals\"\u003eKHR_texture_procedurals\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://github.com/KhronosGroup/glTF/tree/KHR_texture_procedurals/extensions/2.0/Vendor/EXT_texture_procedurals_mx_1_39\"\u003eEXT_texture_procedurals_mx_1_39\u003c/a\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/li\u003e\n\u003cli\u003eThe MaterialX specification documents can be found \u003ca href=\"https://github.com/AcademySoftwareFoundation/MaterialX/tree/main/documents/Specification\"\u003ehere\u003c/a\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch3 id=\"dependencies\"\u003eDependencies\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003eThe \u003ccode\u003e1.39.2\u003c/code\u003e (or higher) release of MaterialX (on\u003cbr\u003e\n\u003ca href=\"https://pypi.org/project/MaterialX/\"\u003ePyPi\u003c/a\u003e).\u003c/li\u003e\n\u003cli\u003eThe \u003ccode\u003ejsonschema\u003c/code\u003e package if Schema validation is desired\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch3 id=\"setup\"\u003eSetup\u003c/h3\u003e\n\u003cp\u003eThe \u003ca href=\"https://github.com/KhronosGroup/glTF-MaterialX-Converter/\"\u003eGithub repository\u003c/a\u003e can be forked / cloned locally and the package built using \u003ccode\u003epip\u003c/code\u003e as follows from the root folder:\u003c/p\u003e\n\u003cp\u003e\u003ccode\u003epip install .\u003c/code\u003e\u003c/p\u003e\n\u003cp\u003eAll dependencies listed will be installed if required.\u003c/p\u003e\n\u003ch4 id=\"command-line-interfaces\"\u003eCommand Line Interfaces\u003c/h4\u003e\n\u003cp\u003eTo convert from a MaterialX document to produce a glTF JSON document the \u003ccode\u003ematerialx_to_gltf.py\u003c/code\u003e utility script may be used.\u003c/p\u003e\n\u003cp\u003eThe following is an example converting a sample file found in the test folder. The results are saved to a file called \u003ccode\u003echeckerboard_graph.gltf\u003c/code\u003e.\u003c/p\u003e\n\u003cp\u003e\u003ccode\u003epython -m gltf_materialx_converter mtlx \u0026quot;tests/data/checkerboard_graph.mtlx\u0026quot;\u003c/code\u003e\u003c/p\u003e\n\u003cp\u003eor\u003c/p\u003e\n\u003cp\u003e\u003ccode\u003epython source/gltf_materialx_converter/materialx_to_gltf.py \u0026quot;tests/data/checkerboard_graph.mtlx\u0026quot;\u003c/code\u003e\u003c/p\u003e\n\u003cp\u003eto run the local script.\u003c/p\u003e\n\u003chr\u003e\n\u003cp\u003eTo convert from a document containing glTF procedural content to produce a MaterialX document the \u003ccode\u003egltf_to_materialx.py\u003c/code\u003e utility script may be used.\u003c/p\u003e\n\u003cp\u003eThe following is an example converting a sample file found in the test folder. The results are saved to a file called \u003ccode\u003echeckerboard_graph_fromgltf.mtlx\u003c/code\u003e.\u003c/p\u003e\n\u003cp\u003e\u003ccode\u003epython -m gltf_materialx_converter gltf \u0026quot;tests/data/checkerboard_graph.gltf\u0026quot;\u003c/code\u003e\u003c/p\u003e\n\u003cp\u003eor\u003c/p\u003e\n\u003cp\u003e\u003ccode\u003epython source/gltf_materialx_converter/gltf_to_materialx.py \u0026quot;tests/data/checkerboard_graph.gltf\u0026quot;\u003c/code\u003e\u003c/p\u003e\n\u003cp\u003eto run the local script.\u003c/p\u003e\n\u003ch4 id=\"api-example\"\u003eAPI Example\u003c/h4\u003e\n\u003cp\u003eThe following is a simple example of using the API to convert from MaterialX to glTF\u003cbr\u003e\nand then back to MaterialX.\u003c/p\u003e\n\u003cpre\u003e\n# Import support modules\nimport MaterialX as mx\nimport json\n\n# Import conversion module utilities\nfrom gltf_materialx_converter import converter as MxGLTFPT\nfrom gltf_materialx_converter import utilities as MxGLTFPTUtil\n\ninput_file = \"my_file.mtlx\" # Replace with desired file name\n\n# Set up definitions and read in a sample file\nstdlib, libFiles = MxGLTFPTUtil.load_standard_libraries()\nmxdoc = MxGLTFPTUtil.create_working_document([stdlib])\nmx.readFromXmlFile(mxdoc, input_file)\n\n# Instantiate a converter\nconverter = MxGLTFPT.glTFMaterialXConverter()\n\n# Convert to glTF (JSON)\njson_string, status = converter.materialX_to_glTF(mxdoc)\n\n# Write result to disk\ngltf_file = input_file.replace('.mtlx', '.gltf')\nwith open(gltf_file, 'w') as f:\n    f.write(json_string)\n\n# Convert from glTF to MaterialX\nmxdoc2 = converter.gltf_string_to_materialX(json_string, stdlib)\n\u003c/pre\u003e\n\u003cp\u003eA sample \u003ccode\u003eJupyter\u003c/code\u003e notebook which can be run interactively is available \u003ca href=\"https://github.com/KhronosGroup/glTF-MaterialX-Converter/blob/main/documents/notebook.ipynb\"\u003ehere\u003c/a\u003e\u003c/p\u003e\n\u003ch3 id=\"documentation\"\u003eDocumentation\u003c/h3\u003e\n\u003ch4 id=\"api\"\u003eAPI\u003c/h4\u003e\n\u003cp\u003eAPI documentation can be found \u003ca href=\"https://github.khronos.org/glTF-MaterialX-Converter/documents/html/index.html\"\u003ehere\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003eDocumentation can be generated by running \u003ccode\u003edoxygen\u003c/code\u003e from the \u0026quot;documents\u0026quot; folder.\u003cbr\u003e\nIt is assumed that \u003ccode\u003eDoxygen\u003c/code\u003e has been installed locally.\u003c/p\u003e\n\u003ch3 id=\"tests\"\u003eTests\u003c/h3\u003e\n\u003cp\u003eThe following command can be used to run tests from the root folder:\u003c/p\u003e\n\u003cpre\u003e\npython -m unittest discover -s tests -p \"test_*.py\"\n\u003c/pre\u003e\n\u003ch3 id=\"supported-materialx-configurations\"\u003eSupported MaterialX Configurations\u003c/h3\u003e\n\u003cp\u003eOnly specific configurations of MaterialX can be mapped to glTF Texture Procedurals.\u003c/p\u003e\n\u003col\u003e\n\u003cli\u003eThere must be a \u003ccode\u003esurfacematerial\u003c/code\u003e material node\u003c/li\u003e\n\u003cli\u003eThere must be a \u003ccode\u003eglTF PBR\u003c/code\u003e or \u003ccode\u003eunlit\u003c/code\u003e node connected to the surface shader input of the material.\u003c/li\u003e\n\u003cli\u003eA single \u003ccode\u003enodegraph\u003c/code\u003e with a \u003ccode\u003ecolor3\u003c/code\u003e output node which is connected to the base color on the surface shader. The constant node can be replaced with the desired set of\u003cbr\u003e\nnodes, and one or more inputs may be specified to route data into the \u003ccode\u003enodegraph\u003c/code\u003e.\u003c/li\u003e\n\u003c/ol\u003e\n\u003cp\u003eAny document level qualifiers must be pre-resolved when converting rom MaterialX. This includes any \u003ccode\u003efileprefix\u003c/code\u003e qualifiers for image file names.\u003c/p\u003e\n\u003ctable\u003e\n\u003ctr\u003e\n\u003cth\u003eDescription\n\u003cth\u003eDocuments\n\u003cth\u003eReference Image\n\u003ctr\u003e\n\u003ctd\u003e \nA sample minimal graph routing a constant color to the downstream shader.\nThere are no inputs specified on the `nodegraph`.\n\u003cpre\u003e\u003ccode class=\"language-mermaid\"\u003e\u003cdiv class=\"mermaid\"\u003egraph TB\n    gltf_Material([surfacematerial:material])\n    style gltf_Material   fill:#090, color:#FFF\n    gltf_Shader[gltf_pbr:surfaceshader]\n    subgraph gltf_procedural\n    gltf_procedural_output_color4([output:color3])\n    style gltf_procedural_output_color4  fill:#09D, color:#FFF\n    gltf_procedural_constant_color4([constant:color3:1,1,1])\n    style gltf_procedural_constant_color4  fill:#888, color:#000\n    end\n    gltf_Shader --\"surfaceshader\"--\u003e gltf_Material\n    gltf_procedural_constant_color4 --\u003e gltf_procedural_output_color4\n    gltf_procedural_output_color4 --\"base_color\"--\u003e gltf_Shader\n\u003c/div\u003e\u003c/code\u003e\u003c/pre\u003e\n\u003c/td\u003e\n\u003ctd\u003e\n\u003ca href=\"https://github.com/KhronosGroup/glTF-MaterialX-Converter/blob/main/tests/data/minimal_graph.mtlx\"\u003eMTLX\u003c/a\u003e,\n\u003ca href=\"https://github.com/KhronosGroup/glTF-MaterialX-Converter/blob/main/tests/data/minimal_graph.gltf\"\u003eGLTF\u003c/a\u003e,\n\u003ca href=\"https://github.com/KhronosGroup/glTF-MaterialX-Converter/blob/main/tests/data/minimal_graph_fromgltf.mtlx\"\u003eMTLX from GLTF\u003c/a\u003e,\n\u003ca href=\"https://github.com/KhronosGroup/glTF-MaterialX-Converter/blob/main/tests/data/minimal_graph.usda\"\u003eUSD\u003c/a\u003e\n\u003c/td\u003e\n\u003ctd\u003e\n\u003cimg src=\"https://github.com/KhronosGroup/glTF-MaterialX-Converter/blob/main/tests/data/minimal_graph.png?raw=true\"\u003e\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\u003ch4 id=\"test-data\"\u003eTest Data\u003c/h4\u003e\n\u003cp\u003eThe following is a set of example files used for unit testing. The term \u0026quot;Compound nodes\u0026quot; refers to nodes\u003cbr\u003e\nwhich are implemented as node graphs themselves (\u0026quot;functional graphs\u0026quot; in MaterialX terminology)\u003c/p\u003e\n\u003cp\u003eFor each \u003ccode\u003eMaterialX\u003c/code\u003e file the resulting \u003ccode\u003eglTF\u003c/code\u003e file is given, along with a diagram of how the graph looks and reference image.\u003cbr\u003e\nA sample conversion from MaterialX to \u003ccode\u003eUSDShade\u003c/code\u003e network is provided where applicable.\u003c/p\u003e\n\u003cdetails open\u003e\u003csummary\u003eExamples\u003c/summary\u003e\n\u003ctable\u003e\n\u003ctr\u003e\n\u003cth\u003eDescription\n\u003cth\u003eDocuments\n\u003cth\u003eReference Image\n\u003ctr\u003e\n\u003ctd\u003e \nThe following is a simple graph which adds two colors together.\n\u003cul\u003e\n\u003cli\u003eGraph count: single\u003c/li\u003e\n\u003cli\u003eGraph inputs: multiple\u003c/li\u003e\n\u003cli\u003eGraph outputs: single\u003c/li\u003e\n\u003cli\u003eStream inputs: no\u003c/li\u003e\n\u003cli\u003eCompound nodes: none\u003c/li\u003e\n\u003cli\u003eDownstream shader: glTF PBR\u003c/li\u003e\n\u003c/ul\u003e\n\u003cpre\u003e\u003ccode class=\"language-mermaid\"\u003e\u003cdiv class=\"mermaid\"\u003egraph TB\n    subgraph graph1\n    graph1_myin1([input:1,0,0])\n    style graph1_myin1  fill:#09D, color:#FFF\n    graph1_myin2([input:0.94902, 0.768627, 0.109804])\n    style graph1_myin2  fill:#09D, color:#FFF\n    graph1_output_color4([output])\n    style graph1_output_color4  fill:#09D, color:#FFF\n    graph1_add_color4[add]\n    end\n    Default([surfacematerial])\n    style Default   fill:#090, color:#FFF\n    gltf_mat[gltf_pbr]\n    graph1_myin2 --\"in1\"--\u003e graph1_add_color4\n    graph1_myin1 --\"in2\"--\u003e graph1_add_color4\n    graph1_add_color4 --\u003e graph1_output_color4\n    gltf_mat --\"surfaceshader\"--\u003e Default\n    graph1_output_color4 --\"base_color\"--\u003e gltf_mat\n\u003c/div\u003e\u003c/code\u003e\u003c/pre\u003e\n\u003c/td\u003e\n\u003ctd\u003e\n\u003ca href=\"https://github.com/KhronosGroup/glTF-MaterialX-Converter/blob/main/tests/data/add_graph.mtlx\"\u003eMTLX\u003c/a\u003e,\n\u003ca href=\"https://github.com/KhronosGroup/glTF-MaterialX-Converter/blob/main/tests/data/add_graph.gltf\"\u003eGLTF\u003c/a\u003e,\n\u003ca href=\"https://github.com/KhronosGroup/glTF-MaterialX-Converter/blob/main/tests/data/add_graph_fromgltf.mtlx\"\u003eMTLX from GLTF\u003c/a\u003e,\n\u003ca href=\"https://github.com/KhronosGroup/glTF-MaterialX-Converter/blob/main/tests/data/add_graph.usda\"\u003eUSD\u003c/a\u003e\n\u003c/td\u003e\n\u003ctd\u003e\n\u003cimg src=\"https://github.com/KhronosGroup/glTF-MaterialX-Converter/blob/main/tests/data/add_graph.png?raw=true\"\u003e\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\n\u003cp\u003eThe following is a pattern graph that produces a checkerboard pattern.\u003cbr\u003e\nThe two input colors, and a texture coordinate tiling option are exposed on the node graph. The output is a color which is routed to a downstream glTF PBR shading node (glTF material).\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003eGraph count: single\u003c/li\u003e\n\u003cli\u003eGraph inputs: multiple\u003c/li\u003e\n\u003cli\u003eGraph outputs: single\u003c/li\u003e\n\u003cli\u003eStream inputs: yes\u003c/li\u003e\n\u003cli\u003eCompound nodes: none\u003c/li\u003e\n\u003cli\u003eDownstream shader: glTF PBR\u003c/li\u003e\n\u003c/ul\u003e\n\u003cpre\u003e\u003ccode class=\"language-mermaid\"\u003e\u003cdiv class=\"mermaid\"\u003egraph TB\n    subgraph NG_main\n    NG_main_uvtiling([input:vector2:8,8])\n    style NG_main_uvtiling  fill:#09D, color:#FFF\n    NG_main_color1([input:color3:1,0.094118,0.031373])\n    style NG_main_color1  fill:#09D, color:#FFF\n    NG_main_color2([input:color3:0.035294,0.090196,0.878431])\n    style NG_main_color2  fill:#09D, color:#FFF\n    NG_main_output_N_mtlxmix_out([output:color3])\n    style NG_main_output_N_mtlxmix_out  fill:#09D, color:#FFF\n    NG_main_N_mtlxmix[mix:color3]\n    NG_main_N_mtlxdotproduct[dotproduct:float]\n    NG_main_N_mtlxmult[multiply:vector2]\n    NG_main_N_mtlxsubtract[subtract:vector2]\n    NG_main_N_mtlxfloor[floor:vector2]\n    NG_main_N_modulo[modulo:float]\n    NG_main_Texcoord[texcoord:vector2:0]\n    end\n    Gltf_pbr[gltf_pbr:surfaceshader]\n    MAT_Gltf_pbr([surfacematerial:material])\n    style MAT_Gltf_pbr   fill:#090, color:#FFF\n    NG_main_N_mtlxmix --\u003e NG_main_output_N_mtlxmix_out\n    NG_main_color1 --\"fg\"--\u003e NG_main_N_mtlxmix\n    NG_main_color2 --\"bg\"--\u003e NG_main_N_mtlxmix\n    NG_main_N_modulo --\"mix\"--\u003e NG_main_N_mtlxmix\n    NG_main_N_mtlxfloor --\"in1\"--\u003e NG_main_N_mtlxdotproduct\n    NG_main_Texcoord --\"in1\"--\u003e NG_main_N_mtlxmult\n    NG_main_uvtiling --\"in2\"--\u003e NG_main_N_mtlxmult\n    NG_main_N_mtlxmult --\"in1\"--\u003e NG_main_N_mtlxsubtract\n    NG_main_N_mtlxsubtract --\"in\"--\u003e NG_main_N_mtlxfloor\n    NG_main_N_mtlxdotproduct --\"in1\"--\u003e NG_main_N_modulo\n    NG_main_output_N_mtlxmix_out --\"base_color\"--\u003e Gltf_pbr\n    Gltf_pbr --\"surfaceshader\"--\u003e MAT_Gltf_pbr\n\u003c/div\u003e\u003c/code\u003e\u003c/pre\u003e\n\u003c/td\u003e\n\u003ctd\u003e\n\u003ca href=\"https://github.com/KhronosGroup/glTF-MaterialX-Converter/blob/main/tests/data/checkerboard_graph.mtlx\"\u003eMTLX\u003c/a\u003e,\n\u003ca href=\"https://github.com/KhronosGroup/glTF-MaterialX-Converter/blob/main/tests/data/checkerboard_graph.gltf\"\u003eGLTF\u003c/a\u003e,\n\u003ca href=\"https://github.com/KhronosGroup/glTF-MaterialX-Converter/blob/main/tests/data/checkerboard_graph_fromgltf.mtlx\"\u003eMTLX from GLTF\u003c/a\u003e,\n\u003ca href=\"https://github.com/KhronosGroup/glTF-MaterialX-Converter/blob/main/tests/data/checkerboard_graph.usda\"\u003eUSD\u003c/a\u003e\n\u003c/td\u003e\n\u003ctd\u003e\u003cimg src=\"https://github.com/KhronosGroup/glTF-MaterialX-Converter/blob/main/tests/data/checkerboard_graph.png?raw=true\"\u003e\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003ePattern graph only without any materials.\n\u003cul\u003e\n\u003cli\u003eGraph count: single\u003c/li\u003e\n\u003cli\u003eGraph inputs: multiple\u003c/li\u003e\n\u003cli\u003eGraph outputs: single\u003c/li\u003e\n\u003cli\u003eStream inputs: no\u003c/li\u003e\n\u003cli\u003eCompound nodes: yes\u003c/li\u003e\n\u003cli\u003eDownstream shader: none\u003c/li\u003e\n\u003c/ul\u003e\n\u003cpre\u003e\u003ccode class=\"language-mermaid\"\u003e\u003cdiv class=\"mermaid\"\u003egraph TB\n    subgraph splittb_graph\n    splittb_graph_output_color4([output_color4])\n    style splittb_graph_output_color4  fill:#09D, color:#FFF\n    splittb_graph_splittb_color4[splittb_color4]\n    splittb_graph_texcoord_vector[texcoord_vector:0]\n    end\n    subgraph checker_graph\n    checker_graph_output_color5([output_color5])\n    style checker_graph_output_color5  fill:#09D, color:#FFF\n    checker_graph_checkerboard_color4[checkerboard_color4]\n    checker_graph_texcoord_vector3[texcoord_vector3:0]\n    end\n    splittb_graph_texcoord_vector --\"texcoord\"--\u003e splittb_graph_splittb_color4\n    splittb_graph_splittb_color4 --\u003e splittb_graph_output_color4\n    checker_graph_texcoord_vector3 --\"texcoord\"--\u003e checker_graph_checkerboard_color4\n    checker_graph_checkerboard_color4 --\u003e checker_graph_output_color5\n\u003c/div\u003e\u003c/code\u003e\u003c/pre\u003e\n\u003c/td\u003e\n\u003ctd\u003e\n\u003ca href=\"https://github.com/KhronosGroup/glTF-MaterialX-Converter/blob/main/tests/data/no_material.mtlx\"\u003eMTLX\u003c/a\u003e,\n\u003ca href=\"https://github.com/KhronosGroup/glTF-MaterialX-Converter/blob/main/tests/data/no_material.gltf\"\u003eGLTF\u003c/a\u003e,\n\u003ca href=\"https://github.com/KhronosGroup/glTF-MaterialX-Converter/blob/main/tests/data/no_material_fromgltf.mtlx\"\u003eMTLX from GLTF\u003c/a\u003e,\n\u003ctd\u003e\u003cimg src=\"https://github.com/KhronosGroup/glTF-MaterialX-Converter/blob/main/tests/data/no_material.png?raw=true\"\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\nPattern connected to an unsupported (non-glTF) PBR downstream shader.\n\u003cul\u003e\n\u003cli\u003eGraph count: single\u003c/li\u003e\n\u003cli\u003eGraph inputs: multiple\u003c/li\u003e\n\u003cli\u003eGraph outputs: single\u003c/li\u003e\n\u003cli\u003eStream inputs: no\u003c/li\u003e\n\u003cli\u003eCompound nodes: yes\u003c/li\u003e\n\u003cli\u003eDownstream shader: \u0026quot;standard surface\u0026quot;\u003c/li\u003e\n\u003c/ul\u003e\n\u003cpre\u003e\u003ccode class=\"language-mermaid\"\u003e\u003cdiv class=\"mermaid\"\u003egraph TB\n    subgraph splittb_graph\n    splittb_graph_output_color4([output_color4])\n    style splittb_graph_output_color4  fill:#09D, color:#FFF\n    splittb_graph_splittb_color4[splittb_color4]\n    splittb_graph_texcoord_vector3[texcoord_vector3:0]\n    end\n    subgraph checker_graph\n    checker_graph_output_color5([output_color5])\n    style checker_graph_output_color5  fill:#09D, color:#FFF\n    checker_graph_checkerboard_color4[checkerboard_color4]\n    checker_graph_texcoord_vector3[texcoord_vector3:0]\n    end\n    standard_surface_surfaceshader1[standard_surface_surfaceshader1]\n    surfacematerial_material1([surfacematerial_material1])\n    style surfacematerial_material1   fill:#090, color:#FFF\n    surfacematerial_material2([surfacematerial_material2])\n    style surfacematerial_material2   fill:#090, color:#FFF\n    standard_surface_surfaceshader2[standard_surface_surfaceshader2]\n    splittb_graph_splittb_color4 --\u003e splittb_graph_output_color4\n    splittb_graph_texcoord_vector3 --\"texcoord\"--\u003e splittb_graph_splittb_color4\n    checker_graph_checkerboard_color4 --\u003e checker_graph_output_color5\n    checker_graph_texcoord_vector3 --\"texcoord\"--\u003e checker_graph_checkerboard_color4\n    splittb_graph_output_color4 --\"base_color\"--\u003e standard_surface_surfaceshader1\n    standard_surface_surfaceshader1 --\"surfaceshader\"--\u003e surfacematerial_material1\n    standard_surface_surfaceshader2 --\"surfaceshader\"--\u003e surfacematerial_material2\n    checker_graph_output_color5 --\"base_color\"--\u003e standard_surface_surfaceshader2\n\u003c/div\u003e\u003c/code\u003e\u003c/pre\u003e\n\u003c/td\u003e\n\u003ctd\u003e\n\u003ca href=\"https://github.com/KhronosGroup/glTF-MaterialX-Converter/blob/main/tests/data/unsupported_stdsurf.mtlx\"\u003eMTLX\u003c/a\u003e,\n\u003ca href=\"https://github.com/KhronosGroup/glTF-MaterialX-Converter/blob/main/tests/data/unsupported_stdsurf.gltf\"\u003eGLTF\u003c/a\u003e,\n\u003ca href=\"https://github.com/KhronosGroup/glTF-MaterialX-Converter/blob/main/tests/data/unsupported_stdsurf_fromgltf.mtlx\"\u003eMTLX from GLTF\u003c/a\u003e\n\u003ca href=\"https://github.com/KhronosGroup/glTF-MaterialX-Converter/blob/main/tests/data/unsupported_stdsurf.usda\"\u003eUSD\u003c/a\u003e,\n\u003c/td\u003e\n\u003ctd\u003e\u003cimg src=\"https://github.com/KhronosGroup/glTF-MaterialX-Converter/blob/main/tests/data/unsupported_stdsurf.png?raw=true\"\u003e (original)\n\u003cimg src=\"https://github.com/KhronosGroup/glTF-MaterialX-Converter/blob/main/tests/data/no_material.png?raw=true\"\u003e (skipping material )\n\u003c/td\u003e\n\u003ctr\u003e\n\u003ctd\u003ePattern graph using a file texture\n\u003cul\u003e\n\u003cli\u003eGraph count: single\u003c/li\u003e\n\u003cli\u003eGraph inputs: none\u003c/li\u003e\n\u003cli\u003eGraph outputs: single\u003c/li\u003e\n\u003cli\u003eStream inputs: yes\u003c/li\u003e\n\u003cli\u003eFile inputs: single. Non-default filtering.\u003c/li\u003e\n\u003cli\u003eCompound nodes: yes. UV placement.\u003c/li\u003e\n\u003cli\u003eDownstream shader: gltf PBR\u003c/li\u003e\n\u003c/ul\u003e\n\u003cpre\u003e\u003ccode class=\"language-mermaid\"\u003e\u003cdiv class=\"mermaid\"\u003egraph TB\n    subgraph nodegraph1\n    nodegraph1_output_color3([output_color3:color3])\n    style nodegraph1_output_color3  fill:#09D, color:#FFF\n    nodegraph1_image_color3[image_color3:color3]\n    nodegraph1_place2d_vector2[place2d_vector2:vector2]\n    nodegraph1_texcoord_vector2[texcoord_vector2:vector2:1]\n    end\n    gltf_pbr_surfaceshader[gltf_pbr_surfaceshader:surfaceshader]\n    surfacematerial([surfacematerial:material])\n    style surfacematerial   fill:#090, color:#FFF\n    nodegraph1_image_color3 --\u003e nodegraph1_output_color3\n    nodegraph1_place2d_vector2 --\"texcoord\"--\u003e nodegraph1_image_color3\n    nodegraph1_texcoord_vector2 --\"texcoord\"--\u003e nodegraph1_place2d_vector2\n    nodegraph1_output_color3 --\"base_color\"--\u003e gltf_pbr_surfaceshader\n    gltf_pbr_surfaceshader --\"surfaceshader\"--\u003e surfacematerial\n\u003c/div\u003e\u003c/code\u003e\u003c/pre\u003e\n\u003c/td\u003e\n\u003ctd\u003e\u003ca href=\"https://github.com/KhronosGroup/glTF-MaterialX-Converter/blob/main/tests/data/bindings/gltf_simple_filetexture.mtlx\"\u003eMTLX\u003c/a\u003e,\n\u003ca href=\"https://github.com/KhronosGroup/glTF-MaterialX-Converter/blob/main/tests/data/bindings/gltf_simple_filetexture.gltf\"\u003eGLTF\u003c/a\u003e,\n\u003ca href=\"https://github.com/KhronosGroup/glTF-MaterialX-Converter/blob/main/tests/data/bindings/gltf_simple_filetexture_fromgltf.mtlx\"\u003eMTLX from GLTF\u003c/a\u003e,\n\u003ca href=\"https://github.com/KhronosGroup/glTF-MaterialX-Converter/blob/main/tests/data/bindings/gltf_simple_filetexture.usda\"\u003eUSD\u003c/a\u003e\n\u003ctd\u003e\u003cimg src=\"https://github.com/KhronosGroup/glTF-MaterialX-Converter/blob/main/tests/data/bindings/gltf_simple_filetexture.png?raw=true\"\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003ePattern graph using using multiple file textures with different texture placements and a shared input stream.\n\u003cul\u003e\n\u003cli\u003eGraph count: single\u003c/li\u003e\n\u003cli\u003eGraph inputs: none\u003c/li\u003e\n\u003cli\u003eGraph outputs: single\u003c/li\u003e\n\u003cli\u003eStream inputs: yes\u003c/li\u003e\n\u003cli\u003eFile inputs: multiple\u003c/li\u003e\n\u003cli\u003eCompound nodes: yes.\u003c/li\u003e\n\u003cli\u003eDownstream shader: gltf PBR\u003c/li\u003e\n\u003c/ul\u003e\n\u003cpre\u003e\u003ccode class=\"language-mermaid\"\u003e\u003cdiv class=\"mermaid\"\u003egraph TB\n    gltf_pbr_surfaceshader[gltf_pbr:surfaceshader]\n    surfacematerial([surfacematerial:material])\n    style surfacematerial   fill:#090, color:#FFF\n    subgraph nodegraph1\n    nodegraph1_output_color3([output:color3])\n    style nodegraph1_output_color3  fill:#09D, color:#FFF\n    nodegraph1_texcoord_vector2[texcoord:vector2:0]\n    nodegraph1_place2d_vector3[place2d:vector2]\n    nodegraph1_multiply_color4[multiply:color3]\n    nodegraph1_image_color4[image:color3]\n    nodegraph1_image_color3[image:color3]\n    nodegraph1_place2d_vector2[place2d:vector2]\n    end\n    nodegraph1_output_color3 --\"base_color\"--\u003e gltf_pbr_surfaceshader\n    gltf_pbr_surfaceshader --\"surfaceshader\"--\u003e surfacematerial\n    nodegraph1_multiply_color4 --\u003e nodegraph1_output_color3\n    nodegraph1_texcoord_vector2 --\"texcoord\"--\u003e nodegraph1_place2d_vector3\n    nodegraph1_image_color3 --\"in1\"--\u003e nodegraph1_multiply_color4\n    nodegraph1_image_color4 --\"in2\"--\u003e nodegraph1_multiply_color4\n    nodegraph1_place2d_vector3 --\"texcoord\"--\u003e nodegraph1_image_color4\n    nodegraph1_place2d_vector2 --\"texcoord\"--\u003e nodegraph1_image_color3\n    nodegraph1_texcoord_vector2 --\"texcoord\"--\u003e nodegraph1_place2d_vector2\n\u003c/div\u003e\u003c/code\u003e\u003c/pre\u003e\n\u003c/td\u003e\n\u003ctd\u003e\n\u003ca href=\"https://github.com/KhronosGroup/glTF-MaterialX-Converter/blob/main/tests/data/bindings/gltf_shared_filetexture.mtlx\"\u003eMTLX\u003c/a\u003e,\n\u003ca href=\"https://github.com/KhronosGroup/glTF-MaterialX-Converter/blob/main/tests/data/bindings/gltf_shared_filetexture.gltf\"\u003eGLTF\u003c/a\u003e,\n\u003ca href=\"https://github.com/KhronosGroup/glTF-MaterialX-Converter/blob/main/tests/data/bindings/gltf_shared_filetexture_fromgtlf.mtlx\"\u003eMTLX from GLTF\u003c/a\u003e,\n\u003ca href=\"https://github.com/KhronosGroup/glTF-MaterialX-Converter/blob/main/tests/data/bindings/gltf_shared_filetexture.usda\"\u003eUSD\u003c/a\u003e\n\u003ctd\u003e\u003cimg src=\"https://github.com/KhronosGroup/glTF-MaterialX-Converter/blob/main/tests/data/bindings/gltf_shared_filetexture.png?raw=true\"\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003ePattern graph using using multiple file textures routed to different outputs. Each output\nis connected to a different downstream shader.\n\u003cul\u003e\n\u003cli\u003eGraph count: single\u003c/li\u003e\n\u003cli\u003eGraph inputs: none\u003c/li\u003e\n\u003cli\u003eGraph outputs: single\u003c/li\u003e\n\u003cli\u003eStream inputs: yes\u003c/li\u003e\n\u003cli\u003eFile inputs: yes.\u003c/li\u003e\n\u003cli\u003eCompound nodes: yes.\u003c/li\u003e\n\u003cli\u003eDownstream shader: gltf PBR\u003c/li\u003e\n\u003c/ul\u003e\n\u003cpre\u003e\u003ccode class=\"language-mermaid\"\u003e\u003cdiv class=\"mermaid\"\u003egraph TB\n    gltf_pbr_surfaceshader[gltf_pbr:surfaceshader]\n    surfacematerial([surfacematerial:material])\n    style surfacematerial   fill:#090, color:#FFF\n    surfacematerial1([surfacematerial:material])\n    style surfacematerial1   fill:#090, color:#FFF\n    gltf_pbr_surfaceshader1[gltf_pbr:surfaceshader]\n    subgraph nodegraph1\n    nodegraph1_output_color4([output:color3])\n    style nodegraph1_output_color4  fill:#09D, color:#FFF\n    nodegraph1_output_color3([output:color3])\n    style nodegraph1_output_color3  fill:#09D, color:#FFF\n    nodegraph1_texcoord_vector2[texcoord:vector2:0]\n    nodegraph1_place2d_vector3[place2d:vector2]\n    nodegraph1_place2d_vector2[place2d:vector2]\n    nodegraph1_image_color4[image:color3]\n    nodegraph1_image_color3[image:color3]\n    end\n    nodegraph1_output_color3 --\"base_color\"--\u003e gltf_pbr_surfaceshader\n    gltf_pbr_surfaceshader --\"surfaceshader\"--\u003e surfacematerial\n    gltf_pbr_surfaceshader1 --\"surfaceshader\"--\u003e surfacematerial1\n    nodegraph1_output_color4 --\"base_color\"--\u003e gltf_pbr_surfaceshader1\n    nodegraph1_texcoord_vector2 --\"texcoord\"--\u003e nodegraph1_place2d_vector3\n    nodegraph1_texcoord_vector2 --\"texcoord\"--\u003e nodegraph1_place2d_vector2\n    nodegraph1_place2d_vector3 --\"texcoord\"--\u003e nodegraph1_image_color4\n    nodegraph1_image_color4 --\u003e nodegraph1_output_color4\n    nodegraph1_image_color3 --\u003e nodegraph1_output_color3\n    nodegraph1_place2d_vector2 --\"texcoord\"--\u003e nodegraph1_image_color3\n\u003c/div\u003e\u003c/code\u003e\u003c/pre\u003e\n\u003c/td\u003e\n\u003ctd\u003e\n\u003ca href=\"https://github.com/KhronosGroup/glTF-MaterialX-Converter/blob/main/tests/data/bindings/gltf_shared_filetexture_2.mtlx\"\u003eMTLX\u003c/a\u003e,\n\u003ca href=\"https://github.com/KhronosGroup/glTF-MaterialX-Converter/blob/main/tests/data/bindings/gltf_shared_filetexture_2.gltf\"\u003eGLTF\u003c/a\u003e,\n\u003ca href=\"https://github.com/KhronosGroup/glTF-MaterialX-Converter/blob/main/tests/data/bindings/gltf_shared_filetexture_2_fromgltf.mtlx\"\u003eMTLX from GLTF\u003c/a\u003e,\n\u003ca href=\"https://github.com/KhronosGroup/glTF-MaterialX-Converter/blob/main/tests/data/bindings/gltf_shared_filetexture_2.usda\"\u003eUSD\u003c/a\u003e\n\u003ctd\u003e\u003cimg src=\"https://github.com/KhronosGroup/glTF-MaterialX-Converter/blob/main/tests/data/bindings/gltf_shared_filetexture_2.png?raw=true\"\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\nProcedural graph with intermediary node for shader translation (from standard surface to glTF PBR)\n\u003cul\u003e\n\u003cli\u003eGraph count: multiple\u003c/li\u003e\n\u003cli\u003eGraph inputs: none\u003c/li\u003e\n\u003cli\u003eGraph outputs: single\u003c/li\u003e\n\u003cli\u003eCompound nodes: yes\u003c/li\u003e\n\u003cli\u003eTranslation node: yes\u003c/li\u003e\n\u003cli\u003eDownstream shader: gltf PBR\u003c/li\u003e\n\u003c/ul\u003e\n\u003cpre\u003e\u003ccode class=\"language-mermaid\"\u003e\u003cdiv class=\"mermaid\"\u003egraph LR\n    surfacematerial_material1([surfacematerial_material1])\n    style surfacematerial_material1   fill:#090, color:#FFF\n    gltf_pbr[gltf_pbr]\n    subgraph translation_graph\n    translation_graph_base_color_out([base_color_out])\n    style translation_graph_base_color_out  fill:#09D, color:#FFF\n    translation_graph_metallic_out([metallic_out])\n    style translation_graph_metallic_out  fill:#09D, color:#FFF\n    translation_graph_roughness_out([roughness_out])\n    style translation_graph_roughness_out  fill:#09D, color:#FFF\n    translation_graph_transmission_out([transmission_out])\n    style translation_graph_transmission_out  fill:#09D, color:#FFF\n    translation_graph_thickness_out([thickness_out])\n    style translation_graph_thickness_out  fill:#09D, color:#FFF\n    translation_graph_attenuation_color_out([attenuation_color_out])\n    style translation_graph_attenuation_color_out  fill:#09D, color:#FFF\n    translation_graph_sheen_color_out([sheen_color_out])\n    style translation_graph_sheen_color_out  fill:#09D, color:#FFF\n    translation_graph_sheen_roughness_out([sheen_roughness_out])\n    style translation_graph_sheen_roughness_out  fill:#09D, color:#FFF\n    translation_graph_clearcoat_out([clearcoat_out])\n    style translation_graph_clearcoat_out  fill:#09D, color:#FFF\n    translation_graph_clearcoat_roughness_out([clearcoat_roughness_out])\n    style translation_graph_clearcoat_roughness_out  fill:#09D, color:#FFF\n    translation_graph_emissive_out([emissive_out])\n    style translation_graph_emissive_out  fill:#09D, color:#FFF\n    translation_graph_ss_to_gltf[ss_to_gltf]\n    end\n    gltf_pbr --\"surfaceshader\"--\u003e surfacematerial_material1\n    translation_graph_base_color_out --\"base_color\"--\u003e gltf_pbr\n    translation_graph_metallic_out --\"metallic\"--\u003e gltf_pbr\n    translation_graph_roughness_out --\"roughness\"--\u003e gltf_pbr\n    translation_graph_transmission_out --\"transmission\"--\u003e gltf_pbr\n    translation_graph_sheen_color_out --\"sheen_color\"--\u003e gltf_pbr\n    translation_graph_sheen_roughness_out --\"sheen_roughness\"--\u003e gltf_pbr\n    translation_graph_clearcoat_out --\"clearcoat\"--\u003e gltf_pbr\n    translation_graph_clearcoat_roughness_out --\"clearcoat_roughness\"--\u003e gltf_pbr\n    translation_graph_emissive_out --\"emissive\"--\u003e gltf_pbr\n    translation_graph_thickness_out --\"thickness\"--\u003e gltf_pbr\n    translation_graph_attenuation_color_out --\"attenuation_color\"--\u003e gltf_pbr\n    translation_graph_ss_to_gltf --\"base_color_out\"--\u003e translation_graph_base_color_out\n    translation_graph_ss_to_gltf --\"metallic_out\"--\u003e translation_graph_metallic_out\n    translation_graph_ss_to_gltf --\"roughness_out\"--\u003e translation_graph_roughness_out\n    translation_graph_ss_to_gltf --\"transmission_out\"--\u003e translation_graph_transmission_out\n    translation_graph_ss_to_gltf --\"thickness_out\"--\u003e translation_graph_thickness_out\n    translation_graph_ss_to_gltf --\"attenuation_color_out\"--\u003e translation_graph_attenuation_color_out\n    translation_graph_ss_to_gltf --\"sheen_color_out\"--\u003e translation_graph_sheen_color_out\n    translation_graph_ss_to_gltf --\"sheen_roughness_out\"--\u003e translation_graph_sheen_roughness_out\n    translation_graph_ss_to_gltf --\"clearcoat_out\"--\u003e translation_graph_clearcoat_out\n    translation_graph_ss_to_gltf --\"clearcoat_roughness_out\"--\u003e translation_graph_clearcoat_roughness_out\n    translation_graph_ss_to_gltf --\"emissive_out\"--\u003e translation_graph_emissive_out\n\u003c/div\u003e\u003c/code\u003e\u003c/pre\u003e\n\u003c/td\u003e\n\u003ctd\u003e\n\u003ca href=\"https://github.com/KhronosGroup/glTF-MaterialX-Converter/blob/main/tests/data/shader_translation.mtlx\"\u003eMTLX\u003c/a\u003e,\n\u003ca href=\"https://github.com/KhronosGroup/glTF-MaterialX-Converter/blob/main/tests/data/shader_translation.gltf\"\u003eGLTF\u003c/a\u003e,\n\u003ca href=\"https://github.com/KhronosGroup/glTF-MaterialX-Converter/blob/main/tests/data/shader_translation_fromgltf.mtlx\"\u003eMTLX from GLTF\u003c/a\u003e\n\u003c!-- \u003ca href=\"https://github.com/KhronosGroup/glTF-MaterialX-Converter/blob/main/tests/data/shader_translation.usda\"\u003eUSD\u003c/a\u003e --\u003e\n\u003c/td\u003e\n\u003ctd\u003e\n\u003cimg src=\"https://github.com/KhronosGroup/glTF-MaterialX-Converter/blob/main/tests/data/shader_translation.png?raw=true\"\u003e\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eExample where the root shader is an \"unlit shader\". Shader is mapped to a ramp. \n\u003cul\u003e\n\u003cli\u003eGraph count: single\u003c/li\u003e\n\u003cli\u003eGraph inputs: none\u003c/li\u003e\n\u003cli\u003eGraph outputs: single\u003c/li\u003e\n\u003cli\u003eCompound nodes: yes.\u003c/li\u003e\n\u003cli\u003eDownstream shader: \u0026quot;unlit shader\u0026quot;\u003c/li\u003e\n\u003c/ul\u003e\n\u003cpre\u003e\u003ccode class=\"language-mermaid\"\u003e\u003cdiv class=\"mermaid\"\u003egraph TB\n    subgraph unlit_graph\n    unlit_graph_output_color4([output_color4:color3])\n    style unlit_graph_output_color4  fill:#09D, color:#FFF\n    unlit_graph_ramplr_color4[ramplr_color4:color3]\n    end\n    unlitshader[unlitshader:surfaceshader]\n    MAT_unlitshader([MAT_unlitshader:material])\n    style MAT_unlitshader   fill:#090, color:#FFF\n    unlit_graph_ramplr_color4 --\u003e unlit_graph_output_color4\n    unlit_graph_output_color4 --\"emission_color\"--\u003e unlitshader\n    unlitshader --\"surfaceshader\"--\u003e MAT_unlitshader\n\u003c/div\u003e\u003c/code\u003e\u003c/pre\u003e\n\u003c/td\u003e\n\u003ctd\u003e\n\u003ca href=\"https://github.com/KhronosGroup/glTF-MaterialX-Converter/blob/main/tests/data/unlit_graph.mtlx\"\u003eMTLX\u003c/a\u003e,\n\u003ca href=\"https://github.com/KhronosGroup/glTF-MaterialX-Converter/blob/main/tests/data/unlit_graph.gltf\"\u003eGLTF\u003c/a\u003e,\n\u003ca href=\"https://github.com/KhronosGroup/glTF-MaterialX-Converter/blob/main/tests/data/unlit_graph_fromgltf.mtlx\"\u003eMTLX from GLTF\u003c/a\u003e\n\u003ca href=\"https://github.com/KhronosGroup/glTF-MaterialX-Converter/blob/main/tests/data/unlit_graph.usda\"\u003eUSD\u003c/a\u003e\n\u003c/td\u003e\n\u003ctd\u003e\n\u003cimg src=\"https://github.com/KhronosGroup/glTF-MaterialX-Converter/blob/main/tests/data/unlit_graph.png?raw=true\"\u003e\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eExample MaterialX version of \"boombox\" example (from Khronos sample assets) that shows file name resolving.\n\u003cul\u003e\n\u003cli\u003eGraph count: single\u003c/li\u003e\n\u003cli\u003eGraph inputs: none\u003c/li\u003e\n\u003cli\u003eGraph outputs: one\u003c/li\u003e\n\u003cli\u003eFile inputs: yes.\u003c/li\u003e\n\u003cli\u003eFile prefix: resolved during conversion (as is done for \u0026quot;UsdMtlx\u0026quot; resolve)\u003c/li\u003e\n\u003cli\u003eCompound nodes: no\u003c/li\u003e\n\u003cli\u003eDownstream shader: glTF PBR\u003c/li\u003e\n\u003c/ul\u003e\n\u003cpre\u003e\u003ccode class=\"language-mermaid\"\u003e\u003cdiv class=\"mermaid\"\u003egraph LR\n    subgraph boombox_graph\n    boombox_graph_out_Image([out_Image])\n    style boombox_graph_out_Image  fill:#09D, color:#FFF\n    boombox_graph_texcoord1[texcoord1:0]\n    boombox_graph_Image[Image]\n    end\n    SR_boombox[SR_boombox]\n    Material_boombox([Material_boombox])\n    style Material_boombox   fill:#090, color:#FFF\n    boombox_graph_texcoord1 --\"texcoord\"--\u003e boombox_graph_Image\n    boombox_graph_Image --\u003e boombox_graph_out_Image\n    boombox_graph_out_Image --\"base_color\"--\u003e SR_boombox\n    SR_boombox --\"surfaceshader\"--\u003e Material_boombox\n\u003c/div\u003e\u003c/code\u003e\u003c/pre\u003e\n\u003c/td\u003e\n\u003ctd\u003e\n\u003ca href=\"https://github.com/KhronosGroup/glTF-MaterialX-Converter/blob/main/tests/data/gltf_examples/gltf_pbr_boombox.mtlx\"\u003eMTLX\u003c/a\u003e,\n\u003ca href=\"https://github.com/KhronosGroup/glTF-MaterialX-Converter/blob/main/tests/data/gltf_examples/gltf_pbr_boombox.gltf\"\u003eGLTF\u003c/a\u003e,\n\u003ca href=\"https://github.com/KhronosGroup/glTF-MaterialX-Converter/blob/main/tests/data/gltf_examples/gltf_pbr_boombox_fromgltf.mtlx\"\u003eMTLX from GLTF\u003c/a\u003e,\n\u003ca href=\"https://github.com/KhronosGroup/glTF-MaterialX-Converter/blob/main/tests/data/gltf_examples/gltf_pbr_boombox.usda\"\u003eUSD\u003c/a\u003e\n\u003c/td\u003e\n\u003ctd\u003e\n\u003cimg src=\"https://github.com/KhronosGroup/glTF-MaterialX-Converter/blob/main/tests/data/gltf_examples/gltf_pbr_boombox.png?raw=true\"\u003e\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eExample with various port data types: integer, vec2, vec3, vec4, color3, color4, integer, matrix33, matrix44\n\u003cul\u003e\n\u003cli\u003eGraph count: single\u003c/li\u003e\n\u003cli\u003eGraph inputs: none\u003c/li\u003e\n\u003cli\u003eGraph outputs: 1 per type\u003c/li\u003e\n\u003cli\u003eFile inputs: no\u003c/li\u003e\n\u003cli\u003eCompound nodes: no\u003c/li\u003e\n\u003cli\u003eDownstream shader: glTF PBR\u003c/li\u003e\n\u003c/ul\u003e\n\u003cpre\u003e\u003ccode class=\"language-mermaid\"\u003e\u003cdiv class=\"mermaid\"\u003egraph LR\n    glTF_Material([surfacematerial:material])\n    style glTF_Material   fill:#090, color:#FFF\n    glTF_Shader[gltf_pbr:surfaceshader]\n    subgraph mygraph\n    mygraph_out([output:color3])\n    style mygraph_out  fill:#09D, color:#FFF\n    mygraph_out1([output:color3])\n    style mygraph_out1  fill:#09D, color:#FFF\n    mygraph_out2([output:color3])\n    style mygraph_out2  fill:#09D, color:#FFF\n    mygraph_out3([output:color3])\n    style mygraph_out3  fill:#09D, color:#FFF\n    mygraph_out4([output:color3])\n    style mygraph_out4  fill:#09D, color:#FFF\n    mygraph_out6([output:color3])\n    style mygraph_out6  fill:#09D, color:#FFF\n    mygraph_out7([output:color3])\n    style mygraph_out7  fill:#09D, color:#FFF\n    mygraph_out5([output:color3])\n    style mygraph_out5  fill:#09D, color:#FFF\n    mygraph_out8([output:color3])\n    style mygraph_out8  fill:#09D, color:#FFF\n    mygraph_convert_color4[convert:color3]\n    mygraph_convert_color5[convert:color3]\n    mygraph_convert_color6[convert:color3]\n    mygraph_convert_color7[convert:color3]\n    mygraph_determinant_float1[determinant:float]\n    mygraph_convert_color8[convert:color3]\n    mygraph_convert_color9[convert:color3]\n    mygraph_determinant_float2[determinant:float]\n    mygraph_convert_color10[convert:color3]\n    mygraph_mix_color3[mix:color3]\n    mygraph_mix_float1[mix:float]\n    mygraph_mix_color5[mix:color4]\n    mygraph_mix_vector2[mix:vector2]\n    mygraph_multiply_matrix34[multiply:matrix33]\n    mygraph_multiply_matrix45[multiply:matrix44]\n    mygraph_constant_integer1([constant:integer:1])\n    style mygraph_constant_integer1  fill:#888, color:#000\n    mygraph_mix_vector3[mix:vector3]\n    mygraph_convert_color11[convert:color3]\n    mygraph_mix_vector5[mix:vector4]\n    end\n    glTF_Shader --\"surfaceshader\"--\u003e glTF_Material\n    mygraph_out --\"base_color\"--\u003e glTF_Shader\n    mygraph_mix_color3 --\u003e mygraph_out\n    mygraph_mix_float1 --\"in\"--\u003e mygraph_convert_color4\n    mygraph_convert_color4 --\u003e mygraph_out1\n    mygraph_mix_color5 --\"in\"--\u003e mygraph_convert_color5\n    mygraph_convert_color5 --\u003e mygraph_out2\n    mygraph_mix_vector3 --\"in\"--\u003e mygraph_convert_color6\n    mygraph_convert_color6 --\u003e mygraph_out3\n    mygraph_mix_vector2 --\"in\"--\u003e mygraph_convert_color7\n    mygraph_multiply_matrix34 --\"in\"--\u003e mygraph_determinant_float1\n    mygraph_convert_color7 --\u003e mygraph_out4\n    mygraph_determinant_float1 --\"in\"--\u003e mygraph_convert_color8\n    mygraph_determinant_float2 --\"in\"--\u003e mygraph_convert_color9\n    mygraph_multiply_matrix45 --\"in\"--\u003e mygraph_determinant_float2\n    mygraph_convert_color9 --\u003e mygraph_out6\n    mygraph_convert_color10 --\u003e mygraph_out7\n    mygraph_constant_integer1 --\"in\"--\u003e mygraph_convert_color10\n    mygraph_convert_color8 --\u003e mygraph_out5\n    mygraph_convert_color11 --\u003e mygraph_out8\n    mygraph_mix_vector5 --\"in\"--\u003e mygraph_convert_color11\n\u003c/div\u003e\u003c/code\u003e\u003c/pre\u003e\n\u003c/td\u003e\n\u003ctd\u003e\n\u003ca href=\"https://github.com/KhronosGroup/glTF-MaterialX-Converter/blob/main/tests/data/supported_types.mtlx\"\u003eMTLX\u003c/a\u003e,\n\u003ca href=\"https://github.com/KhronosGroup/glTF-MaterialX-Converter/blob/main/tests/data/supported_types.gltf\"\u003eGLTF\u003c/a\u003e,\n\u003ca href=\"https://github.com/KhronosGroup/glTF-MaterialX-Converter/blob/main/tests/data/supported_types_fromgltf.mtlx\"\u003eMTLX from GLTF\u003c/a\u003e\n\u003c!-- \u003ca href=\"https://github.com/KhronosGroup/glTF-MaterialX-Converter/blob/main/tests/data/supported_types.usda\"\u003eUSD\u003c/a\u003e --\u003e\n\u003c/td\u003e\n\u003ctd\u003e\u003cimg src=\"https://github.com/KhronosGroup/glTF-MaterialX-Converter/blob/main/tests/data/supported_types.png?raw=true\"\u003e\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eExample glTF file which requires name identifier generation to convert to MaterialX (a named based system)\n\u003cimg src=\"https://github.com/KhronosGroup/glTF-MaterialX-Converter/blob/main/tests/data/noname_checkerboard_graph_diagram.svg?raw=true\"\u003e\n\u003c/td\u003e\n\u003ctd\u003e\n\u003ca href=\"https://github.com/KhronosGroup/glTF-MaterialX-Converter/blob/main/tests/data/noname_checkerboard_graph_fromgltf.mtlx\"\u003eMTLX\u003c/a\u003e,\n\u003ca href=\"https://github.com/KhronosGroup/glTF-MaterialX-Converter/blob/main/tests/data/noname_checkerboard_graph.gltf\"\u003eGLTF\u003c/a\u003e,\n\u003ca href=\"https://github.com/KhronosGroup/glTF-MaterialX-Converter/blob/main/tests/data/noname_checkerboard_graph_fromgltf.mtlx\"\u003eMTLX from GLTF\u003c/a\u003e\n\u003c/td\u003e\n\u003ctd\u003e\n\u003cimg src=\"https://github.com/KhronosGroup/glTF-MaterialX-Converter/blob/main/tests/data/noname_checkerboard_graph_fromgltf.png?raw=true\"\u003e\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\u003c/details\u003e\n\u003ch3 id=\"development-information\"\u003eDevelopment Information\u003c/h3\u003e\n\u003cdetails\u003e\u003csummary\u003e\u003ch4\u003eReference Rendering\u003c/h4\u003e\u003c/summary\u003e\n\u003cp\u003eAll reference images are rendered using the \u003ccode\u003eMaterialXView\u003c/code\u003e sample application which is available as part of\u003cbr\u003e\n\u003ca href=\"https://github.com/AcademySoftwareFoundation/MaterialX/releases\"\u003eMaterialX releases\u003c/a\u003e. The release\u003cbr\u003e\nversion used matches the version requirement for this package.\u003c/p\u003e\n\u003cp\u003eA sample utility called \u003ccode\u003etest_render\u003c/code\u003e is provided which will scan all files MaterialX XML files in a given folder hierarchy and use the path to \u003ccode\u003eMaterialXView\u003c/code\u003e to\u003cbr\u003e\nrender into the same folder.\u003c/p\u003e\n\u003cp\u003eExample:\u003c/p\u003e\n\u003cpre class=\"hljs\"\u003e\u003ccode\u003e\u003cdiv\u003epython utilities/test_render.py tests/data -r 512 -c \u0026lt;path to MaterialXView\u0026gt;\n\u003c/div\u003e\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003ewhere \u003ccode\u003e\u0026lt;path to MaterialXView\u0026gt;\u003c/code\u003e is the path to the MaterialXView executable with\u003cbr\u003e\na the resolution set to 512 by 512.\u003c/p\u003e\n\u003c/details\u003e\n\u003cdetails\u003e\u003csummary\u003e\u003ch4\u003eBuild Scripts\u003c/h4\u003e\u003c/summary\u003e\n\u003cp\u003eSample build scripts are provided in the \u003ccode\u003eutilities\u003c/code\u003e folder as follows:\u003c/p\u003e\n\u003col\u003e\n\u003cli\u003e\u003ccode\u003ebuild.sh\u003c/code\u003e : Will pull from head of the repo, install dependencies, and build the package.\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003ebuild_docs.sh\u003c/code\u003e : Will build only the documentation. Called from \u003ccode\u003ebuild.sh\u003c/code\u003e. Doxygen is assumed to be installed. The README files are generated from the template Markdown file: \u003ccode\u003eutilitites/README_template.md.\u003c/code\u003e This will install the top level as well as the API documentation versions of this file with appropriate formatting to support the \u003ccode\u003eMermaid\u003c/code\u003e graphs used to node graph diagrams.\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003ebuild_tests.sh\u003c/code\u003e : Will run unit tests as well as command line tests.\u003c/li\u003e\n\u003c/ol\u003e\n\u003cp\u003e\u003ccode\u003ebuild.sh\u003c/code\u003e is called within the check-in workflow defined in \u003ccode\u003e.github/workflows/main.yml\u003c/code\u003e\u003c/p\u003e\n\u003c/details\u003e\n\n\u003c/body\u003e\n\u003c/html\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhronosgroup%2Fgltf-materialx-converter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkhronosgroup%2Fgltf-materialx-converter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhronosgroup%2Fgltf-materialx-converter/lists"}