-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added first set of texture file format tests
- Loading branch information
1 parent
98e8a1e
commit 695aaf0
Showing
20 changed files
with
340 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
|
||
 | ||
_usdrecord 24.03_ | ||
|
||
## File formats | ||
|
||
| File format | Configuration | Texture | | ||
| --- | --- | --- | | ||
| JPEG | CMYK, 8-bit |  | | ||
| JPEG | RGB, 8-bit |  | | ||
| JPEG | Grayscale, 8-bit |  | | ||
| PNG | Grayscale 8-bit |  | | ||
| PNG | Frayscale, 16-bit |  | | ||
| PNG | RGB, 8-bit |  | | ||
| PNG | RGB, 16-bit |  | | ||
| PNG | RGB, 32-bit | | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 = </Scene/Looks/MainMaterial/PbrPreview.outputs:surface> | ||
|
||
def Shader "PbrPreview" | ||
{ | ||
uniform token info:id = "UsdPreviewSurface" | ||
color3f inputs:diffuseColor.connect = </Scene/Looks/MainMaterial/Diffuse.outputs:rgb> | ||
token outputs:surface | ||
} | ||
|
||
def Shader "Diffuse" | ||
{ | ||
uniform token info:id = "UsdUVTexture" | ||
float2 inputs:st.connect = </Scene/Looks/MainMaterial/Primvar.outputs:result> | ||
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 = </Scene/Looks/MainMaterial> | ||
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)] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"] | ||
} | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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@ | ||
} | ||
} | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions
22
test_assets/TextureFileFormatTests/jpeg_grayscale_8-bit.usda
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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@ | ||
} | ||
} | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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@ | ||
} | ||
} | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions
22
test_assets/TextureFileFormatTests/png_grayscale_16-bit.usda
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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@ | ||
} | ||
} | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions
22
test_assets/TextureFileFormatTests/png_grayscale_8-bit.usda
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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@ | ||
} | ||
} | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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@ | ||
} | ||
} | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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@ | ||
} | ||
} | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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@ | ||
} | ||
} | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.