diff --git a/test_assets/TextureFileFormatTests/Readme.md b/test_assets/TextureFileFormatTests/Readme.md new file mode 100644 index 00000000..12e3e454 --- /dev/null +++ b/test_assets/TextureFileFormatTests/Readme.md @@ -0,0 +1,21 @@ +# Texture File Format Tests + +This set of assets is intended to test support for loading and rendering basic texture file formats. + +## Screenshot + +![screenshot](screenshots/all_files.png) +_usdrecord 24.03_ + +## File formats + +| File format | Configuration | Texture | +| --- | --- | --- | +| JPEG | CMYK, 8-bit | ![jpeg cmyk 8-bit](jpeg_cmyk_8-bit.jpg) | +| JPEG | RGB, 8-bit | ![jpeg rgb 8-bit](jpeg_rgb_8-bit.jpg) | +| JPEG | Grayscale, 8-bit | ![png grayscale 8-bit](png_grayscale_8-bit.png) | +| PNG | Grayscale 8-bit | ![png grayscale 8-bit](png_grayscale_8-bit.png) | +| PNG | Frayscale, 16-bit | ![png grayscale 16-bit](png_grayscale_16-bit.png) | +| PNG | RGB, 8-bit | ![png rgb 8-bit](png_rgb_8-bit.png) | +| PNG | RGB, 16-bit | ![png rgb 16-bit](png_rgb_16-bit.png) | +| PNG | RGB, 32-bit | ![png rgb 32-bit](png_rgb_32-bit.png)| \ No newline at end of file diff --git a/test_assets/TextureFileFormatTests/_scene.usda b/test_assets/TextureFileFormatTests/_scene.usda new file mode 100644 index 00000000..0f089213 --- /dev/null +++ b/test_assets/TextureFileFormatTests/_scene.usda @@ -0,0 +1,53 @@ +#usda 1.0 +( + defaultPrim = "Scene" + upAxis = "Y" +) + +def Xform "Scene" ( + kind = "component" +) +{ + def Scope "Looks" + { + def Material "MainMaterial" + { + token outputs:surface.connect = + + def Shader "PbrPreview" + { + uniform token info:id = "UsdPreviewSurface" + color3f inputs:diffuseColor.connect = + token outputs:surface + } + + def Shader "Diffuse" + { + uniform token info:id = "UsdUVTexture" + float2 inputs:st.connect = + float3 outputs:rgb + } + + def Shader "Primvar" + { + uniform token info:id = "UsdPrimvarReader_float2" + string inputs:varname = "st" + float2 outputs:result + } + } + } + + def Xform "Geom" + { + def Mesh "Plane" ( + prepend apiSchemas = ["MaterialBindingAPI"] + ) + { + rel material:binding = + float2[] primvars:st = [(0, 0), (1, 0), (1, 1), (0, 1)] (interpolation = "vertex") + int[] faceVertexCounts = [4] + int[] faceVertexIndices = [0, 1, 2, 3] + point3f[] points = [(0,0,0), (1,0,0), (1,1,0), (0,1,0)] + } + } +} diff --git a/test_assets/TextureFileFormatTests/all_files.usda b/test_assets/TextureFileFormatTests/all_files.usda new file mode 100644 index 00000000..d23c3ee3 --- /dev/null +++ b/test_assets/TextureFileFormatTests/all_files.usda @@ -0,0 +1,90 @@ +#usda 1.0 +( + defaultPrim = "Scene" + upAxis = "Y" +) + +def Scope "Scene" ( + kind = "component" +) +{ + def Camera "main_cam" + { + double3 xformOp:translate = (1, 3, 25) + uniform token[] xformOpOrder = ["xformOp:translate"] + } + + def Xform "jpeg" { + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate"] + + over "jpeg_cmyk_8bit" ( + references = [@./jpeg_cmyk_8-bit.usda@] + ) + { + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate"] + } + + over "jpeg_grayscale_8bit" ( + references = [@./jpeg_grayscale_8-bit.usda@] + ) + { + double3 xformOp:translate = (0, 1.1, 0) + uniform token[] xformOpOrder = ["xformOp:translate"] + } + + over "jpeg_rgb_8bit" ( + references = [@./jpeg_rgb_8-bit.usda@] + ) + { + double3 xformOp:translate = (0, 2.2, 0) + uniform token[] xformOpOrder = ["xformOp:translate"] + } + } + + def Xform "png" { + double3 xformOp:translate = (2, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate"] + + over "png_grayscale_8bit" ( + references = [@./png_grayscale_8-bit.usda@] + ) + { + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate"] + } + + over "png_grayscale_16bit" ( + references = [@./png_grayscale_16-bit.usda@] + ) + { + double3 xformOp:translate = (0, 1.1, 0) + uniform token[] xformOpOrder = ["xformOp:translate"] + } + + over "png_rgb_8bit" ( + references = [@./png_rgb_8-bit.usda@] + ) + { + double3 xformOp:translate = (0, 2.2, 0) + uniform token[] xformOpOrder = ["xformOp:translate"] + } + + over "png_rgb_16bit" ( + references = [@./png_rgb_16-bit.usda@] + ) + { + double3 xformOp:translate = (0, 3.3, 0) + uniform token[] xformOpOrder = ["xformOp:translate"] + } + + over "png_rgb_32bit" ( + references = [@./png_rgb_32-bit.usda@] + ) + { + double3 xformOp:translate = (0, 4.4, 0) + uniform token[] xformOpOrder = ["xformOp:translate"] + } + } +} diff --git a/test_assets/TextureFileFormatTests/jpeg_cmyk_8-bit.jpg b/test_assets/TextureFileFormatTests/jpeg_cmyk_8-bit.jpg new file mode 100644 index 00000000..6a4d8e96 Binary files /dev/null and b/test_assets/TextureFileFormatTests/jpeg_cmyk_8-bit.jpg differ diff --git a/test_assets/TextureFileFormatTests/jpeg_cmyk_8-bit.usda b/test_assets/TextureFileFormatTests/jpeg_cmyk_8-bit.usda new file mode 100644 index 00000000..428e3b86 --- /dev/null +++ b/test_assets/TextureFileFormatTests/jpeg_cmyk_8-bit.usda @@ -0,0 +1,22 @@ +#usda 1.0 +( + defaultPrim = "Scene" + upAxis = "Y" + subLayers = [ + @_scene.usda@ + ] +) + +over "Scene" +{ + over "Looks" + { + over "MainMaterial" + { + over "Diffuse" + { + asset inputs:file = @jpeg_cmyk_8-bit.jpg@ + } + } + } +} diff --git a/test_assets/TextureFileFormatTests/jpeg_grayscale_8-bit.jpg b/test_assets/TextureFileFormatTests/jpeg_grayscale_8-bit.jpg new file mode 100644 index 00000000..077c2e10 Binary files /dev/null and b/test_assets/TextureFileFormatTests/jpeg_grayscale_8-bit.jpg differ diff --git a/test_assets/TextureFileFormatTests/jpeg_grayscale_8-bit.usda b/test_assets/TextureFileFormatTests/jpeg_grayscale_8-bit.usda new file mode 100644 index 00000000..e048874c --- /dev/null +++ b/test_assets/TextureFileFormatTests/jpeg_grayscale_8-bit.usda @@ -0,0 +1,22 @@ +#usda 1.0 +( + defaultPrim = "Scene" + upAxis = "Y" + subLayers = [ + @_scene.usda@ + ] +) + +over "Scene" +{ + over "Looks" + { + over "MainMaterial" + { + over "Diffuse" + { + asset inputs:file = @jpeg_grayscale_8-bit.jpg@ + } + } + } +} diff --git a/test_assets/TextureFileFormatTests/jpeg_rgb_8-bit.jpg b/test_assets/TextureFileFormatTests/jpeg_rgb_8-bit.jpg new file mode 100644 index 00000000..78d9b554 Binary files /dev/null and b/test_assets/TextureFileFormatTests/jpeg_rgb_8-bit.jpg differ diff --git a/test_assets/TextureFileFormatTests/jpeg_rgb_8-bit.usda b/test_assets/TextureFileFormatTests/jpeg_rgb_8-bit.usda new file mode 100644 index 00000000..600c17a4 --- /dev/null +++ b/test_assets/TextureFileFormatTests/jpeg_rgb_8-bit.usda @@ -0,0 +1,22 @@ +#usda 1.0 +( + defaultPrim = "Scene" + upAxis = "Y" + subLayers = [ + @_scene.usda@ + ] +) + +over "Scene" +{ + over "Looks" + { + over "MainMaterial" + { + over "Diffuse" + { + asset inputs:file = @jpeg_rgb_8-bit.jpg@ + } + } + } +} diff --git a/test_assets/TextureFileFormatTests/png_grayscale_16-bit.png b/test_assets/TextureFileFormatTests/png_grayscale_16-bit.png new file mode 100644 index 00000000..c21434ee Binary files /dev/null and b/test_assets/TextureFileFormatTests/png_grayscale_16-bit.png differ diff --git a/test_assets/TextureFileFormatTests/png_grayscale_16-bit.usda b/test_assets/TextureFileFormatTests/png_grayscale_16-bit.usda new file mode 100644 index 00000000..1d75935d --- /dev/null +++ b/test_assets/TextureFileFormatTests/png_grayscale_16-bit.usda @@ -0,0 +1,22 @@ +#usda 1.0 +( + defaultPrim = "Scene" + upAxis = "Y" + subLayers = [ + @_scene.usda@ + ] +) + +over "Scene" +{ + over "Looks" + { + over "MainMaterial" + { + over "Diffuse" + { + asset inputs:file = @png_grayscale_16-bit.png@ + } + } + } +} diff --git a/test_assets/TextureFileFormatTests/png_grayscale_8-bit.png b/test_assets/TextureFileFormatTests/png_grayscale_8-bit.png new file mode 100644 index 00000000..14b8cc75 Binary files /dev/null and b/test_assets/TextureFileFormatTests/png_grayscale_8-bit.png differ diff --git a/test_assets/TextureFileFormatTests/png_grayscale_8-bit.usda b/test_assets/TextureFileFormatTests/png_grayscale_8-bit.usda new file mode 100644 index 00000000..be293537 --- /dev/null +++ b/test_assets/TextureFileFormatTests/png_grayscale_8-bit.usda @@ -0,0 +1,22 @@ +#usda 1.0 +( + defaultPrim = "Scene" + upAxis = "Y" + subLayers = [ + @_scene.usda@ + ] +) + +over "Scene" +{ + over "Looks" + { + over "MainMaterial" + { + over "Diffuse" + { + asset inputs:file = @png_grayscale_8-bit.png@ + } + } + } +} diff --git a/test_assets/TextureFileFormatTests/png_rgb_16-bit.png b/test_assets/TextureFileFormatTests/png_rgb_16-bit.png new file mode 100644 index 00000000..b1d50f10 Binary files /dev/null and b/test_assets/TextureFileFormatTests/png_rgb_16-bit.png differ diff --git a/test_assets/TextureFileFormatTests/png_rgb_16-bit.usda b/test_assets/TextureFileFormatTests/png_rgb_16-bit.usda new file mode 100644 index 00000000..7b876e08 --- /dev/null +++ b/test_assets/TextureFileFormatTests/png_rgb_16-bit.usda @@ -0,0 +1,22 @@ +#usda 1.0 +( + defaultPrim = "Scene" + upAxis = "Y" + subLayers = [ + @_scene.usda@ + ] +) + +over "Scene" +{ + over "Looks" + { + over "MainMaterial" + { + over "Diffuse" + { + asset inputs:file = @png_rgb_16-bit.png@ + } + } + } +} diff --git a/test_assets/TextureFileFormatTests/png_rgb_32-bit.png b/test_assets/TextureFileFormatTests/png_rgb_32-bit.png new file mode 100644 index 00000000..77a7c3ca Binary files /dev/null and b/test_assets/TextureFileFormatTests/png_rgb_32-bit.png differ diff --git a/test_assets/TextureFileFormatTests/png_rgb_32-bit.usda b/test_assets/TextureFileFormatTests/png_rgb_32-bit.usda new file mode 100644 index 00000000..caad245b --- /dev/null +++ b/test_assets/TextureFileFormatTests/png_rgb_32-bit.usda @@ -0,0 +1,22 @@ +#usda 1.0 +( + defaultPrim = "Scene" + upAxis = "Y" + subLayers = [ + @_scene.usda@ + ] +) + +over "Scene" +{ + over "Looks" + { + over "MainMaterial" + { + over "Diffuse" + { + asset inputs:file = @png_rgb_32-bit.png@ + } + } + } +} diff --git a/test_assets/TextureFileFormatTests/png_rgb_8-bit.png b/test_assets/TextureFileFormatTests/png_rgb_8-bit.png new file mode 100644 index 00000000..a642bab3 Binary files /dev/null and b/test_assets/TextureFileFormatTests/png_rgb_8-bit.png differ diff --git a/test_assets/TextureFileFormatTests/png_rgb_8-bit.usda b/test_assets/TextureFileFormatTests/png_rgb_8-bit.usda new file mode 100644 index 00000000..124bcb78 --- /dev/null +++ b/test_assets/TextureFileFormatTests/png_rgb_8-bit.usda @@ -0,0 +1,22 @@ +#usda 1.0 +( + defaultPrim = "Scene" + upAxis = "Y" + subLayers = [ + @_scene.usda@ + ] +) + +over "Scene" +{ + over "Looks" + { + over "MainMaterial" + { + over "Diffuse" + { + asset inputs:file = @png_rgb_8-bit.png@ + } + } + } +} diff --git a/test_assets/TextureFileFormatTests/screenshots/all_files.png b/test_assets/TextureFileFormatTests/screenshots/all_files.png new file mode 100644 index 00000000..1f1a5106 Binary files /dev/null and b/test_assets/TextureFileFormatTests/screenshots/all_files.png differ