diff --git a/test/lib/mayaUsd/render/vp2RenderDelegate/VP2RenderDelegateMaterialXTest/baseline/DemoQuads_render.png b/test/lib/mayaUsd/render/vp2RenderDelegate/VP2RenderDelegateMaterialXTest/baseline/DemoQuads_render.png index e499e0758b..c1d2a0c434 100644 Binary files a/test/lib/mayaUsd/render/vp2RenderDelegate/VP2RenderDelegateMaterialXTest/baseline/DemoQuads_render.png and b/test/lib/mayaUsd/render/vp2RenderDelegate/VP2RenderDelegateMaterialXTest/baseline/DemoQuads_render.png differ diff --git a/test/lib/mayaUsd/render/vp2RenderDelegate/VP2RenderDelegateMaterialXTest/baseline/MtlxUVStreamTest_render.png b/test/lib/mayaUsd/render/vp2RenderDelegate/VP2RenderDelegateMaterialXTest/baseline/MtlxUVStreamTest_render.png index cde1dd7ef5..9817e03f77 100644 Binary files a/test/lib/mayaUsd/render/vp2RenderDelegate/VP2RenderDelegateMaterialXTest/baseline/MtlxUVStreamTest_render.png and b/test/lib/mayaUsd/render/vp2RenderDelegate/VP2RenderDelegateMaterialXTest/baseline/MtlxUVStreamTest_render.png differ diff --git a/test/testSamples/MaterialX/DemoQuads.usda b/test/testSamples/MaterialX/DemoQuads.usda index 01c91110bb..cef71cbfdf 100644 --- a/test/testSamples/MaterialX/DemoQuads.usda +++ b/test/testSamples/MaterialX/DemoQuads.usda @@ -184,6 +184,88 @@ def Mesh "pPlane6" ( uniform token[] xformOpOrder = ["xformOp:translate"] } +def Mesh "pMultiUVPlane3" ( + prepend apiSchemas = ["MaterialBindingAPI"] + kind = "component" +) +{ + uniform bool doubleSided = 1 + float3[] extent = [(-0.5, 0, -0.5), (0.5, 0, 0.5)] + int[] faceVertexCounts = [4] + int[] faceVertexIndices = [0, 1, 3, 2] + rel material:binding = + point3f[] points = [(-0.5, 0, 0.5), (0.5, 0, 0.5), (-0.5, 0, -0.5), (0.5, 0, -0.5)] + color3f[] primvars:displayColor = [(0.13320851, 0.13320851, 0.13320851)] ( + customData = { + dictionary Maya = { + bool generated = 1 + } + } + ) + texCoord2f[] primvars:st = [(0, 0), (1, 0), (0, 1), (1, 1)] ( + customData = { + dictionary Maya = { + token name = "map1" + } + } + interpolation = "faceVarying" + ) + texCoord2f[] primvars:st1 = [(0.50056624, -0.00038683414), (1.0003868, 0.50056624), (-0.00038683414, 0.49943376), (0.49943376, 1.0003868)] ( + customData = { + dictionary Maya = { + token name = "uvSet1" + } + } + interpolation = "faceVarying" + ) + int[] primvars:st1:indices = [0, 1, 3, 2] + int[] primvars:st:indices = [0, 1, 3, 2] + token visibility = "inherited" + double3 xformOp:translate = (-1.1, 0, 1.1) + uniform token[] xformOpOrder = ["xformOp:translate"] +} + +def Mesh "pMultiUVPlane4" ( + prepend apiSchemas = ["MaterialBindingAPI"] + kind = "component" +) +{ + uniform bool doubleSided = 1 + float3[] extent = [(-0.5, 0, -0.5), (0.5, 0, 0.5)] + int[] faceVertexCounts = [4] + int[] faceVertexIndices = [0, 1, 3, 2] + rel material:binding = + point3f[] points = [(-0.5, 0, 0.5), (0.5, 0, 0.5), (-0.5, 0, -0.5), (0.5, 0, -0.5)] + color3f[] primvars:displayColor = [(0.13320851, 0.13320851, 0.13320851)] ( + customData = { + dictionary Maya = { + bool generated = 1 + } + } + ) + texCoord2f[] primvars:st = [(0, 0), (1, 0), (0, 1), (1, 1)] ( + customData = { + dictionary Maya = { + token name = "map1" + } + } + interpolation = "faceVarying" + ) + texCoord2f[] primvars:st1 = [(0.50056624, -0.00038683414), (1.0003868, 0.50056624), (-0.00038683414, 0.49943376), (0.49943376, 1.0003868)] ( + customData = { + dictionary Maya = { + token name = "uvSet1" + } + } + interpolation = "faceVarying" + ) + int[] primvars:st1:indices = [0, 1, 3, 2] + int[] primvars:st:indices = [0, 1, 3, 2] + token visibility = "inherited" + double3 xformOp:translate = (0, 0, 1.1) + uniform token[] xformOpOrder = ["xformOp:translate"] +} + def Scope "mtl" { def Material "imageR8U" @@ -443,6 +525,61 @@ def Scope "mtl" uniform float2 ui:nodegraph:node:pos = (-2.538889, 0.92777777) } } + def Material "standard_surfaceUV1_3" + { + token outputs:mtlx:surface.connect = + + def Shader "standard_surfaceUV1_1" + { + uniform token info:id = "ND_standard_surface_surfaceshader" + color3f inputs:base_color.connect = + token outputs:out + } + + def Shader "image1" + { + uniform token info:id = "ND_image_color3" + asset inputs:file = @textures/grid.png@ + string inputs:filtertype = "closest" + float2 inputs:texcoord.connect = + color3f outputs:out + } + + def Shader "geompropvalue1" + { + uniform token info:id = "ND_geompropvalue_vector2" + string inputs:geomprop = "st1" + float2 outputs:out + } + } + + def Material "standard_surfaceUV1_4" + { + token outputs:mtlx:surface.connect = + + def Shader "standard_surfaceUV1_1" + { + uniform token info:id = "ND_standard_surface_surfaceshader" + color3f inputs:base_color.connect = + token outputs:out + } + + def Shader "image1" + { + uniform token info:id = "ND_image_color3" + asset inputs:file = @textures/grid.png@ + string inputs:filtertype = "closest" + float2 inputs:texcoord.connect = + color3f outputs:out + } + + def Shader "texcoord1" + { + uniform token info:id = "ND_texcoord_vector2" + int inputs:index = 1 + float2 outputs:out + } + } } def Mesh "Background" ( diff --git a/test/testSamples/MaterialX/MtlxUVStreamTest.usda b/test/testSamples/MaterialX/MtlxUVStreamTest.usda index 4662f64224..cce78fde0d 100644 --- a/test/testSamples/MaterialX/MtlxUVStreamTest.usda +++ b/test/testSamples/MaterialX/MtlxUVStreamTest.usda @@ -63,11 +63,19 @@ def Mesh "pCube1" ( def Shader "noise1" { uniform token info:id = "ND_noise2d_float" - float inputs:amplitude = 0.5 - float2 inputs:texcoord.connect = + float inputs:amplitude = 0.6 + float2 inputs:texcoord.connect = float outputs:out } - + + def Shader "multiply10" + { + uniform token info:id = "ND_multiply_vector2FA" + float inputs:in1.connect = + float inputs:in2 = 10.0 + float outputs:out + } + def Shader "UV1" { uniform token info:id = "ND_texcoord_vector2"