From 262d0b038b8c125e3bb33de197a0039df1f8f5b0 Mon Sep 17 00:00:00 2001 From: Indy Ray Date: Mon, 22 Jul 2024 15:27:18 -0700 Subject: [PATCH] Adding MaterialX version of TextureCoordinateTest. * Adding TextureCoordinateTest.mtlx which includes simply references the included texture. * Adding TextureCoordinateTestMaterialX.usda which is a copy of TextureCordinateTest.usda which references the mtlx, and has a little bit of cleanup. --- .../TextureCoordinateTest.mtlx | 61 ++++++ .../TextureCoordinateTestMaterialX.usda | 198 ++++++++++++++++++ 2 files changed, 259 insertions(+) create mode 100644 test_assets/TextureCoordinateTest/TextureCoordinateTest.mtlx create mode 100644 test_assets/TextureCoordinateTest/TextureCoordinateTestMaterialX.usda diff --git a/test_assets/TextureCoordinateTest/TextureCoordinateTest.mtlx b/test_assets/TextureCoordinateTest/TextureCoordinateTest.mtlx new file mode 100644 index 00000000..14cb1174 --- /dev/null +++ b/test_assets/TextureCoordinateTest/TextureCoordinateTest.mtlx @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test_assets/TextureCoordinateTest/TextureCoordinateTestMaterialX.usda b/test_assets/TextureCoordinateTest/TextureCoordinateTestMaterialX.usda new file mode 100644 index 00000000..a3f6267d --- /dev/null +++ b/test_assets/TextureCoordinateTest/TextureCoordinateTestMaterialX.usda @@ -0,0 +1,198 @@ +#usda 1.0 +( + defaultPrim = "Asset" + doc = "Converted from glTF with guc 0.2" + metersPerUnit = 1 + upAxis = "Y" +) + +def Xform "Asset" ( + customData = { + string copyright = "Copyright 2017-2018 Analytical Graphics, Inc., CC-BY 4.0 https://creativecommons.org/licenses/by/4.0/ - Mesh and textures by Ed Mackey." + string generator = "guc conversion from Khronos Blender glTF 2.0 exporter, plus hand-edits" + string version = "2.0" + } + kind = "component" +) +{ + def Scope "Materials" + { + def "MaterialX" + { + def Scope "Materials" ( + prepend references = @./TextureCoordinateTest.mtlx@ + ) + { + } + } + } + + def Xform "Scenes" + { + def Xform "Scene" + { + def Xform "BackPlane" + { + def Xform "BackPlaneMesh" + { + def Mesh "submesh" ( + prepend apiSchemas = ["MaterialBindingAPI"] + ) + { + uniform bool doubleSided = 1 + float3[] extent = [(-1.0, -1.0, -0.05), (1.0, 1.0, -0.05)] + int[] faceVertexCounts = [3, 3] + int[] faceVertexIndices = [0, 1, 2, 0, 3, 1] + rel material:binding = + normal3f[] normals = [(0.0, 0.0, -1.0), (0.0, 0.0, -1.0), (0.0, 0.0, -1.0), (0.0, 0.0, -1.0)] ( + interpolation = "vertex" + ) + point3f[] points = [(-1.0, 1.0, -0.05), (1.0, -1.0, -0.05), (-1.0, -1.0, -0.05), (1.0, 1.0, -0.05)] + color3f[] primvars:displayColor = [(0.16, 0.16, 0.16)] ( + customData = { + dictionary guc = { + bool generated = 1 + } + } + interpolation = "constant" + ) + uniform token subdivisionScheme = "none" + } + } + } + + def Xform "BottomRightObj" + { + def Xform "BottomRightMesh" + { + def Mesh "submesh" ( + prepend apiSchemas = ["MaterialBindingAPI"] + ) + { + uniform bool doubleSided = 1 + float3[] extent = [(0.2, -1.2, 0.0), (1.2, -0.2, 0.0)] + int[] faceVertexCounts = [3, 3] + int[] faceVertexIndices = [0, 1, 2, 3, 1, 0] + rel material:binding = + normal3f[] normals = [(0.0, 0.0, 1.0), (0.0, 0.0, 1.0), (0.0, 0.0, 1.0), (0.0, 0.0, 1.0)] ( + interpolation = "vertex" + ) + point3f[] points = [(1.2, -1.2, 0.0), (0.2, -0.2, 0.0), (0.2, -1.2, 0.0), (1.2, -0.2, 0.0)] + color3f[] primvars:displayColor = [(0, 0.8, 0)] ( + customData = { + dictionary guc = { + bool generated = 1 + } + } + interpolation = "constant" + ) + texCoord2f[] primvars:st = [(1.0, 0.0), (0.6, 0.4), (0.6, 0.0), (1.0, 0.4)] ( + interpolation = "vertex" + ) + uniform token subdivisionScheme = "none" + } + } + } + + def Xform "BottomLeftObj" + { + def Xform "BottomLeftMesh" + { + def Mesh "submesh" ( + prepend apiSchemas = ["MaterialBindingAPI"] + ) + { + uniform bool doubleSided = 1 + float3[] extent = [(-1.2, -1.2, 0.0), (-0.2, -0.2, 0.0)] + int[] faceVertexCounts = [3, 3] + int[] faceVertexIndices = [0, 1, 2, 3, 1, 0] + rel material:binding = + normal3f[] normals = [(0.0, 0.0, 1.0), (0.0, 0.0, 1.0), (0.0, 0.0, 1.0), (0.0, 0.0, 1.0)] ( + interpolation = "vertex" + ) + point3f[] points = [(-0.2, -1.2, 0.0), (-1.2, -0.2, 0.0), (-1.2, -1.2, 0.0), (-0.2, -0.2, 0.0)] + color3f[] primvars:displayColor = [(0, 0.16, 0.8)] ( + customData = { + dictionary guc = { + bool generated = 1 + } + } + interpolation = "constant" + ) + texCoord2f[] primvars:st = [(0.4, 0.0), (0.0, 0.4), (0.0, 0.0), (0.4, 0.4)] ( + interpolation = "vertex" + ) + uniform token subdivisionScheme = "none" + } + } + } + + def Xform "TopRightObj" + { + def Xform "TopRightMesh" + { + def Mesh "submesh" ( + prepend apiSchemas = ["MaterialBindingAPI"] + ) + { + uniform bool doubleSided = 1 + float3[] extent = [(0.2, 0.2, 0.0), (1.2, 1.2, 0.0)] + int[] faceVertexCounts = [3, 3] + int[] faceVertexIndices = [0, 1, 2, 3, 1, 0] + rel material:binding = + normal3f[] normals = [(0.0, 0.0, 1.0), (0.0, 0.0, 1.0), (0.0, 0.0, 1.0), (0.0, 0.0, 1.0)] ( + interpolation = "vertex" + ) + point3f[] points = [(1.2, 0.2, 0.0), (0.2, 1.2, 0.0), (0.2, 0.2, 0.0), (1.2, 1.2, 0.0)] + color3f[] primvars:displayColor = [(0.8, 0.08, 0)] ( + customData = { + dictionary guc = { + bool generated = 1 + } + } + interpolation = "constant" + ) + texCoord2f[] primvars:st = [(1.0, 0.6), (0.6, 1.0), (0.6, 0.6), (1.0, 1.0)] ( + interpolation = "vertex" + ) + uniform token subdivisionScheme = "none" + } + } + } + + def Xform "TopLeftObj" + { + def Xform "TopLeftMesh" + { + def Mesh "submesh" ( + prepend apiSchemas = ["MaterialBindingAPI"] + ) + { + uniform bool doubleSided = 1 + float3[] extent = [(-1.2, 0.2, 0.0), (-0.2, 1.2, 0.0)] + int[] faceVertexCounts = [3, 3] + int[] faceVertexIndices = [0, 1, 2, 3, 1, 0] + rel material:binding = + normal3f[] normals = [(0.0, 0.0, 1.0), (0.0, 0.0, 1.0), (0.0, 0.0, 1.0), (0.0, 0.0, 1.0)] ( + interpolation = "vertex" + ) + point3f[] points = [(-0.2, 0.2, 0.0), (-1.2, 1.2, 0.0), (-1.2, 0.2, 0.0), (-0.2, 1.2, 0.0)] + color3f[] primvars:displayColor = [(0.8, 0.8, 0)] ( + customData = { + dictionary guc = { + bool generated = 1 + } + } + interpolation = "constant" + ) + texCoord2f[] primvars:st = [(0.4, 0.6), (0.0, 1.0), (0.0, 0.6), (0.4, 1.0)] ( + interpolation = "vertex" + ) + uniform token subdivisionScheme = "none" + } + } + } + } + } +} +