From 8ddd4a458d403dcd7d250d01b4d9712c243aa070 Mon Sep 17 00:00:00 2001 From: Bernard Kwok Date: Tue, 19 Nov 2024 10:42:33 -0500 Subject: [PATCH] From gltf conversion (Part 2) (#29) * docs update. * - Update to use latest 1.39.2 equivalence interface. This should be the final API for the release. - Add in gltf to mtlx images and mtlx links - Add in shader translation example - Update notebook --- README.html | 150 +++++++-- README.md | 154 +++++++-- documents/README_api.md | 156 +++++++-- documents/html/index.html | 105 +++++- ..._converter-_fork_2tests_2_r_e_a_d_m_e.html | 2 +- tests/README.md | 2 +- tests/data/shader_translation.gltf | 307 ++++++++++++++++++ tests/data/shader_translation.mtlx | 39 +++ tests/data/shader_translation.png | Bin 0 -> 157754 bytes tests/data/shader_translation_fromgltf.mtlx | 39 +++ tests/data/shader_translation_fromgltf.png | Bin 0 -> 157754 bytes tests/test_core.py | 7 +- utilities/README_template.md | 154 +++++++-- utilities/build_test.sh | 2 + utilities/mxequivalent.py | 15 +- 15 files changed, 1005 insertions(+), 127 deletions(-) create mode 100644 tests/data/shader_translation.gltf create mode 100644 tests/data/shader_translation.mtlx create mode 100644 tests/data/shader_translation.png create mode 100644 tests/data/shader_translation_fromgltf.mtlx create mode 100644 tests/data/shader_translation_fromgltf.png diff --git a/README.html b/README.html index c664a88..2a434ad 100644 --- a/README.html +++ b/README.html @@ -482,11 +482,13 @@

Supported MaterialX Configurations -MTLX -GLTF +MTLX, +GLTF, +MTLX from GLTF, USD - + + @@ -533,11 +535,13 @@

Test Data

-MTLX -GLTF +MTLX, +GLTF, +MTLX from GLTF, USD - + + @@ -588,8 +592,9 @@

Test Data

-MTLX -GLTF +MTLX, +GLTF, +MTLX from GLTF, USD @@ -624,8 +629,10 @@

Test Data

checker_graph_checkerboard_color4 --> checker_graph_output_color5 -MTLX -GLTF + +MTLX, +GLTF, +MTLX from GLTF, @@ -668,9 +675,11 @@

Test Data

checker_graph_output_color5 --"base_color"--> standard_surface_surfaceshader2 -MTLX -GLTF -USD + +MTLX, +GLTF, +MTLX from GLTF +USD, (original) (skipping material ) @@ -704,8 +713,9 @@

Test Data

gltf_pbr_surfaceshader --"surfaceshader"--> surfacematerial -MTLX -GLTF +MTLX, +GLTF, +MTLX from GLTF, USD @@ -745,8 +755,10 @@

Test Data

nodegraph1_texcoord_vector2 --"texcoord"--> nodegraph1_place2d_vector2 -MTLX -GLTF + +MTLX, +GLTF, +MTLX from GLTF, USD @@ -792,12 +804,87 @@

Test Data

nodegraph1_place2d_vector2 --"texcoord"--> nodegraph1_image_color3 -MTLX -GLTF + +MTLX, +GLTF, +MTLX from GLTF, USD + +Procedural graph with intermediary node for shader translation (from standard surface to glTF PBR) + +
graph LR + surfacematerial_material1([surfacematerial_material1]) + style surfacematerial_material1 fill:#090, color:#FFF + gltf_pbr[gltf_pbr] + subgraph translation_graph + translation_graph_base_color_out([base_color_out]) + style translation_graph_base_color_out fill:#09D, color:#FFF + translation_graph_metallic_out([metallic_out]) + style translation_graph_metallic_out fill:#09D, color:#FFF + translation_graph_roughness_out([roughness_out]) + style translation_graph_roughness_out fill:#09D, color:#FFF + translation_graph_transmission_out([transmission_out]) + style translation_graph_transmission_out fill:#09D, color:#FFF + translation_graph_thickness_out([thickness_out]) + style translation_graph_thickness_out fill:#09D, color:#FFF + translation_graph_attenuation_color_out([attenuation_color_out]) + style translation_graph_attenuation_color_out fill:#09D, color:#FFF + translation_graph_sheen_color_out([sheen_color_out]) + style translation_graph_sheen_color_out fill:#09D, color:#FFF + translation_graph_sheen_roughness_out([sheen_roughness_out]) + style translation_graph_sheen_roughness_out fill:#09D, color:#FFF + translation_graph_clearcoat_out([clearcoat_out]) + style translation_graph_clearcoat_out fill:#09D, color:#FFF + translation_graph_clearcoat_roughness_out([clearcoat_roughness_out]) + style translation_graph_clearcoat_roughness_out fill:#09D, color:#FFF + translation_graph_emissive_out([emissive_out]) + style translation_graph_emissive_out fill:#09D, color:#FFF + translation_graph_ss_to_gltf[ss_to_gltf] + end + gltf_pbr --"surfaceshader"--> surfacematerial_material1 + translation_graph_base_color_out --"base_color"--> gltf_pbr + translation_graph_metallic_out --"metallic"--> gltf_pbr + translation_graph_roughness_out --"roughness"--> gltf_pbr + translation_graph_transmission_out --"transmission"--> gltf_pbr + translation_graph_sheen_color_out --"sheen_color"--> gltf_pbr + translation_graph_sheen_roughness_out --"sheen_roughness"--> gltf_pbr + translation_graph_clearcoat_out --"clearcoat"--> gltf_pbr + translation_graph_clearcoat_roughness_out --"clearcoat_roughness"--> gltf_pbr + translation_graph_emissive_out --"emissive"--> gltf_pbr + translation_graph_thickness_out --"thickness"--> gltf_pbr + translation_graph_attenuation_color_out --"attenuation_color"--> gltf_pbr + translation_graph_ss_to_gltf --"base_color_out"--> translation_graph_base_color_out + translation_graph_ss_to_gltf --"metallic_out"--> translation_graph_metallic_out + translation_graph_ss_to_gltf --"roughness_out"--> translation_graph_roughness_out + translation_graph_ss_to_gltf --"transmission_out"--> translation_graph_transmission_out + translation_graph_ss_to_gltf --"thickness_out"--> translation_graph_thickness_out + translation_graph_ss_to_gltf --"attenuation_color_out"--> translation_graph_attenuation_color_out + translation_graph_ss_to_gltf --"sheen_color_out"--> translation_graph_sheen_color_out + translation_graph_ss_to_gltf --"sheen_roughness_out"--> translation_graph_sheen_roughness_out + translation_graph_ss_to_gltf --"clearcoat_out"--> translation_graph_clearcoat_out + translation_graph_ss_to_gltf --"clearcoat_roughness_out"--> translation_graph_clearcoat_roughness_out + translation_graph_ss_to_gltf --"emissive_out"--> translation_graph_emissive_out +
+ + +MTLX, +GLTF, +MTLX from GLTF + + + + + Example MaterialX version of "boombox" example (from Khronos sample assets) that shows file name resolving.