diff --git a/test_assets/_common/README.md b/test_assets/_common/README.md new file mode 100644 index 00000000..a2d6f458 --- /dev/null +++ b/test_assets/_common/README.md @@ -0,0 +1,19 @@ +# Common Assets + +This set of common support assets is reused by multiple test assets through referencing. +This allows test files to reduce their size and use a consistent, known base. +Also included is an error image that can be used to indicate an application or render issue. + +## Animated Cube Translation + +![screenshot](screenshots/animated_cube_translation_usdrecord_22.08.png) +_usdrecord 22.08_ + +## Axis + +![screenshot](screenshots/axis_usdrecord_22.08.png) +_usdrecord 22.08_ + +## Error Image + +![error](error.png) diff --git a/test_assets/_common/animated_cube_translation.usda b/test_assets/_common/animated_cube_translation.usda new file mode 100644 index 00000000..4d1a0635 --- /dev/null +++ b/test_assets/_common/animated_cube_translation.usda @@ -0,0 +1,38 @@ +#usda 1.0 +( + defaultPrim = "World" + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) + +def Xform "World" +{ + def Mesh "animatedCube" + { + double3 xformOp:translate = (0, 0, 0) + double3 xformOp:translate.timeSamples = { + 0: (0, 0, 0), + 100: (100, 0, 0), + } + uniform token[] xformOpOrder = ["xformOp:translate"] + + int[] faceVertexCounts = [4, 4, 4, 4, 4, 4] + int[] faceVertexIndices = [0, 4, 6, 2, 0, 1, 5, 4, 4, 5, 7, 6, 3, 7, 5, 1, 6, 7, 3, 2, 2, 3, 1, 0] + point3f[] points = [(-0.5, -0.5, -0.5), (0.5, -0.5, -0.5), (-0.5, 0.5, -0.5), (0.5, 0.5, -0.5), (-0.5, -0.5, 0.5), (0.5, -0.5, 0.5), (-0.5, 0.5, 0.5), (0.5, 0.5, 0.5)] + float3[] extent = [(-0.5, -0.5, -0.5), (0.5, 0.5, 0.5)] + uniform token subdivisionScheme = "none" + } + + def Camera "camera" + { + float2 clippingRange = (1.0, 2000000.0) + float focalLength = 218.12925720214844 + float focusDistance = 1129.03515625 + float fStop = 5.6 + float horizontalAperture = 24.0519962310791 + float verticalAperture = 20.954999923706055 + custom Matrix4d xformOp:transform = ((1.0, 0.0, 0.0, 0.0),(0.0, 1.0, 0.0, 0.0),(0.0, 0.0, 1.0, 0.0),(50.0, 0.0, 1129.0351765518724, 1.0)) + uniform token[] xformOpOrder = ["xformOp:transform"] + } +} \ No newline at end of file diff --git a/test_assets/_common/axis.usda b/test_assets/_common/axis.usda new file mode 100644 index 00000000..cabe4199 --- /dev/null +++ b/test_assets/_common/axis.usda @@ -0,0 +1,34 @@ +#usda 1.0 +( + defaultPrim = "World" + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) + +def Xform "World" +{ + def Cube "X" + { + color3f[] primvars:displayColor = [(1, 0, 0)] + float3 xformOp:scale = (1, 0.1, 0.1) + double3 xformOp:translate = (1.1, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:scale"] + } + + def Cube "Y" + { + color3f[] primvars:displayColor = [(0, 1, 0)] + float3 xformOp:scale = (0.1, 1, 0.1) + double3 xformOp:translate = (0, 1.1, 0) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:scale"] + } + + def Cube "Z" + { + color3f[] primvars:displayColor = [(0, 0, 1)] + float3 xformOp:scale = (0.1, 0.1, 1) + double3 xformOp:translate = (0, 0, 1.1) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:scale"] + } +} \ No newline at end of file diff --git a/test_assets/_common/error.png b/test_assets/_common/error.png new file mode 100644 index 00000000..bf18b787 Binary files /dev/null and b/test_assets/_common/error.png differ diff --git a/test_assets/_common/screenshots/animated_cube_translation_usdrecord_22.08.png b/test_assets/_common/screenshots/animated_cube_translation_usdrecord_22.08.png new file mode 100644 index 00000000..bafdfa74 Binary files /dev/null and b/test_assets/_common/screenshots/animated_cube_translation_usdrecord_22.08.png differ diff --git a/test_assets/_common/screenshots/axis_usdrecord_22.08.png b/test_assets/_common/screenshots/axis_usdrecord_22.08.png new file mode 100644 index 00000000..6bf9d3f0 Binary files /dev/null and b/test_assets/_common/screenshots/axis_usdrecord_22.08.png differ diff --git a/test_assets/foundation/README.md b/test_assets/foundation/README.md new file mode 100644 index 00000000..c654da2a --- /dev/null +++ b/test_assets/foundation/README.md @@ -0,0 +1,4 @@ +# Foundation Tests + +This set of assets is aimed at testing and providing examples for foundational USD concepts such as composition and stage metadatas. +Schema specific assets can be found in [schemaTests](../schemaTests/) instead. diff --git a/test_assets/foundation/stage_composition/README.md b/test_assets/foundation/stage_composition/README.md new file mode 100644 index 00000000..3d50a888 --- /dev/null +++ b/test_assets/foundation/stage_composition/README.md @@ -0,0 +1,55 @@ +# Stage Composition + +These assets show and test how compositon arcs and related concepts work. + +## Payload + +[payload](./payload/) contains assets to test payloading files and prims. + +## Reference + +[reference](./reference/) contains assets to test referencing files and prims. + +## SubLayer + +[subLayer](./subLayer/) contains assets to test sublayering files. + +## Active + +[active.usda](./active.usda) shows an example of the `active` prim metadata. One inactive (`active = false`), red cube and one active (`active = true`), green cube exist in the stage. + +![screenshot](screenshots/active_usdrecord_22.08.png) +_active.usda, usdrecord 22.08_ + +## Classes + +[class_inherit.usda](./class_inherit.usda) shows how to use a `class` and what effect overriding a class attribute has in an inheriting prim. + +![screenshot](screenshots/class_inherit_usdrecord_22.08.png) +_class\_inherit.usda, usdrecord 22.08_ + +## Inherit and Specialize + +[inherit_and_specialize.usda](./inherit_and_specialize.usda) shows the difference between `inherits` and `specializes`. + +![screenshot](screenshots/inherit_and_specialize_usdrecord_22.08.png) +_inherit\_and\_specialize.usda, usdrecord 22.08_ + +## Over + +[over.usda](./over.usda) shows the difference between `over`s and `def`s. + +![screenshot](screenshots/class_inherit_usdrecord_22.08.png) +_over.usda, usdrecord 22.08_ + +## Purpose + +[purpose.usda](./purpose.usda) shows an example of the `purpose` prim attribute. There are four cubes with different `purpose` tokens set: + +- `CubeIsGuide` with `token purpose = "guide"`, colored red +- `CubeIsRender` with `token purpose = "render"`, colored green +- `CubeIsProxy` with `token purpose = "proxy"`, colored blue +- `CubeIsOther` with `token purpose = "other"`, colored yellow + +![screenshot](screenshots/purpose_usdrecord_22.08.png) +_purpose.usda, usdrecord 22.08_ diff --git a/test_assets/foundation/stage_composition/_parent_stage.usda b/test_assets/foundation/stage_composition/_parent_stage.usda new file mode 100644 index 00000000..3082043b --- /dev/null +++ b/test_assets/foundation/stage_composition/_parent_stage.usda @@ -0,0 +1,14 @@ +#usda 1.0 +( + defaultPrim = "World" + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) + +def Scope "World" +{ + def Cube "Cube" + { + } +} diff --git a/test_assets/foundation/stage_composition/active.usda b/test_assets/foundation/stage_composition/active.usda new file mode 100644 index 00000000..4e17e179 --- /dev/null +++ b/test_assets/foundation/stage_composition/active.usda @@ -0,0 +1,28 @@ +#usda 1.0 +( + defaultPrim = "World" + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) + +def Scope "World" +{ + def Cube "CubeInactive" ( + active=false + ) + { + color3f[] primvars:displayColor = [(0.8, 0, 0)] + } + + def Cube "CubeActive" ( + active=true + ) + { + color3f[] primvars:displayColor = [(0, 0.8, 0)] + + double3 xformOp:translate = (3, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate"] + } +} + diff --git a/test_assets/foundation/stage_composition/class_inherit.usda b/test_assets/foundation/stage_composition/class_inherit.usda new file mode 100644 index 00000000..71e51260 --- /dev/null +++ b/test_assets/foundation/stage_composition/class_inherit.usda @@ -0,0 +1,30 @@ +#usda 1.0 +( + defaultPrim = "World" + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) + +class "_myClass" +{ + color3f[] primvars:displayColor = [(0, 0.8, 0)] +} + +def Scope "World" { + def Cube "cubeWithoutSetColor" ( + inherits = + ) + { + } + + def Cube "cubeWithSetColor" ( + inherits = + ) + { + color3f[] primvars:displayColor = [(0.8, 0, 0)] + + double3 xformOp:translate = (3, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate"] + } +} diff --git a/test_assets/foundation/stage_composition/inherit_and_specialize.usda b/test_assets/foundation/stage_composition/inherit_and_specialize.usda new file mode 100644 index 00000000..ab401a41 --- /dev/null +++ b/test_assets/foundation/stage_composition/inherit_and_specialize.usda @@ -0,0 +1,49 @@ +#usda 1.0 +( + defaultPrim = "World" + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) + +def Scope "World" { + + def Xform "cubeScene" { + def Cube "source" { + color3f[] primvars:displayColor = [(0.8, 0, 0)] + } + + def Cube "specializes" ( + specializes = + ) + { + color3f[] primvars:displayColor = [(0.8, 0.8, 0)] + + double3 xformOp:translate = (3, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate"] + } + + def Cube "inherits" ( + inherits = + ) + { + color3f[] primvars:displayColor = [(0.8, 0.8, 0)] + + double3 xformOp:translate = (6, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate"] + } + } + + def Xform "cubeSceneReferenced" ( + references = + ) + { + double3 xformOp:translate = (0, 3, 0) + uniform token[] xformOpOrder = ["xformOp:translate"] + + def "source" + { + color3f[] primvars:displayColor = [(0, 0.8, 0)] + } + } +} diff --git a/test_assets/foundation/stage_composition/over.usda b/test_assets/foundation/stage_composition/over.usda new file mode 100644 index 00000000..00f0bada --- /dev/null +++ b/test_assets/foundation/stage_composition/over.usda @@ -0,0 +1,26 @@ +#usda 1.0 +( + subLayers = [ + @_parent_stage.usda@ + ] + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) + +over "World" +{ + over "Cube" { + color3f[] primvars:displayColor = [(0, 0, 0.8)] + } + + def Cube "definedCube" { + double3 xformOp:translate = (3, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate"] + } + + over Cube "undefinedCube" { + double3 xformOp:translate = (6, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate"] + } +} \ No newline at end of file diff --git a/test_assets/foundation/stage_composition/payload/README.md b/test_assets/foundation/stage_composition/payload/README.md new file mode 100644 index 00000000..0637cf07 --- /dev/null +++ b/test_assets/foundation/stage_composition/payload/README.md @@ -0,0 +1,11 @@ +# Payload + +These files `payload` stages from different locations on disk. If loaded successfully, a single cube should be visible. + +![screenshot](screenshots/payload_same_folder_usdrecord_22.08.png) +_usdrecord 22.08_ + +- file in child folder: [payload_child_folder.usda](payload_child_folder.usda) +- invalid file: [payload_invalid.usda](payload_invalid.usda) +- file in parent folder: [payload_parent_folder.usda](payload_parent_folder.usda) +- file in same folder: [payload_same_folder.usda](payload_same_folder.usda) diff --git a/test_assets/foundation/stage_composition/payload/_children/_child_stage.usda b/test_assets/foundation/stage_composition/payload/_children/_child_stage.usda new file mode 100644 index 00000000..3082043b --- /dev/null +++ b/test_assets/foundation/stage_composition/payload/_children/_child_stage.usda @@ -0,0 +1,14 @@ +#usda 1.0 +( + defaultPrim = "World" + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) + +def Scope "World" +{ + def Cube "Cube" + { + } +} diff --git a/test_assets/foundation/stage_composition/payload/_stage.usda b/test_assets/foundation/stage_composition/payload/_stage.usda new file mode 100644 index 00000000..3082043b --- /dev/null +++ b/test_assets/foundation/stage_composition/payload/_stage.usda @@ -0,0 +1,14 @@ +#usda 1.0 +( + defaultPrim = "World" + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) + +def Scope "World" +{ + def Cube "Cube" + { + } +} diff --git a/test_assets/foundation/stage_composition/payload/payload_child_folder.usda b/test_assets/foundation/stage_composition/payload/payload_child_folder.usda new file mode 100644 index 00000000..3d59333b --- /dev/null +++ b/test_assets/foundation/stage_composition/payload/payload_child_folder.usda @@ -0,0 +1,12 @@ +#usda 1.0 +( + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) + +def "World" ( + payload = [@_children/_child_stage.usda@] +) +{ +} \ No newline at end of file diff --git a/test_assets/foundation/stage_composition/payload/payload_invalid.usda b/test_assets/foundation/stage_composition/payload/payload_invalid.usda new file mode 100644 index 00000000..698793e2 --- /dev/null +++ b/test_assets/foundation/stage_composition/payload/payload_invalid.usda @@ -0,0 +1,19 @@ +#usda 1.0 +( + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) + +def "World" +{ + def "invalid_payload" ( + payload = [@file_does_not_exist.usda@] + ) + { + } + + def Cube "cube" + { + } +} \ No newline at end of file diff --git a/test_assets/foundation/stage_composition/payload/payload_parent_folder.usda b/test_assets/foundation/stage_composition/payload/payload_parent_folder.usda new file mode 100644 index 00000000..8d11cfd4 --- /dev/null +++ b/test_assets/foundation/stage_composition/payload/payload_parent_folder.usda @@ -0,0 +1,12 @@ +#usda 1.0 +( + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) + +def "World" ( + payload = [@../_parent_stage.usda@] +) +{ +} \ No newline at end of file diff --git a/test_assets/foundation/stage_composition/payload/payload_same_folder.usda b/test_assets/foundation/stage_composition/payload/payload_same_folder.usda new file mode 100644 index 00000000..3ecfd4a4 --- /dev/null +++ b/test_assets/foundation/stage_composition/payload/payload_same_folder.usda @@ -0,0 +1,12 @@ +#usda 1.0 +( + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) + +def "World" ( + payload = [@_stage.usda@] +) +{ +} \ No newline at end of file diff --git a/test_assets/foundation/stage_composition/payload/screenshots/payload_child_folder_usdrecord_22.08.png b/test_assets/foundation/stage_composition/payload/screenshots/payload_child_folder_usdrecord_22.08.png new file mode 100644 index 00000000..bafdfa74 Binary files /dev/null and b/test_assets/foundation/stage_composition/payload/screenshots/payload_child_folder_usdrecord_22.08.png differ diff --git a/test_assets/foundation/stage_composition/payload/screenshots/payload_invalid_usdrecord_22.08.png b/test_assets/foundation/stage_composition/payload/screenshots/payload_invalid_usdrecord_22.08.png new file mode 100644 index 00000000..bafdfa74 Binary files /dev/null and b/test_assets/foundation/stage_composition/payload/screenshots/payload_invalid_usdrecord_22.08.png differ diff --git a/test_assets/foundation/stage_composition/payload/screenshots/payload_parent_folder_usdrecord_22.08.png b/test_assets/foundation/stage_composition/payload/screenshots/payload_parent_folder_usdrecord_22.08.png new file mode 100644 index 00000000..bafdfa74 Binary files /dev/null and b/test_assets/foundation/stage_composition/payload/screenshots/payload_parent_folder_usdrecord_22.08.png differ diff --git a/test_assets/foundation/stage_composition/payload/screenshots/payload_same_folder_usdrecord_22.08.png b/test_assets/foundation/stage_composition/payload/screenshots/payload_same_folder_usdrecord_22.08.png new file mode 100644 index 00000000..bafdfa74 Binary files /dev/null and b/test_assets/foundation/stage_composition/payload/screenshots/payload_same_folder_usdrecord_22.08.png differ diff --git a/test_assets/foundation/stage_composition/purpose.usda b/test_assets/foundation/stage_composition/purpose.usda new file mode 100644 index 00000000..a1d31c3b --- /dev/null +++ b/test_assets/foundation/stage_composition/purpose.usda @@ -0,0 +1,47 @@ +#usda 1.0 +( + defaultPrim = "World" + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) + +def Scope "World" +{ + def Cube "CubeIsGuide" + { + token purpose = "guide" + color3f[] primvars:displayColor = [(0.8, 0, 0)] + + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate"] + } + + def Cube "CubeIsRender" + { + token purpose = "render" + color3f[] primvars:displayColor = [(0, 0.8, 0)] + + double3 xformOp:translate = (3, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate"] + } + + def Cube "CubeIsProxy" + { + token purpose = "proxy" + color3f[] primvars:displayColor = [(0, 0, 0.8)] + + double3 xformOp:translate = (6, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate"] + } + + def Cube "CubeIsOther" + { + token purpose = "other" + color3f[] primvars:displayColor = [(0.8, 0.8, 0)] + + double3 xformOp:translate = (9, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate"] + } +} + diff --git a/test_assets/foundation/stage_composition/references/README.md b/test_assets/foundation/stage_composition/references/README.md new file mode 100644 index 00000000..c50a7fe1 --- /dev/null +++ b/test_assets/foundation/stage_composition/references/README.md @@ -0,0 +1,11 @@ +# References + +These files reference (`references = ...`) stages from different locations on disk. If loaded successfully, a single cube is visible. + +![screenshot](screenshots/reference_same_folder_usdrecord_22.08.png) +_usdrecord 22.08_ + +- file in child folder: [reference_child_folder.usda](reference_child_folder.usda) +- invalid file: [reference_invalid.usda](reference_invalid.usda) +- file in parent folder: [reference_parent_folder.usda](reference_parent_folder.usda) +- file in same folder: [reference_same_folder.usda](reference_same_folder.usda) diff --git a/test_assets/foundation/stage_composition/references/_children/_child_stage.usda b/test_assets/foundation/stage_composition/references/_children/_child_stage.usda new file mode 100644 index 00000000..3082043b --- /dev/null +++ b/test_assets/foundation/stage_composition/references/_children/_child_stage.usda @@ -0,0 +1,14 @@ +#usda 1.0 +( + defaultPrim = "World" + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) + +def Scope "World" +{ + def Cube "Cube" + { + } +} diff --git a/test_assets/foundation/stage_composition/references/_stage.usda b/test_assets/foundation/stage_composition/references/_stage.usda new file mode 100644 index 00000000..3082043b --- /dev/null +++ b/test_assets/foundation/stage_composition/references/_stage.usda @@ -0,0 +1,14 @@ +#usda 1.0 +( + defaultPrim = "World" + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) + +def Scope "World" +{ + def Cube "Cube" + { + } +} diff --git a/test_assets/foundation/stage_composition/references/reference_child_folder.usda b/test_assets/foundation/stage_composition/references/reference_child_folder.usda new file mode 100644 index 00000000..aa47b558 --- /dev/null +++ b/test_assets/foundation/stage_composition/references/reference_child_folder.usda @@ -0,0 +1,12 @@ +#usda 1.0 +( + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) + +def "World" ( + references = [@_children/_child_stage.usda@] +) +{ +} \ No newline at end of file diff --git a/test_assets/foundation/stage_composition/references/reference_invalid.usda b/test_assets/foundation/stage_composition/references/reference_invalid.usda new file mode 100644 index 00000000..3506717a --- /dev/null +++ b/test_assets/foundation/stage_composition/references/reference_invalid.usda @@ -0,0 +1,20 @@ +#usda 1.0 +( + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) + +def "World" +{ + def "invalid_reference" ( + references = @file_does_not_exist.usda@ + ) + { + } + + def Cube "cube" + { + + } +} \ No newline at end of file diff --git a/test_assets/foundation/stage_composition/references/reference_parent_folder.usda b/test_assets/foundation/stage_composition/references/reference_parent_folder.usda new file mode 100644 index 00000000..b505ffc4 --- /dev/null +++ b/test_assets/foundation/stage_composition/references/reference_parent_folder.usda @@ -0,0 +1,12 @@ +#usda 1.0 +( + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) + +def "World" ( + references = [@../_parent_stage.usda@] +) +{ +} \ No newline at end of file diff --git a/test_assets/foundation/stage_composition/references/reference_same_folder.usda b/test_assets/foundation/stage_composition/references/reference_same_folder.usda new file mode 100644 index 00000000..7b8a8b5c --- /dev/null +++ b/test_assets/foundation/stage_composition/references/reference_same_folder.usda @@ -0,0 +1,12 @@ +#usda 1.0 +( + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) + +def "World" ( + references = @_stage.usda@ +) +{ +} \ No newline at end of file diff --git a/test_assets/foundation/stage_composition/references/screenshots/reference_child_folder_usdrecord_22.08.png b/test_assets/foundation/stage_composition/references/screenshots/reference_child_folder_usdrecord_22.08.png new file mode 100644 index 00000000..bafdfa74 Binary files /dev/null and b/test_assets/foundation/stage_composition/references/screenshots/reference_child_folder_usdrecord_22.08.png differ diff --git a/test_assets/foundation/stage_composition/references/screenshots/reference_invalid_usdrecord_22.08.png b/test_assets/foundation/stage_composition/references/screenshots/reference_invalid_usdrecord_22.08.png new file mode 100644 index 00000000..bafdfa74 Binary files /dev/null and b/test_assets/foundation/stage_composition/references/screenshots/reference_invalid_usdrecord_22.08.png differ diff --git a/test_assets/foundation/stage_composition/references/screenshots/reference_parent_folder_usdrecord_22.08.png b/test_assets/foundation/stage_composition/references/screenshots/reference_parent_folder_usdrecord_22.08.png new file mode 100644 index 00000000..bafdfa74 Binary files /dev/null and b/test_assets/foundation/stage_composition/references/screenshots/reference_parent_folder_usdrecord_22.08.png differ diff --git a/test_assets/foundation/stage_composition/references/screenshots/reference_same_folder_usdrecord_22.08.png b/test_assets/foundation/stage_composition/references/screenshots/reference_same_folder_usdrecord_22.08.png new file mode 100644 index 00000000..bafdfa74 Binary files /dev/null and b/test_assets/foundation/stage_composition/references/screenshots/reference_same_folder_usdrecord_22.08.png differ diff --git a/test_assets/foundation/stage_composition/references_prim/README.md b/test_assets/foundation/stage_composition/references_prim/README.md new file mode 100644 index 00000000..75d08457 --- /dev/null +++ b/test_assets/foundation/stage_composition/references_prim/README.md @@ -0,0 +1,24 @@ +# References prim + +These files show how to reference prims directly. + +## References prim in other file + +![screenshot](screenshots/reference_prim_in_other_file_usdrecord_22.08.png) +_reference_prim_in_other_file.usda, usdrecord 22.08_ + +[reference_prim_in_other_file.usda](reference_prim_in_other_file.usda) contains three prim references in other files: + +- `Cube_with_reference` references an existing mesh +- `Cube_invalid_reference` references a non existing mesh in a valid file +- `Cube_invalid_file_reference` references an non existing mesh in an invalid file + +## References prims in same file + +![screenshot](screenshots/reference_prim_in_same_file_usdrecord_22.08.png) +_reference_prim_in_same_file.usda, usdrecord 22.08_ + +[reference_prim_in_same_file.usda](reference_prim_in_same_file.usda) contains two prim references within the same file: + +- `Cube_with_reference` references an existing mesh +- `Cube_with_invalid_reference` references an non existing mesh diff --git a/test_assets/foundation/stage_composition/references_prim/_stage.usda b/test_assets/foundation/stage_composition/references_prim/_stage.usda new file mode 100644 index 00000000..3082043b --- /dev/null +++ b/test_assets/foundation/stage_composition/references_prim/_stage.usda @@ -0,0 +1,14 @@ +#usda 1.0 +( + defaultPrim = "World" + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) + +def Scope "World" +{ + def Cube "Cube" + { + } +} diff --git a/test_assets/foundation/stage_composition/references_prim/reference_prim_in_other_file.usda b/test_assets/foundation/stage_composition/references_prim/reference_prim_in_other_file.usda new file mode 100644 index 00000000..74f73e1f --- /dev/null +++ b/test_assets/foundation/stage_composition/references_prim/reference_prim_in_other_file.usda @@ -0,0 +1,34 @@ +#usda 1.0 +( + defaultPrim = "World" + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) + +def Scope "World" +{ + def "Cube_with_reference" ( + references = @_stage.usda@ + ) + { + } + + def "Cube_invalid_reference" ( + references = @_stage.usda@ + ) + { + color3f[] primvars:displayColor = [(0.8, 0, 0)] + double3 xformOp:translate = (3, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate"] + } + + def "Cube_invalid_file_reference" ( + references = @file_does_not_exist.usda@ + ) + { + color3f[] primvars:displayColor = [(0.8, 0, 0)] + double3 xformOp:translate = (3, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate"] + } +} \ No newline at end of file diff --git a/test_assets/foundation/stage_composition/references_prim/reference_prim_in_same_file.usda b/test_assets/foundation/stage_composition/references_prim/reference_prim_in_same_file.usda new file mode 100644 index 00000000..a0a5355d --- /dev/null +++ b/test_assets/foundation/stage_composition/references_prim/reference_prim_in_same_file.usda @@ -0,0 +1,32 @@ +#usda 1.0 +( + defaultPrim = "World" + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) + +def Scope "World" { + + def Cube "Cube" + { + } + + def "Cube_with_reference" ( + references = + ) + { + color3f[] primvars:displayColor = [(0.8, 0, 0)] + double3 xformOp:translate = (3, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate"] + } + + def "Cube_with_invalid_reference" ( + references = + ) + { + color3f[] primvars:displayColor = [(0.8, 0, 0)] + double3 xformOp:translate = (6, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate"] + } +} \ No newline at end of file diff --git a/test_assets/foundation/stage_composition/references_prim/screenshots/reference_prim_in_other_file_usdrecord_22.08.png b/test_assets/foundation/stage_composition/references_prim/screenshots/reference_prim_in_other_file_usdrecord_22.08.png new file mode 100644 index 00000000..bafdfa74 Binary files /dev/null and b/test_assets/foundation/stage_composition/references_prim/screenshots/reference_prim_in_other_file_usdrecord_22.08.png differ diff --git a/test_assets/foundation/stage_composition/references_prim/screenshots/reference_prim_in_same_file_usdrecord_22.08.png b/test_assets/foundation/stage_composition/references_prim/screenshots/reference_prim_in_same_file_usdrecord_22.08.png new file mode 100644 index 00000000..bafdfa74 Binary files /dev/null and b/test_assets/foundation/stage_composition/references_prim/screenshots/reference_prim_in_same_file_usdrecord_22.08.png differ diff --git a/test_assets/foundation/stage_composition/screenshots/_parent_stage_usdrecord_22.08.png b/test_assets/foundation/stage_composition/screenshots/_parent_stage_usdrecord_22.08.png new file mode 100644 index 00000000..bafdfa74 Binary files /dev/null and b/test_assets/foundation/stage_composition/screenshots/_parent_stage_usdrecord_22.08.png differ diff --git a/test_assets/foundation/stage_composition/screenshots/active_usdrecord_22.08.png b/test_assets/foundation/stage_composition/screenshots/active_usdrecord_22.08.png new file mode 100644 index 00000000..5d939e1f Binary files /dev/null and b/test_assets/foundation/stage_composition/screenshots/active_usdrecord_22.08.png differ diff --git a/test_assets/foundation/stage_composition/screenshots/class_inherit_usdrecord_22.08.png b/test_assets/foundation/stage_composition/screenshots/class_inherit_usdrecord_22.08.png new file mode 100644 index 00000000..e4b9b85e Binary files /dev/null and b/test_assets/foundation/stage_composition/screenshots/class_inherit_usdrecord_22.08.png differ diff --git a/test_assets/foundation/stage_composition/screenshots/inherit_and_specialize_usdrecord_22.08.png b/test_assets/foundation/stage_composition/screenshots/inherit_and_specialize_usdrecord_22.08.png new file mode 100644 index 00000000..0b1ce48d Binary files /dev/null and b/test_assets/foundation/stage_composition/screenshots/inherit_and_specialize_usdrecord_22.08.png differ diff --git a/test_assets/foundation/stage_composition/screenshots/over_usdrecord_22.08.png b/test_assets/foundation/stage_composition/screenshots/over_usdrecord_22.08.png new file mode 100644 index 00000000..538fbfe9 Binary files /dev/null and b/test_assets/foundation/stage_composition/screenshots/over_usdrecord_22.08.png differ diff --git a/test_assets/foundation/stage_composition/screenshots/purpose_usdrecord_22.08.png b/test_assets/foundation/stage_composition/screenshots/purpose_usdrecord_22.08.png new file mode 100644 index 00000000..88a60018 Binary files /dev/null and b/test_assets/foundation/stage_composition/screenshots/purpose_usdrecord_22.08.png differ diff --git a/test_assets/foundation/stage_composition/subLayer/README.md b/test_assets/foundation/stage_composition/subLayer/README.md new file mode 100644 index 00000000..802b03dc --- /dev/null +++ b/test_assets/foundation/stage_composition/subLayer/README.md @@ -0,0 +1,11 @@ +# SubLayer + +These files `subLayers` stages from different locations on disk. If loaded successfully, a single cube should be visible. + +![screenshot](screenshots/sublayer_same_folder_usdrecord_22.08.png) +_usdrecord 22.08_ + +- file in child folder: [sublayer_child_folder.usda](sublayer_child_folder.usda) +- invalid file: [sublayer_invalid.usda](sublayer_invalid.usda) +- file in parent folder: [sublayer_parent_folder.usda](sublayer_parent_folder.usda) +- file in same folder: [sublayer_same_folder.usda](sublayer_same_folder.usda) diff --git a/test_assets/foundation/stage_composition/subLayer/_children/_child_stage.usda b/test_assets/foundation/stage_composition/subLayer/_children/_child_stage.usda new file mode 100644 index 00000000..3082043b --- /dev/null +++ b/test_assets/foundation/stage_composition/subLayer/_children/_child_stage.usda @@ -0,0 +1,14 @@ +#usda 1.0 +( + defaultPrim = "World" + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) + +def Scope "World" +{ + def Cube "Cube" + { + } +} diff --git a/test_assets/foundation/stage_composition/subLayer/_stage.usda b/test_assets/foundation/stage_composition/subLayer/_stage.usda new file mode 100644 index 00000000..3082043b --- /dev/null +++ b/test_assets/foundation/stage_composition/subLayer/_stage.usda @@ -0,0 +1,14 @@ +#usda 1.0 +( + defaultPrim = "World" + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) + +def Scope "World" +{ + def Cube "Cube" + { + } +} diff --git a/test_assets/foundation/stage_composition/subLayer/screenshots/sublayer_child_folder_usdrecord_22.08.png b/test_assets/foundation/stage_composition/subLayer/screenshots/sublayer_child_folder_usdrecord_22.08.png new file mode 100644 index 00000000..bafdfa74 Binary files /dev/null and b/test_assets/foundation/stage_composition/subLayer/screenshots/sublayer_child_folder_usdrecord_22.08.png differ diff --git a/test_assets/foundation/stage_composition/subLayer/screenshots/sublayer_invalid_usdrecord_22.08.png b/test_assets/foundation/stage_composition/subLayer/screenshots/sublayer_invalid_usdrecord_22.08.png new file mode 100644 index 00000000..bafdfa74 Binary files /dev/null and b/test_assets/foundation/stage_composition/subLayer/screenshots/sublayer_invalid_usdrecord_22.08.png differ diff --git a/test_assets/foundation/stage_composition/subLayer/screenshots/sublayer_parent_folder_usdrecord_22.08.png b/test_assets/foundation/stage_composition/subLayer/screenshots/sublayer_parent_folder_usdrecord_22.08.png new file mode 100644 index 00000000..bafdfa74 Binary files /dev/null and b/test_assets/foundation/stage_composition/subLayer/screenshots/sublayer_parent_folder_usdrecord_22.08.png differ diff --git a/test_assets/foundation/stage_composition/subLayer/screenshots/sublayer_same_folder_usdrecord_22.08.png b/test_assets/foundation/stage_composition/subLayer/screenshots/sublayer_same_folder_usdrecord_22.08.png new file mode 100644 index 00000000..bafdfa74 Binary files /dev/null and b/test_assets/foundation/stage_composition/subLayer/screenshots/sublayer_same_folder_usdrecord_22.08.png differ diff --git a/test_assets/foundation/stage_composition/subLayer/sublayer_child_folder.usda b/test_assets/foundation/stage_composition/subLayer/sublayer_child_folder.usda new file mode 100644 index 00000000..97931a3c --- /dev/null +++ b/test_assets/foundation/stage_composition/subLayer/sublayer_child_folder.usda @@ -0,0 +1,9 @@ +#usda 1.0 +( + subLayers = [ + @_children/_child_stage.usda@ + ] + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) diff --git a/test_assets/foundation/stage_composition/subLayer/sublayer_invalid.usda b/test_assets/foundation/stage_composition/subLayer/sublayer_invalid.usda new file mode 100644 index 00000000..faf58831 --- /dev/null +++ b/test_assets/foundation/stage_composition/subLayer/sublayer_invalid.usda @@ -0,0 +1,14 @@ +#usda 1.0 +( + subLayers = [ + @file_does_not_exist.usda@ + ] + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) + +def Cube "cube" +{ + +} \ No newline at end of file diff --git a/test_assets/foundation/stage_composition/subLayer/sublayer_parent_folder.usda b/test_assets/foundation/stage_composition/subLayer/sublayer_parent_folder.usda new file mode 100644 index 00000000..bd06d50b --- /dev/null +++ b/test_assets/foundation/stage_composition/subLayer/sublayer_parent_folder.usda @@ -0,0 +1,9 @@ +#usda 1.0 +( + subLayers = [ + @../_parent_stage.usda@ + ] + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) \ No newline at end of file diff --git a/test_assets/foundation/stage_composition/subLayer/sublayer_same_folder.usda b/test_assets/foundation/stage_composition/subLayer/sublayer_same_folder.usda new file mode 100644 index 00000000..5f3c0026 --- /dev/null +++ b/test_assets/foundation/stage_composition/subLayer/sublayer_same_folder.usda @@ -0,0 +1,9 @@ +#usda 1.0 +( + subLayers = [ + @_stage.usda@ + ] + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) \ No newline at end of file diff --git a/test_assets/foundation/stage_configuration/framesPerSecond/README.md b/test_assets/foundation/stage_configuration/framesPerSecond/README.md new file mode 100644 index 00000000..3c838e12 --- /dev/null +++ b/test_assets/foundation/stage_configuration/framesPerSecond/README.md @@ -0,0 +1,21 @@ +# FramesPerSecond + +These files show the behavior of an animation for different `framesPerSecond` values set, especially edge cases. + +The animated prim has time samples from `0` to `100`: + +```usda +double3 xformOp:translate.timeSamples = { + 0: (0, 0, 0), + 100: (100, 0, 0), +} +``` + +- `framesPerSecond = -1` : [framesPerSecond_-1.usda](framesPerSecond_-1.usda) +- `framesPerSecond = 0` : [framesPerSecond_0.usda](framesPerSecond_0.usda) +- `framesPerSecond = 1` : [framesPerSecond_1.usda](framesPerSecond_1.usda) +- `framesPerSecond = 24` : [framesPerSecond_24.usda](framesPerSecond_24.usda) +- `framesPerSecond = 48` : [framesPerSecond_48.usda](framesPerSecond_48.usda) +- `framesPerSecond = 100` : [framesPerSecond_100.usda](framesPerSecond_100.usda) +- `framesPerSecond = 101` : [framesPerSecond_101.usda](framesPerSecond_101.usda) +- `framesPerSecond = 128` : [framesPerSecond_128.usda](framesPerSecond_128.usda) diff --git a/test_assets/foundation/stage_configuration/framesPerSecond/framesPerSecond_-1.usda b/test_assets/foundation/stage_configuration/framesPerSecond/framesPerSecond_-1.usda new file mode 100644 index 00000000..ddcbc564 --- /dev/null +++ b/test_assets/foundation/stage_configuration/framesPerSecond/framesPerSecond_-1.usda @@ -0,0 +1,14 @@ +#usda 1.0 +( + framesPerSecond = -1 + endTimeCode = 100 + startTimeCode = 0 + subLayers = [ + @../../../_common/animated_cube_translation.usda@, + @../../../_common/axis.usda@ + ] + + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) \ No newline at end of file diff --git a/test_assets/foundation/stage_configuration/framesPerSecond/framesPerSecond_0.usda b/test_assets/foundation/stage_configuration/framesPerSecond/framesPerSecond_0.usda new file mode 100644 index 00000000..d0577cbb --- /dev/null +++ b/test_assets/foundation/stage_configuration/framesPerSecond/framesPerSecond_0.usda @@ -0,0 +1,14 @@ +#usda 1.0 +( + framesPerSecond = 0 + endTimeCode = 100 + startTimeCode = 0 + subLayers = [ + @../../../_common/animated_cube_translation.usda@, + @../../../_common/axis.usda@ + ] + + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) \ No newline at end of file diff --git a/test_assets/foundation/stage_configuration/framesPerSecond/framesPerSecond_1.usda b/test_assets/foundation/stage_configuration/framesPerSecond/framesPerSecond_1.usda new file mode 100644 index 00000000..1c6f357c --- /dev/null +++ b/test_assets/foundation/stage_configuration/framesPerSecond/framesPerSecond_1.usda @@ -0,0 +1,14 @@ +#usda 1.0 +( + framesPerSecond = 1 + endTimeCode = 100 + startTimeCode = 0 + subLayers = [ + @../../../_common/animated_cube_translation.usda@, + @../../../_common/axis.usda@ + ] + + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) \ No newline at end of file diff --git a/test_assets/foundation/stage_configuration/framesPerSecond/framesPerSecond_100.usda b/test_assets/foundation/stage_configuration/framesPerSecond/framesPerSecond_100.usda new file mode 100644 index 00000000..4f18d3fe --- /dev/null +++ b/test_assets/foundation/stage_configuration/framesPerSecond/framesPerSecond_100.usda @@ -0,0 +1,14 @@ +#usda 1.0 +( + framesPerSecond = 100 + endTimeCode = 100 + startTimeCode = 0 + subLayers = [ + @../../../_common/animated_cube_translation.usda@, + @../../../_common/axis.usda@ + ] + + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) \ No newline at end of file diff --git a/test_assets/foundation/stage_configuration/framesPerSecond/framesPerSecond_101.usda b/test_assets/foundation/stage_configuration/framesPerSecond/framesPerSecond_101.usda new file mode 100644 index 00000000..d92cec02 --- /dev/null +++ b/test_assets/foundation/stage_configuration/framesPerSecond/framesPerSecond_101.usda @@ -0,0 +1,14 @@ +#usda 1.0 +( + framesPerSecond = 101 + endTimeCode = 100 + startTimeCode = 0 + subLayers = [ + @../../../_common/animated_cube_translation.usda@, + @../../../_common/axis.usda@ + ] + + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) \ No newline at end of file diff --git a/test_assets/foundation/stage_configuration/framesPerSecond/framesPerSecond_128.usda b/test_assets/foundation/stage_configuration/framesPerSecond/framesPerSecond_128.usda new file mode 100644 index 00000000..5a433494 --- /dev/null +++ b/test_assets/foundation/stage_configuration/framesPerSecond/framesPerSecond_128.usda @@ -0,0 +1,14 @@ +#usda 1.0 +( + framesPerSecond = 128 + endTimeCode = 100 + startTimeCode = 0 + subLayers = [ + @../../../_common/animated_cube_translation.usda@, + @../../../_common/axis.usda@ + ] + + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) \ No newline at end of file diff --git a/test_assets/foundation/stage_configuration/framesPerSecond/framesPerSecond_24.usda b/test_assets/foundation/stage_configuration/framesPerSecond/framesPerSecond_24.usda new file mode 100644 index 00000000..652b5eab --- /dev/null +++ b/test_assets/foundation/stage_configuration/framesPerSecond/framesPerSecond_24.usda @@ -0,0 +1,14 @@ +#usda 1.0 +( + framesPerSecond = 24 + endTimeCode = 100 + startTimeCode = 0 + subLayers = [ + @../../../_common/animated_cube_translation.usda@, + @../../../_common/axis.usda@ + ] + + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) \ No newline at end of file diff --git a/test_assets/foundation/stage_configuration/framesPerSecond/framesPerSecond_48.usda b/test_assets/foundation/stage_configuration/framesPerSecond/framesPerSecond_48.usda new file mode 100644 index 00000000..0ad6448c --- /dev/null +++ b/test_assets/foundation/stage_configuration/framesPerSecond/framesPerSecond_48.usda @@ -0,0 +1,14 @@ +#usda 1.0 +( + framesPerSecond = 48 + endTimeCode = 100 + startTimeCode = 0 + subLayers = [ + @../../../_common/animated_cube_translation.usda@, + @../../../_common/axis.usda@ + ] + + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) \ No newline at end of file diff --git a/test_assets/foundation/stage_configuration/framesPerSecond_timeCodesPerSecond_mixed/24_24.usda b/test_assets/foundation/stage_configuration/framesPerSecond_timeCodesPerSecond_mixed/24_24.usda new file mode 100644 index 00000000..0a586c13 --- /dev/null +++ b/test_assets/foundation/stage_configuration/framesPerSecond_timeCodesPerSecond_mixed/24_24.usda @@ -0,0 +1,15 @@ +#usda 1.0 +( + framesPerSecond = 24 + timeCodesPerSecond = 24 + endTimeCode = 100 + startTimeCode = 0 + subLayers = [ + @../../../_common/animated_cube_translation.usda@, + @../../../_common/axis.usda@ + ] + + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) diff --git a/test_assets/foundation/stage_configuration/framesPerSecond_timeCodesPerSecond_mixed/24_48.usda b/test_assets/foundation/stage_configuration/framesPerSecond_timeCodesPerSecond_mixed/24_48.usda new file mode 100644 index 00000000..822bd26b --- /dev/null +++ b/test_assets/foundation/stage_configuration/framesPerSecond_timeCodesPerSecond_mixed/24_48.usda @@ -0,0 +1,15 @@ +#usda 1.0 +( + framesPerSecond = 24 + timeCodesPerSecond = 48 + endTimeCode = 100 + startTimeCode = 0 + subLayers = [ + @../../../_common/animated_cube_translation.usda@, + @../../../_common/axis.usda@ + ] + + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) diff --git a/test_assets/foundation/stage_configuration/framesPerSecond_timeCodesPerSecond_mixed/48_24.usda b/test_assets/foundation/stage_configuration/framesPerSecond_timeCodesPerSecond_mixed/48_24.usda new file mode 100644 index 00000000..895269f9 --- /dev/null +++ b/test_assets/foundation/stage_configuration/framesPerSecond_timeCodesPerSecond_mixed/48_24.usda @@ -0,0 +1,15 @@ +#usda 1.0 +( + framesPerSecond = 48 + timeCodesPerSecond = 24 + endTimeCode = 100 + startTimeCode = 0 + subLayers = [ + @../../../_common/animated_cube_translation.usda@, + @../../../_common/axis.usda@ + ] + + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) diff --git a/test_assets/foundation/stage_configuration/framesPerSecond_timeCodesPerSecond_mixed/48_48.usda b/test_assets/foundation/stage_configuration/framesPerSecond_timeCodesPerSecond_mixed/48_48.usda new file mode 100644 index 00000000..53a5bf72 --- /dev/null +++ b/test_assets/foundation/stage_configuration/framesPerSecond_timeCodesPerSecond_mixed/48_48.usda @@ -0,0 +1,15 @@ +#usda 1.0 +( + framesPerSecond = 48 + timeCodesPerSecond = 48 + endTimeCode = 100 + startTimeCode = 0 + subLayers = [ + @../../../_common/animated_cube_translation.usda@, + @../../../_common/axis.usda@ + ] + + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) diff --git a/test_assets/foundation/stage_configuration/framesPerSecond_timeCodesPerSecond_mixed/README.md b/test_assets/foundation/stage_configuration/framesPerSecond_timeCodesPerSecond_mixed/README.md new file mode 100644 index 00000000..0203284c --- /dev/null +++ b/test_assets/foundation/stage_configuration/framesPerSecond_timeCodesPerSecond_mixed/README.md @@ -0,0 +1,48 @@ +# FramesPerSecond and timeCodesPerSecond mixed + +These files show the behavior of an animation for a mix of different `framesPerSecond` and `timeCodesPerSecond` values. + +The animated prim has time samples from `0` to `100`: + +```usda +double3 xformOp:translate.timeSamples = { + 0: (0, 0, 0), + 100: (100, 0, 0), +} +``` + +## 24 + 24 + +[24_24.usda](24_24.usda) + +```usda +framesPerSecond = 24 +timeCodesPerSecond = 24 +``` + +## 24 + 48 + +[24_48.usda](24_48.usda) + +```usda +framesPerSecond = 24 +timeCodesPerSecond = 48 +``` + +## 48 + 24 + +[48_24.usda](48_24.usda) + +```usda +framesPerSecond = 48 +timeCodesPerSecond = 24 +``` + +## 48 + 48 + +[48_48.usda](48_48.usda) + +```usda +framesPerSecond = 48 +timeCodesPerSecond = 48 +``` diff --git a/test_assets/foundation/stage_configuration/invalid_defaultPrim/README.md b/test_assets/foundation/stage_configuration/invalid_defaultPrim/README.md new file mode 100644 index 00000000..664f2743 --- /dev/null +++ b/test_assets/foundation/stage_configuration/invalid_defaultPrim/README.md @@ -0,0 +1,10 @@ +# Invalid Default Prim + +## Screenshot + +![screenshot](screenshots/invalid_defaultPrim_usdrecord_22.08.png) +_usdrecord 22.08_ + +## Description + +This stage has an invalid, non-existing `defaultPrim` defined and a regular cube prim. This stage can be used to verify if applications interpret this as an invalid file without content or if they show the cube and ignore the invalid `defaultPrim`. diff --git a/test_assets/foundation/stage_configuration/invalid_defaultPrim/invalid_defaultPrim.usda b/test_assets/foundation/stage_configuration/invalid_defaultPrim/invalid_defaultPrim.usda new file mode 100644 index 00000000..d13a1fc7 --- /dev/null +++ b/test_assets/foundation/stage_configuration/invalid_defaultPrim/invalid_defaultPrim.usda @@ -0,0 +1,11 @@ +#usda 1.0 +( + defaultPrim = "invalidDefaultPrim" + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) + +def Cube "Cube" +{ +} diff --git a/test_assets/foundation/stage_configuration/invalid_defaultPrim/screenshots/invalid_defaultPrim_usdrecord_22.08.png b/test_assets/foundation/stage_configuration/invalid_defaultPrim/screenshots/invalid_defaultPrim_usdrecord_22.08.png new file mode 100644 index 00000000..bafdfa74 Binary files /dev/null and b/test_assets/foundation/stage_configuration/invalid_defaultPrim/screenshots/invalid_defaultPrim_usdrecord_22.08.png differ diff --git a/test_assets/foundation/stage_configuration/metersPerUnit/README.md b/test_assets/foundation/stage_configuration/metersPerUnit/README.md new file mode 100644 index 00000000..5289b6f3 --- /dev/null +++ b/test_assets/foundation/stage_configuration/metersPerUnit/README.md @@ -0,0 +1,36 @@ +# MetersPerUnit + +These files show how the `metersPerUnit` stage metadata works. + +## MetersPerUnit = 1 + +[metersPerUnit_1.usda](./metersPerUnit_1.usda) + +```usda +metersPerUnit = 1 +``` + +![screenshot](screenshots/metersPerUnit_1_usdrecord_22.08.png) +_metersPerUnit_1.usda, usdrecord 22.08_ + +## MetersPerUnit = 10 + +[metersPerUnit_10.usda](./metersPerUnit_10.usda) + +```usda +metersPerUnit = 10 +``` + +![screenshot](screenshots/metersPerUnit_10_usdrecord_22.08.png) +_metersPerUnit_10.usda, usdrecord 22.08_ + +## MetersPerUnit mixed + +[metersPerUnit_mix.usda](./metersPerUnit_mixed.usda) + +This stage sets `metersPerUnit = 100` and also sublayers `metersPerUnit_1.usda` and `metersPerUnit_10.usda` with different values. + +USD does not auto-scale layers with divergent `metersPerUnit`. As a result, all three cubes in this file have the same size. + +![screenshot](screenshots/metersPerUnit_mix_usdrecord_22.08.png) +_metersPerUnit_mix.usda, usdrecord 22.08_ diff --git a/test_assets/foundation/stage_configuration/metersPerUnit/metersPerUnit_1.usda b/test_assets/foundation/stage_configuration/metersPerUnit/metersPerUnit_1.usda new file mode 100644 index 00000000..d3452b30 --- /dev/null +++ b/test_assets/foundation/stage_configuration/metersPerUnit/metersPerUnit_1.usda @@ -0,0 +1,15 @@ +#usda 1.0 +( + metersPerUnit = 1 + subLayers = [ + @../../../_common/axis.usda@ + ] + + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) + +def Cube "cube_1" { + +} \ No newline at end of file diff --git a/test_assets/foundation/stage_configuration/metersPerUnit/metersPerUnit_10.usda b/test_assets/foundation/stage_configuration/metersPerUnit/metersPerUnit_10.usda new file mode 100644 index 00000000..b52b0c3b --- /dev/null +++ b/test_assets/foundation/stage_configuration/metersPerUnit/metersPerUnit_10.usda @@ -0,0 +1,15 @@ +#usda 1.0 +( + metersPerUnit = 10 + subLayers = [ + @../../../_common/axis.usda@ + ] + + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) + +def Cube "cube_10" { + +} \ No newline at end of file diff --git a/test_assets/foundation/stage_configuration/metersPerUnit/metersPerUnit_mix.usda b/test_assets/foundation/stage_configuration/metersPerUnit/metersPerUnit_mix.usda new file mode 100644 index 00000000..bcc5ce57 --- /dev/null +++ b/test_assets/foundation/stage_configuration/metersPerUnit/metersPerUnit_mix.usda @@ -0,0 +1,27 @@ +#usda 1.0 +( + metersPerUnit = 100 + subLayers = [ + @metersPerUnit_1.usda@, + @metersPerUnit_10.usda@, + @../../../_common/axis.usda@ + ] + + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) + +def Cube "cube_100" { + +} + +over "cube_1" { + double3 xformOp:translate = (3, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate"] +} + +over "cube_10" { + double3 xformOp:translate = (6, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate"] +} \ No newline at end of file diff --git a/test_assets/foundation/stage_configuration/metersPerUnit/screenshots/metersPerUnit_10_usdrecord_22.08.png b/test_assets/foundation/stage_configuration/metersPerUnit/screenshots/metersPerUnit_10_usdrecord_22.08.png new file mode 100644 index 00000000..f50cae27 Binary files /dev/null and b/test_assets/foundation/stage_configuration/metersPerUnit/screenshots/metersPerUnit_10_usdrecord_22.08.png differ diff --git a/test_assets/foundation/stage_configuration/metersPerUnit/screenshots/metersPerUnit_1_usdrecord_22.08.png b/test_assets/foundation/stage_configuration/metersPerUnit/screenshots/metersPerUnit_1_usdrecord_22.08.png new file mode 100644 index 00000000..f50cae27 Binary files /dev/null and b/test_assets/foundation/stage_configuration/metersPerUnit/screenshots/metersPerUnit_1_usdrecord_22.08.png differ diff --git a/test_assets/foundation/stage_configuration/metersPerUnit/screenshots/metersPerUnit_mix_usdrecord_22.08.png b/test_assets/foundation/stage_configuration/metersPerUnit/screenshots/metersPerUnit_mix_usdrecord_22.08.png new file mode 100644 index 00000000..ebafa72c Binary files /dev/null and b/test_assets/foundation/stage_configuration/metersPerUnit/screenshots/metersPerUnit_mix_usdrecord_22.08.png differ diff --git a/test_assets/foundation/stage_configuration/multiple_root_prims/README.md b/test_assets/foundation/stage_configuration/multiple_root_prims/README.md new file mode 100644 index 00000000..48b15ab1 --- /dev/null +++ b/test_assets/foundation/stage_configuration/multiple_root_prims/README.md @@ -0,0 +1,17 @@ +# Multiple Root Prims + +These files show how stages with multiple root prims behave. + +## No defaultPrim + +[multiple_root_prims_no_defaultPrim.usda](./multiple_root_prims_no_defaultPrim.usda) has two root prims and no `defaultPrim` set. + +![screenshot](screenshots/multiple_root_prims_no_defaultPrim_usdrecord_22.08.png) +_multiple_root_prims_no_defaultPrim.usda, usdrecord 22.08_ + +## With defaultPrim + +[multiple_root_prims_with_defaultPrim.usda](./multiple_root_prims_with_defaultPrim.usda) has two root prims and one of them is set as `defaultPrim`. + +![screenshot](../../../_common/error.png) +_multiple_root_prims_no_defaultPrim.usda, usdrecord 22.08_ diff --git a/test_assets/foundation/stage_configuration/multiple_root_prims/multiple_root_prims_no_defaultPrim.usda b/test_assets/foundation/stage_configuration/multiple_root_prims/multiple_root_prims_no_defaultPrim.usda new file mode 100644 index 00000000..24d5dbf1 --- /dev/null +++ b/test_assets/foundation/stage_configuration/multiple_root_prims/multiple_root_prims_no_defaultPrim.usda @@ -0,0 +1,20 @@ +#usda 1.0 +( + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) + +def Cube "Cube" +{ + double size = 2.0 + float3[] extent = [(-1.0, -1.0, -1.0), (1.0, 1.0, 1.0)] +} + +def Sphere "Sphere" +{ + double radius = 1.0 + float3[] extent = [(-1.0, -1.0, -1.0), (1.0, 1.0, 1.0)] + double3 xformOp:translate = (2, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate"] +} \ No newline at end of file diff --git a/test_assets/foundation/stage_configuration/multiple_root_prims/multiple_root_prims_with_defaultPrim.usda b/test_assets/foundation/stage_configuration/multiple_root_prims/multiple_root_prims_with_defaultPrim.usda new file mode 100644 index 00000000..93126ac1 --- /dev/null +++ b/test_assets/foundation/stage_configuration/multiple_root_prims/multiple_root_prims_with_defaultPrim.usda @@ -0,0 +1,21 @@ +#usda 1.0 +( + defaultPrim = "Sphere" + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) + +def Cube "Cube" +{ + double size = 2.0 + float3[] extent = [(-1.0, -1.0, -1.0), (1.0, 1.0, 1.0)] +} + +def Sphere "Sphere" +{ + double radius = 1.0 + float3[] extent = [(-1.0, -1.0, -1.0), (1.0, 1.0, 1.0)] + double3 xformOp:translate = (2, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate"] +} \ No newline at end of file diff --git a/test_assets/foundation/stage_configuration/multiple_root_prims/screenshots/multiple_root_prims_no_defaultPrim_usdrecord_22.08.png b/test_assets/foundation/stage_configuration/multiple_root_prims/screenshots/multiple_root_prims_no_defaultPrim_usdrecord_22.08.png new file mode 100644 index 00000000..0805e942 Binary files /dev/null and b/test_assets/foundation/stage_configuration/multiple_root_prims/screenshots/multiple_root_prims_no_defaultPrim_usdrecord_22.08.png differ diff --git a/test_assets/foundation/stage_configuration/start_end_timeCode/README.md b/test_assets/foundation/stage_configuration/start_end_timeCode/README.md new file mode 100644 index 00000000..cde566ce --- /dev/null +++ b/test_assets/foundation/stage_configuration/start_end_timeCode/README.md @@ -0,0 +1,66 @@ +# Start End TimeCode + +These files show how animated stages behave for different combinations of `startTimeCode` and `endTimeCode` stage metadata. + +The animated prim has time samples from `0` to `100`: + +```usda +double3 xformOp:translate.timeSamples = { + 0: (0, 0, 0), + 100: (100, 0, 0), +} +``` + +## Large values + +[large_start_end_timeCodes.usda](./large_start_end_timeCodes.usda) + +```usda +endTimeCode = 10000000 +startTimeCode = -10000000 +``` + +## Missing both values + +[missing_start_end_timeCodes.usda](./missing_start_end_timeCodes.usda) + +Neither `endTimeCode` nor `startTimeCode` is set. + +## Missing startTimeCode + +[missing_startTimeCode.usda](./missing_startTimeCode.usda) + +`startTimeCode` is not set. + +## Missing endTimeCode + +[missing_endTimeCode.usda](./missing_endTimeCode.usda) + +`endTimeCode` is not set. + +## Value subset + +[start_end_timeCodes_subset.usda](./start_end_timeCodes_subset.usda) + +```usda +endTimeCode = 70 +startTimeCode = 40 +``` + +## Value superset + +[start_end_timeCodes_superset.usda](./start_end_timeCodes_superset.usda) + +```usda +endTimeCode = -10 +startTimeCode = 110 +``` + +## Swapped values + +[start_end_timeCodes_swapped.usda](./start_end_timeCodes_swapped.usda) + +```usda +endTimeCode = 0 +startTimeCode = 100 +``` diff --git a/test_assets/foundation/stage_configuration/start_end_timeCode/large_start_end_timeCodes.usda b/test_assets/foundation/stage_configuration/start_end_timeCode/large_start_end_timeCodes.usda new file mode 100644 index 00000000..9865b7ef --- /dev/null +++ b/test_assets/foundation/stage_configuration/start_end_timeCode/large_start_end_timeCodes.usda @@ -0,0 +1,13 @@ +#usda 1.0 +( + endTimeCode = 10000000 + startTimeCode = -10000000 + subLayers = [ + @../../../_common/animated_cube_translation.usda@, + @../../../_common/axis.usda@ + ] + + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) \ No newline at end of file diff --git a/test_assets/foundation/stage_configuration/start_end_timeCode/missing_endTimeCode.usda b/test_assets/foundation/stage_configuration/start_end_timeCode/missing_endTimeCode.usda new file mode 100644 index 00000000..e8a92d83 --- /dev/null +++ b/test_assets/foundation/stage_configuration/start_end_timeCode/missing_endTimeCode.usda @@ -0,0 +1,12 @@ +#usda 1.0 +( + startTimeCode = 0 + subLayers = [ + @../../../_common/animated_cube_translation.usda@, + @../../../_common/axis.usda@ + ] + + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) \ No newline at end of file diff --git a/test_assets/foundation/stage_configuration/start_end_timeCode/missing_startTimeCode.usda b/test_assets/foundation/stage_configuration/start_end_timeCode/missing_startTimeCode.usda new file mode 100644 index 00000000..997edadc --- /dev/null +++ b/test_assets/foundation/stage_configuration/start_end_timeCode/missing_startTimeCode.usda @@ -0,0 +1,12 @@ +#usda 1.0 +( + endTimeCode = 100 + subLayers = [ + @../../../_common/animated_cube_translation.usda@, + @../../../_common/axis.usda@ + ] + + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) \ No newline at end of file diff --git a/test_assets/foundation/stage_configuration/start_end_timeCode/missing_start_end_timeCodes.usda b/test_assets/foundation/stage_configuration/start_end_timeCode/missing_start_end_timeCodes.usda new file mode 100644 index 00000000..48749477 --- /dev/null +++ b/test_assets/foundation/stage_configuration/start_end_timeCode/missing_start_end_timeCodes.usda @@ -0,0 +1,11 @@ +#usda 1.0 +( + subLayers = [ + @../../../_common/animated_cube_translation.usda@, + @../../../_common/axis.usda@ + ] + + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) \ No newline at end of file diff --git a/test_assets/foundation/stage_configuration/start_end_timeCode/negative_start_end_timeCodes.usda b/test_assets/foundation/stage_configuration/start_end_timeCode/negative_start_end_timeCodes.usda new file mode 100644 index 00000000..279a52fb --- /dev/null +++ b/test_assets/foundation/stage_configuration/start_end_timeCode/negative_start_end_timeCodes.usda @@ -0,0 +1,13 @@ +#usda 1.0 +( + endTimeCode = -10 + startTimeCode = -100 + subLayers = [ + @../../../_common/animated_cube_translation.usda@, + @../../../_common/axis.usda@ + ] + + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) \ No newline at end of file diff --git a/test_assets/foundation/stage_configuration/start_end_timeCode/start_end_timeCodes_subset.usda b/test_assets/foundation/stage_configuration/start_end_timeCode/start_end_timeCodes_subset.usda new file mode 100644 index 00000000..5ed9ae28 --- /dev/null +++ b/test_assets/foundation/stage_configuration/start_end_timeCode/start_end_timeCodes_subset.usda @@ -0,0 +1,13 @@ +#usda 1.0 +( + endTimeCode = 70 + startTimeCode = 40 + subLayers = [ + @../../../_common/animated_cube_translation.usda@, + @../../../_common/axis.usda@ + ] + + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) \ No newline at end of file diff --git a/test_assets/foundation/stage_configuration/start_end_timeCode/start_end_timeCodes_superset.usda b/test_assets/foundation/stage_configuration/start_end_timeCode/start_end_timeCodes_superset.usda new file mode 100644 index 00000000..79d6715c --- /dev/null +++ b/test_assets/foundation/stage_configuration/start_end_timeCode/start_end_timeCodes_superset.usda @@ -0,0 +1,13 @@ +#usda 1.0 +( + endTimeCode = 110 + startTimeCode = -10 + subLayers = [ + @../../../_common/animated_cube_translation.usda@, + @../../../_common/axis.usda@ + ] + + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) \ No newline at end of file diff --git a/test_assets/foundation/stage_configuration/start_end_timeCode/start_end_timeCodes_swapped.usda b/test_assets/foundation/stage_configuration/start_end_timeCode/start_end_timeCodes_swapped.usda new file mode 100644 index 00000000..9576bdcc --- /dev/null +++ b/test_assets/foundation/stage_configuration/start_end_timeCode/start_end_timeCodes_swapped.usda @@ -0,0 +1,13 @@ +#usda 1.0 +( + endTimeCode = 0 + startTimeCode = 100 + subLayers = [ + @../../../_common/animated_cube_translation.usda@, + @../../../_common/axis.usda@ + ] + + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) \ No newline at end of file diff --git a/test_assets/foundation/stage_configuration/timeCodesPerSecond/README.md b/test_assets/foundation/stage_configuration/timeCodesPerSecond/README.md new file mode 100644 index 00000000..71b60530 --- /dev/null +++ b/test_assets/foundation/stage_configuration/timeCodesPerSecond/README.md @@ -0,0 +1,21 @@ +# TimeCodesPerSecond + +These files show the behavior of an animation for different `timeCodesPerSecond` values set, especially edge cases. + +The animated prim has time samples from `0` to `100`: + +```usda +double3 xformOp:translate.timeSamples = { + 0: (0, 0, 0), + 100: (100, 0, 0), +} +``` + +- `timeCodesPerSecond = -1` : [timeCodesPerSecond_-1.usda](timeCodesPerSecond_-1.usda) +- `timeCodesPerSecond = 0` : [timeCodesPerSecond_0.usda](timeCodesPerSecond_0.usda) +- `timeCodesPerSecond = 1` : [timeCodesPerSecond_1.usda](timeCodesPerSecond_1.usda) +- `timeCodesPerSecond = 24` : [timeCodesPerSecond_24.usda](timeCodesPerSecond_24.usda) +- `timeCodesPerSecond = 48` : [timeCodesPerSecond_48.usda](timeCodesPerSecond_48.usda) +- `timeCodesPerSecond = 100` : [timeCodesPerSecond_100.usda](timeCodesPerSecond_100.usda) +- `timeCodesPerSecond = 101` : [timeCodesPerSecond_101.usda](timeCodesPerSecond_101.usda) +- `timeCodesPerSecond = 128` : [timeCodesPerSecond_128.usda](timeCodesPerSecond_128.usda) diff --git a/test_assets/foundation/stage_configuration/timeCodesPerSecond/timeCodesPerSecond_-1.usda b/test_assets/foundation/stage_configuration/timeCodesPerSecond/timeCodesPerSecond_-1.usda new file mode 100644 index 00000000..2f35eb11 --- /dev/null +++ b/test_assets/foundation/stage_configuration/timeCodesPerSecond/timeCodesPerSecond_-1.usda @@ -0,0 +1,14 @@ +#usda 1.0 +( + timeCodesPerSecond = -1 + endTimeCode = 100 + startTimeCode = 0 + subLayers = [ + @../../../_common/animated_cube_translation.usda@, + @../../../_common/axis.usda@ + ] + + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) \ No newline at end of file diff --git a/test_assets/foundation/stage_configuration/timeCodesPerSecond/timeCodesPerSecond_0.usda b/test_assets/foundation/stage_configuration/timeCodesPerSecond/timeCodesPerSecond_0.usda new file mode 100644 index 00000000..9e75b3d9 --- /dev/null +++ b/test_assets/foundation/stage_configuration/timeCodesPerSecond/timeCodesPerSecond_0.usda @@ -0,0 +1,14 @@ +#usda 1.0 +( + timeCodesPerSecond = 0 + endTimeCode = 100 + startTimeCode = 0 + subLayers = [ + @../../../_common/animated_cube_translation.usda@, + @../../../_common/axis.usda@ + ] + + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) \ No newline at end of file diff --git a/test_assets/foundation/stage_configuration/timeCodesPerSecond/timeCodesPerSecond_1.usda b/test_assets/foundation/stage_configuration/timeCodesPerSecond/timeCodesPerSecond_1.usda new file mode 100644 index 00000000..6b5944b3 --- /dev/null +++ b/test_assets/foundation/stage_configuration/timeCodesPerSecond/timeCodesPerSecond_1.usda @@ -0,0 +1,14 @@ +#usda 1.0 +( + timeCodesPerSecond = 1 + endTimeCode = 100 + startTimeCode = 0 + subLayers = [ + @../../../_common/animated_cube_translation.usda@, + @../../../_common/axis.usda@ + ] + + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) \ No newline at end of file diff --git a/test_assets/foundation/stage_configuration/timeCodesPerSecond/timeCodesPerSecond_100.usda b/test_assets/foundation/stage_configuration/timeCodesPerSecond/timeCodesPerSecond_100.usda new file mode 100644 index 00000000..a6b9aa7c --- /dev/null +++ b/test_assets/foundation/stage_configuration/timeCodesPerSecond/timeCodesPerSecond_100.usda @@ -0,0 +1,14 @@ +#usda 1.0 +( + timeCodesPerSecond = 100 + endTimeCode = 100 + startTimeCode = 0 + subLayers = [ + @../../../_common/animated_cube_translation.usda@, + @../../../_common/axis.usda@ + ] + + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) \ No newline at end of file diff --git a/test_assets/foundation/stage_configuration/timeCodesPerSecond/timeCodesPerSecond_101.usda b/test_assets/foundation/stage_configuration/timeCodesPerSecond/timeCodesPerSecond_101.usda new file mode 100644 index 00000000..f17ae3df --- /dev/null +++ b/test_assets/foundation/stage_configuration/timeCodesPerSecond/timeCodesPerSecond_101.usda @@ -0,0 +1,14 @@ +#usda 1.0 +( + timeCodesPerSecond = 101 + endTimeCode = 100 + startTimeCode = 0 + subLayers = [ + @../../../_common/animated_cube_translation.usda@, + @../../../_common/axis.usda@ + ] + + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) \ No newline at end of file diff --git a/test_assets/foundation/stage_configuration/timeCodesPerSecond/timeCodesPerSecond_128.usda b/test_assets/foundation/stage_configuration/timeCodesPerSecond/timeCodesPerSecond_128.usda new file mode 100644 index 00000000..74660371 --- /dev/null +++ b/test_assets/foundation/stage_configuration/timeCodesPerSecond/timeCodesPerSecond_128.usda @@ -0,0 +1,14 @@ +#usda 1.0 +( + timeCodesPerSecond = 128 + endTimeCode = 100 + startTimeCode = 0 + subLayers = [ + @../../../_common/animated_cube_translation.usda@, + @../../../_common/axis.usda@ + ] + + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) \ No newline at end of file diff --git a/test_assets/foundation/stage_configuration/timeCodesPerSecond/timeCodesPerSecond_24.usda b/test_assets/foundation/stage_configuration/timeCodesPerSecond/timeCodesPerSecond_24.usda new file mode 100644 index 00000000..4a2e4ce8 --- /dev/null +++ b/test_assets/foundation/stage_configuration/timeCodesPerSecond/timeCodesPerSecond_24.usda @@ -0,0 +1,14 @@ +#usda 1.0 +( + timeCodesPerSecond = 24 + endTimeCode = 100 + startTimeCode = 0 + subLayers = [ + @../../../_common/animated_cube_translation.usda@, + @../../../_common/axis.usda@ + ] + + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) \ No newline at end of file diff --git a/test_assets/foundation/stage_configuration/timeCodesPerSecond/timeCodesPerSecond_48.usda b/test_assets/foundation/stage_configuration/timeCodesPerSecond/timeCodesPerSecond_48.usda new file mode 100644 index 00000000..8136a3d6 --- /dev/null +++ b/test_assets/foundation/stage_configuration/timeCodesPerSecond/timeCodesPerSecond_48.usda @@ -0,0 +1,14 @@ +#usda 1.0 +( + timeCodesPerSecond = 48 + endTimeCode = 100 + startTimeCode = 0 + subLayers = [ + @../../../_common/animated_cube_translation.usda@, + @../../../_common/axis.usda@ + ] + + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) \ No newline at end of file diff --git a/test_assets/foundation/stage_configuration/upAxis/README.md b/test_assets/foundation/stage_configuration/upAxis/README.md new file mode 100644 index 00000000..ebe03cea --- /dev/null +++ b/test_assets/foundation/stage_configuration/upAxis/README.md @@ -0,0 +1,47 @@ +# UpAxis + +These files show examples of the three valid `upAxis` values and one invalid value. + +## X + +[upAxis_X.usda](./upAxis_X.usda) + +```usda +upAxis = "X" +``` + +![screenshot](screenshots/upAxis_X_usdrecord_22.08.png) +_upAxis="X" usdrecord 22.08_ + +## Y + +[upAxis_Y.usda](./upAxis_Y.usda) + +```usda +upAxis = "Y" +``` + +![screenshot](screenshots/upAxis_Y_usdrecord_22.08.png) +_upAxis="Y" usdrecord 22.08_ + +## Z + +[upAxis_Z.usda](./upAxis_Z.usda) + +```usda +upAxis = "Z" +``` + +![screenshot](screenshots/upAxis_Z_usdrecord_22.08.png) +_upAxis="Z" usdrecord 22.08_ + +## Invalid + +[upAxis_invalid.usda](./upAxis_invalid.usda) + +```usda +upAxis = "invalid" +``` + +![screenshot](screenshots/upAxis_invalid_usdrecord_22.08.png) +_upAxis="invalid" usdrecord 22.08_ diff --git a/test_assets/foundation/stage_configuration/upAxis/screenshots/upAxis_X_usdrecord_22.08.png b/test_assets/foundation/stage_configuration/upAxis/screenshots/upAxis_X_usdrecord_22.08.png new file mode 100644 index 00000000..8b2e9dc1 Binary files /dev/null and b/test_assets/foundation/stage_configuration/upAxis/screenshots/upAxis_X_usdrecord_22.08.png differ diff --git a/test_assets/foundation/stage_configuration/upAxis/screenshots/upAxis_Y_usdrecord_22.08.png b/test_assets/foundation/stage_configuration/upAxis/screenshots/upAxis_Y_usdrecord_22.08.png new file mode 100644 index 00000000..6bf9d3f0 Binary files /dev/null and b/test_assets/foundation/stage_configuration/upAxis/screenshots/upAxis_Y_usdrecord_22.08.png differ diff --git a/test_assets/foundation/stage_configuration/upAxis/screenshots/upAxis_Z_usdrecord_22.08.png b/test_assets/foundation/stage_configuration/upAxis/screenshots/upAxis_Z_usdrecord_22.08.png new file mode 100644 index 00000000..8b2e9dc1 Binary files /dev/null and b/test_assets/foundation/stage_configuration/upAxis/screenshots/upAxis_Z_usdrecord_22.08.png differ diff --git a/test_assets/foundation/stage_configuration/upAxis/screenshots/upAxis_invalid_usdrecord_22.08.png b/test_assets/foundation/stage_configuration/upAxis/screenshots/upAxis_invalid_usdrecord_22.08.png new file mode 100644 index 00000000..8b2e9dc1 Binary files /dev/null and b/test_assets/foundation/stage_configuration/upAxis/screenshots/upAxis_invalid_usdrecord_22.08.png differ diff --git a/test_assets/foundation/stage_configuration/upAxis/upAxis_X.usda b/test_assets/foundation/stage_configuration/upAxis/upAxis_X.usda new file mode 100644 index 00000000..d9de0212 --- /dev/null +++ b/test_assets/foundation/stage_configuration/upAxis/upAxis_X.usda @@ -0,0 +1,11 @@ +#usda 1.0 +( + upAxis = "X" + subLayers = [ + @../../../_common/axis.usda@ + ] + + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) \ No newline at end of file diff --git a/test_assets/foundation/stage_configuration/upAxis/upAxis_Y.usda b/test_assets/foundation/stage_configuration/upAxis/upAxis_Y.usda new file mode 100644 index 00000000..3b37a7aa --- /dev/null +++ b/test_assets/foundation/stage_configuration/upAxis/upAxis_Y.usda @@ -0,0 +1,11 @@ +#usda 1.0 +( + upAxis = "Y" + subLayers = [ + @../../../_common/axis.usda@ + ] + + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) \ No newline at end of file diff --git a/test_assets/foundation/stage_configuration/upAxis/upAxis_Z.usda b/test_assets/foundation/stage_configuration/upAxis/upAxis_Z.usda new file mode 100644 index 00000000..ad0ec7b4 --- /dev/null +++ b/test_assets/foundation/stage_configuration/upAxis/upAxis_Z.usda @@ -0,0 +1,11 @@ +#usda 1.0 +( + upAxis = "Z" + subLayers = [ + @../../../_common/axis.usda@ + ] + + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) \ No newline at end of file diff --git a/test_assets/foundation/stage_configuration/upAxis/upAxis_invalid.usda b/test_assets/foundation/stage_configuration/upAxis/upAxis_invalid.usda new file mode 100644 index 00000000..80925290 --- /dev/null +++ b/test_assets/foundation/stage_configuration/upAxis/upAxis_invalid.usda @@ -0,0 +1,11 @@ +#usda 1.0 +( + upAxis = "invalid" + subLayers = [ + @../../../_common/axis.usda@ + ] + + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) \ No newline at end of file diff --git a/test_assets/schemaTests/usdGeom/extent/README.md b/test_assets/schemaTests/usdGeom/extent/README.md new file mode 100644 index 00000000..e1bf8651 --- /dev/null +++ b/test_assets/schemaTests/usdGeom/extent/README.md @@ -0,0 +1,80 @@ +# Extent + +These files showcase a regular mesh `extent` and the behavior of other `extent` values. + +All meshes are the same cube mesh with vertices positioned at `[-0.5 .. 0.5]` on all three axis. + +Schema specification: + +## Regular Extent + +[regular_extent.usda](./regular_extent.usda) + +Regular extent exactly matching the cube dimensions. + +```usda +float3[] extent = [(-0.5, -0.5, -0.5), (0.5, 0.5, 0.5)] +``` + +![screenshot](screenshots/regular_extent_usdrecord_22.08.png) +_regular_extent.usda, usdrecord 22.08_ + +## Inverse Extent + +[inverse_extent.usda](./inverse_extent.usda) + +This mesh has its extent values in the wrong order: + +```usda +float3[] extent = [(1,1,1), (0,0,0)] +``` + +![screenshot](screenshots/inverse_extent_usdrecord_22.08.png) +_inverse_extent.usda, usdrecord 22.08_ + +This screenshot is empty as expected. + +## No Extent + +[no_extent.usda](./no_extent.usda) + +This mesh has no extent. + +![screenshot](screenshots/no_extent_usdrecord_22.08.png) +_no_extent.usda, usdrecord 22.08_ + +## Scaled Extent + +[scaled_extent.usda](./scaled_extent.usda) + +These two meshes have scaled extents. + +Extent too small: + +```usda +float3[] extent = [(-0.1, -0.1, -0.1), (0.1, 0.1, 0.1)] +``` + +Extent too big: + +```usda +float3[] extent = [(-1, -1, -1), (1, 1, 1)] +``` + +![screenshot](screenshots/scaled_extent_usdrecord_22.08.png) +_scaled_extent.usda, usdrecord 22.08_ + +## Zero Extent + +[zero_extent.usda](./zero_extent.usda) + +This mesh has its extent set to zero. + +```usda +float3[] extent = [(0,0,0), (0,0,0)] +``` + +![screenshot](screenshots/zero_extent_usdrecord_22.08.png) +_zero_extent.usda, usdrecord 22.08_ + +This screenshot is empty as expected. diff --git a/test_assets/schemaTests/usdGeom/extent/inverse_extent.usda b/test_assets/schemaTests/usdGeom/extent/inverse_extent.usda new file mode 100644 index 00000000..e9f3418b --- /dev/null +++ b/test_assets/schemaTests/usdGeom/extent/inverse_extent.usda @@ -0,0 +1,15 @@ +#usda 1.0 +( + defaultPrim = "mesh" + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) + +def Mesh "mesh" +{ + int[] faceVertexCounts = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3] + int[] faceVertexIndices = [0, 4, 6, 0, 6, 2, 0, 1, 5, 0, 5, 4, 4, 5, 7, 4, 7, 6, 3, 7, 5, 3, 5, 1, 6, 7, 3, 6, 3, 2, 2, 3, 1, 2, 1, 0] + point3f[] points = [(-0.5, -0.5, -0.5), (0.5, -0.5, -0.5), (-0.5, 0.5, -0.5), (0.5, 0.5, -0.5), (-0.5, -0.5, 0.5), (0.5, -0.5, 0.5), (-0.5, 0.5, 0.5), (0.5, 0.5, 0.5)] + float3[] extent = [(1,1,1), (0,0,0)] +} \ No newline at end of file diff --git a/test_assets/schemaTests/usdGeom/extent/no_extent.usda b/test_assets/schemaTests/usdGeom/extent/no_extent.usda new file mode 100644 index 00000000..88cbcff7 --- /dev/null +++ b/test_assets/schemaTests/usdGeom/extent/no_extent.usda @@ -0,0 +1,14 @@ +#usda 1.0 +( + defaultPrim = "mesh" + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) + +def Mesh "mesh" +{ + int[] faceVertexCounts = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3] + int[] faceVertexIndices = [0, 4, 6, 0, 6, 2, 0, 1, 5, 0, 5, 4, 4, 5, 7, 4, 7, 6, 3, 7, 5, 3, 5, 1, 6, 7, 3, 6, 3, 2, 2, 3, 1, 2, 1, 0] + point3f[] points = [(-0.5, -0.5, -0.5), (0.5, -0.5, -0.5), (-0.5, 0.5, -0.5), (0.5, 0.5, -0.5), (-0.5, -0.5, 0.5), (0.5, -0.5, 0.5), (-0.5, 0.5, 0.5), (0.5, 0.5, 0.5)] +} \ No newline at end of file diff --git a/test_assets/schemaTests/usdGeom/extent/regular_extent.usda b/test_assets/schemaTests/usdGeom/extent/regular_extent.usda new file mode 100644 index 00000000..0b1d64b4 --- /dev/null +++ b/test_assets/schemaTests/usdGeom/extent/regular_extent.usda @@ -0,0 +1,15 @@ +#usda 1.0 +( + defaultPrim = "mesh" + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) + +def Mesh "mesh" +{ + int[] faceVertexCounts = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3] + int[] faceVertexIndices = [0, 4, 6, 0, 6, 2, 0, 1, 5, 0, 5, 4, 4, 5, 7, 4, 7, 6, 3, 7, 5, 3, 5, 1, 6, 7, 3, 6, 3, 2, 2, 3, 1, 2, 1, 0] + point3f[] points = [(-0.5, -0.5, -0.5), (0.5, -0.5, -0.5), (-0.5, 0.5, -0.5), (0.5, 0.5, -0.5), (-0.5, -0.5, 0.5), (0.5, -0.5, 0.5), (-0.5, 0.5, 0.5), (0.5, 0.5, 0.5)] + float3[] extent = [(-0.5, -0.5, -0.5), (0.5, 0.5, 0.5)] +} \ No newline at end of file diff --git a/test_assets/schemaTests/usdGeom/extent/scaled_extent.usda b/test_assets/schemaTests/usdGeom/extent/scaled_extent.usda new file mode 100644 index 00000000..cba739d4 --- /dev/null +++ b/test_assets/schemaTests/usdGeom/extent/scaled_extent.usda @@ -0,0 +1,29 @@ +#usda 1.0 +( + defaultPrim = "World" + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) + +def Scope "World" +{ + def Mesh "tooSmall" + { + int[] faceVertexCounts = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3] + int[] faceVertexIndices = [0, 4, 6, 0, 6, 2, 0, 1, 5, 0, 5, 4, 4, 5, 7, 4, 7, 6, 3, 7, 5, 3, 5, 1, 6, 7, 3, 6, 3, 2, 2, 3, 1, 2, 1, 0] + point3f[] points = [(-0.5, -0.5, -0.5), (0.5, -0.5, -0.5), (-0.5, 0.5, -0.5), (0.5, 0.5, -0.5), (-0.5, -0.5, 0.5), (0.5, -0.5, 0.5), (-0.5, 0.5, 0.5), (0.5, 0.5, 0.5)] + float3[] extent = [(-0.1, -0.1, -0.1), (0.1, 0.1, 0.1)] + } + + def Mesh "tooBig" + { + int[] faceVertexCounts = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3] + int[] faceVertexIndices = [0, 4, 6, 0, 6, 2, 0, 1, 5, 0, 5, 4, 4, 5, 7, 4, 7, 6, 3, 7, 5, 3, 5, 1, 6, 7, 3, 6, 3, 2, 2, 3, 1, 2, 1, 0] + point3f[] points = [(-0.5, -0.5, -0.5), (0.5, -0.5, -0.5), (-0.5, 0.5, -0.5), (0.5, 0.5, -0.5), (-0.5, -0.5, 0.5), (0.5, -0.5, 0.5), (-0.5, 0.5, 0.5), (0.5, 0.5, 0.5)] + float3[] extent = [(-1, -1, -1), (1, 1, 1)] + + double3 xformOp:translate = (3, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate"] + } +} \ No newline at end of file diff --git a/test_assets/schemaTests/usdGeom/extent/screenshots/inverse_extent_usdrecord_22.08.png b/test_assets/schemaTests/usdGeom/extent/screenshots/inverse_extent_usdrecord_22.08.png new file mode 100644 index 00000000..9ec80e24 Binary files /dev/null and b/test_assets/schemaTests/usdGeom/extent/screenshots/inverse_extent_usdrecord_22.08.png differ diff --git a/test_assets/schemaTests/usdGeom/extent/screenshots/no_extent_usdrecord_22.08.png b/test_assets/schemaTests/usdGeom/extent/screenshots/no_extent_usdrecord_22.08.png new file mode 100644 index 00000000..73fabfb8 Binary files /dev/null and b/test_assets/schemaTests/usdGeom/extent/screenshots/no_extent_usdrecord_22.08.png differ diff --git a/test_assets/schemaTests/usdGeom/extent/screenshots/regular_extent_usdrecord_22.08.png b/test_assets/schemaTests/usdGeom/extent/screenshots/regular_extent_usdrecord_22.08.png new file mode 100644 index 00000000..73fabfb8 Binary files /dev/null and b/test_assets/schemaTests/usdGeom/extent/screenshots/regular_extent_usdrecord_22.08.png differ diff --git a/test_assets/schemaTests/usdGeom/extent/screenshots/scaled_extent_usdrecord_22.08.png b/test_assets/schemaTests/usdGeom/extent/screenshots/scaled_extent_usdrecord_22.08.png new file mode 100644 index 00000000..75cc2701 Binary files /dev/null and b/test_assets/schemaTests/usdGeom/extent/screenshots/scaled_extent_usdrecord_22.08.png differ diff --git a/test_assets/schemaTests/usdGeom/extent/screenshots/zero_extent_usdrecord_22.08.png b/test_assets/schemaTests/usdGeom/extent/screenshots/zero_extent_usdrecord_22.08.png new file mode 100644 index 00000000..9ec80e24 Binary files /dev/null and b/test_assets/schemaTests/usdGeom/extent/screenshots/zero_extent_usdrecord_22.08.png differ diff --git a/test_assets/schemaTests/usdGeom/extent/zero_extent.usda b/test_assets/schemaTests/usdGeom/extent/zero_extent.usda new file mode 100644 index 00000000..fefeb5be --- /dev/null +++ b/test_assets/schemaTests/usdGeom/extent/zero_extent.usda @@ -0,0 +1,15 @@ +#usda 1.0 +( + defaultPrim = "mesh" + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) + +def Mesh "mesh" +{ + int[] faceVertexCounts = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3] + int[] faceVertexIndices = [0, 4, 6, 0, 6, 2, 0, 1, 5, 0, 5, 4, 4, 5, 7, 4, 7, 6, 3, 7, 5, 3, 5, 1, 6, 7, 3, 6, 3, 2, 2, 3, 1, 2, 1, 0] + point3f[] points = [(-0.5, -0.5, -0.5), (0.5, -0.5, -0.5), (-0.5, 0.5, -0.5), (0.5, 0.5, -0.5), (-0.5, -0.5, 0.5), (0.5, -0.5, 0.5), (-0.5, 0.5, 0.5), (0.5, 0.5, 0.5)] + float3[] extent = [(0,0,0), (0,0,0)] +} \ No newline at end of file diff --git a/test_assets/schemaTests/usdGeom/meshes/5_face/5_face.usda b/test_assets/schemaTests/usdGeom/meshes/5_face/5_face.usda new file mode 100644 index 00000000..21e761dc --- /dev/null +++ b/test_assets/schemaTests/usdGeom/meshes/5_face/5_face.usda @@ -0,0 +1,15 @@ +#usda 1.0 +( + defaultPrim = "mesh" + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) + +def Mesh "mesh" +{ + int[] faceVertexCounts = [4, 4, 4, 4, 4, 5] + int[] faceVertexIndices = [0, 4, 6, 2, 0, 1, 5, 4, 4, 5, 7, 6, 3, 7, 5, 1, 6, 7, 3, 2, 2, 3, 1, 0, 8] + point3f[] points = [(-0.5, -0.5, -0.5), (0.5, -0.5, -0.5), (-0.5, 0.5, -0.5), (0.5, 0.5, -0.5), (-0.5, -0.5, 0.5), (0.5, -0.5, 0.5), (-0.5, 0.5, 0.5), (0.5, 0.5, 0.5), (0.7, 0.7, 0.7)] + float3[] extent = [(-0.5, -0.5, -0.5), (0.7, 0.7, 0.7)] +} diff --git a/test_assets/schemaTests/usdGeom/meshes/5_face/README.md b/test_assets/schemaTests/usdGeom/meshes/5_face/README.md new file mode 100644 index 00000000..cbc3ad22 --- /dev/null +++ b/test_assets/schemaTests/usdGeom/meshes/5_face/README.md @@ -0,0 +1,16 @@ +# 5 Face + +## Screenshot + +![screenshot](screenshots/5_face_usdrecord_22.08.png) +_usdrecord 22.08_ + +## Description + +This is a mesh with one of the `faceVertexCounts` set to `5`. + +```usda +int[] faceVertexCounts = [4, 4, 4, 4, 4, 5] +``` + +Schema specification: diff --git a/test_assets/schemaTests/usdGeom/meshes/5_face/screenshots/5_face_usdrecord_22.08.png b/test_assets/schemaTests/usdGeom/meshes/5_face/screenshots/5_face_usdrecord_22.08.png new file mode 100644 index 00000000..bcc31994 Binary files /dev/null and b/test_assets/schemaTests/usdGeom/meshes/5_face/screenshots/5_face_usdrecord_22.08.png differ diff --git a/test_assets/schemaTests/usdGeom/meshes/doubleSided/README.md b/test_assets/schemaTests/usdGeom/meshes/doubleSided/README.md new file mode 100644 index 00000000..2b0e019a --- /dev/null +++ b/test_assets/schemaTests/usdGeom/meshes/doubleSided/README.md @@ -0,0 +1,12 @@ +# Double Sided Mesh + +## Screenshot + +![screenshot](screenshots/doubleSided_quad_usdrecord_22.08.png) +_usdrecord 22.08_ + +## Description + +These are two double sided meshes with `doubleSided = 1`. The same example is available with single sided meshes at [singleSided](../singleSided). + +Schema specification: diff --git a/test_assets/schemaTests/usdGeom/meshes/doubleSided/doubleSided_quad.usda b/test_assets/schemaTests/usdGeom/meshes/doubleSided/doubleSided_quad.usda new file mode 100644 index 00000000..36446716 --- /dev/null +++ b/test_assets/schemaTests/usdGeom/meshes/doubleSided/doubleSided_quad.usda @@ -0,0 +1,28 @@ +#usda 1.0 +( + defaultPrim = "World" + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) + +def Xform "World" +{ + def Mesh "Plane_0" { + uniform bool doubleSided = 1 + float2[] primvars:st = [(0, 0), (1, 0), (1, 1), (0, 1)] (interpolation = "vertex") + color3f[] primvars:displayColor = [(0.0, 0.0, 0.8)] + int[] faceVertexCounts = [4] + int[] faceVertexIndices = [0, 1, 2, 3] + point3f[] points = [(-2,-2,-2), (0, -2,-2), (0, 2, -2), (-2, 2, -2)] + } + + def Mesh "Plane_1" { + uniform bool doubleSided = 1 + float2[] primvars:st = [(0, 0), (1, 0), (1, 1), (0, 1)] (interpolation = "vertex") + color3f[] primvars:displayColor = [(0.8, 0.0, 0.0)] + int[] faceVertexCounts = [4] + int[] faceVertexIndices = [0, 1, 2, 3] + point3f[] points = [(0,-2,-2), (0, 2, -2), (2, 2, -2), (2, -2,-2)] + } +} \ No newline at end of file diff --git a/test_assets/schemaTests/usdGeom/meshes/doubleSided/screenshots/doubleSided_quad_usdrecord_22.08.png b/test_assets/schemaTests/usdGeom/meshes/doubleSided/screenshots/doubleSided_quad_usdrecord_22.08.png new file mode 100644 index 00000000..a0f6aee7 Binary files /dev/null and b/test_assets/schemaTests/usdGeom/meshes/doubleSided/screenshots/doubleSided_quad_usdrecord_22.08.png differ diff --git a/test_assets/schemaTests/usdGeom/meshes/empty_mesh/README.md b/test_assets/schemaTests/usdGeom/meshes/empty_mesh/README.md new file mode 100644 index 00000000..bd75c143 --- /dev/null +++ b/test_assets/schemaTests/usdGeom/meshes/empty_mesh/README.md @@ -0,0 +1,14 @@ +# Empty Mesh + +## Screenshot + +![screenshot](screenshots/empty_usdrecord_22.08.png) +_usdrecord 22.08_ + +This screenshot is empty as expected. + +## Description + +This is an example of an empty mesh without any set attributes. + +Schema specification: diff --git a/test_assets/schemaTests/usdGeom/meshes/empty_mesh/empty.usda b/test_assets/schemaTests/usdGeom/meshes/empty_mesh/empty.usda new file mode 100644 index 00000000..0da9568f --- /dev/null +++ b/test_assets/schemaTests/usdGeom/meshes/empty_mesh/empty.usda @@ -0,0 +1,11 @@ +#usda 1.0 +( + defaultPrim = "mesh" + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) + +def Mesh "mesh" +{ +} \ No newline at end of file diff --git a/test_assets/schemaTests/usdGeom/meshes/empty_mesh/screenshots/empty_usdrecord_22.08.png b/test_assets/schemaTests/usdGeom/meshes/empty_mesh/screenshots/empty_usdrecord_22.08.png new file mode 100644 index 00000000..9ec80e24 Binary files /dev/null and b/test_assets/schemaTests/usdGeom/meshes/empty_mesh/screenshots/empty_usdrecord_22.08.png differ diff --git a/test_assets/schemaTests/usdGeom/meshes/mixed_faceVertexCounts/README.md b/test_assets/schemaTests/usdGeom/meshes/mixed_faceVertexCounts/README.md new file mode 100644 index 00000000..e80b7015 --- /dev/null +++ b/test_assets/schemaTests/usdGeom/meshes/mixed_faceVertexCounts/README.md @@ -0,0 +1,18 @@ +# Mixed FaceVertexCounts + +## Screenshot + +![screenshot](screenshots/mixed_usdrecord_22.08.png) +_usdrecord 22.08_ + +## Description + +This cube mesh uses a mix of different `faceVertexCounts`: + +```usda +int[] faceVertexCounts = [4, 3, 3, ...] +``` + +Regular meshes can be found for at [quads](../quad_mesh/) and [triangles](../triangled_mesh/). + +Schema specification: diff --git a/test_assets/schemaTests/usdGeom/meshes/mixed_faceVertexCounts/mixed.usda b/test_assets/schemaTests/usdGeom/meshes/mixed_faceVertexCounts/mixed.usda new file mode 100644 index 00000000..6452e949 --- /dev/null +++ b/test_assets/schemaTests/usdGeom/meshes/mixed_faceVertexCounts/mixed.usda @@ -0,0 +1,15 @@ +#usda 1.0 +( + defaultPrim = "mesh" + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) + +def Mesh "mesh" +{ + int[] faceVertexCounts = [4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3] + int[] faceVertexIndices = [0, 4, 6, 2, 0, 1, 5, 0, 5, 4, 4, 5, 7, 4, 7, 6, 3, 7, 5, 3, 5, 1, 6, 7, 3, 6, 3, 2, 2, 3, 1, 2, 1, 0] + point3f[] points = [(-0.5, -0.5, -0.5), (0.5, -0.5, -0.5), (-0.5, 0.5, -0.5), (0.5, 0.5, -0.5), (-0.5, -0.5, 0.5), (0.5, -0.5, 0.5), (-0.5, 0.5, 0.5), (0.5, 0.5, 0.5)] + float3[] extent = [(-0.5, -0.5, -0.5), (0.5, 0.5, 0.5)] +} \ No newline at end of file diff --git a/test_assets/schemaTests/usdGeom/meshes/mixed_faceVertexCounts/screenshots/mixed_usdrecord_22.08.png b/test_assets/schemaTests/usdGeom/meshes/mixed_faceVertexCounts/screenshots/mixed_usdrecord_22.08.png new file mode 100644 index 00000000..63ef2477 Binary files /dev/null and b/test_assets/schemaTests/usdGeom/meshes/mixed_faceVertexCounts/screenshots/mixed_usdrecord_22.08.png differ diff --git a/test_assets/schemaTests/usdGeom/meshes/normals_types/README.md b/test_assets/schemaTests/usdGeom/meshes/normals_types/README.md new file mode 100644 index 00000000..3b30bb10 --- /dev/null +++ b/test_assets/schemaTests/usdGeom/meshes/normals_types/README.md @@ -0,0 +1,12 @@ +# Normals Types + +## Screenshot + +![screenshot](screenshots/normalsTypes_usdrecord_22.08.png) +_usdrecord 22.08_ + +## Description + +This set of meshes is using various different data types for the `normals` attribute to check the robustness of parsers. + +Schema specification: diff --git a/test_assets/schemaTests/usdGeom/meshes/normals_types/normalsTypes.usda b/test_assets/schemaTests/usdGeom/meshes/normals_types/normalsTypes.usda new file mode 100644 index 00000000..608b4ae1 --- /dev/null +++ b/test_assets/schemaTests/usdGeom/meshes/normals_types/normalsTypes.usda @@ -0,0 +1,246 @@ +#usda 1.0 +( + defaultPrim = "World" + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) + +def Scope "World" +{ + def Mesh "point3fArray" + { + float3[] extent = [(-0.5, -0.5, -0.5), (0.5, 0.5, 0.5)] + int[] faceVertexCounts = [4, 4, 4, 4, 4, 4] + int[] faceVertexIndices = [0, 1, 3, 2, 2, 3, 5, 4, 4, 5, 7, 6, 6, 7, 1, 0, 1, 7, 5, 3, 6, 0, 2, 4] + point3f[] normals = [(0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 1, 0), (0, 1, 0), (0, 1, 0), (0, 1, 0), (0, 0, -1), (0, 0, -1), (0, 0, -1), (0, 0, -1), (0, -1, 0), (0, -1, 0), (0, -1, 0), (0, -1, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (-1, 0, 0), (-1, 0, 0), (-1, 0, 0), (-1, 0, 0)] ( + interpolation = "faceVarying" + ) + point3f[] points = [(-0.5, -0.5, 0.5), (0.5, -0.5, 0.5), (-0.5, 0.5, 0.5), (0.5, 0.5, 0.5), (-0.5, 0.5, -0.5), (0.5, 0.5, -0.5), (-0.5, -0.5, -0.5), (0.5, -0.5, -0.5)] + color3f[] primvars:displayColor = [(0.8, 0, 0)] + + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate"] + } + + def Mesh "float3Array" + { + float3[] extent = [(-0.5, -0.5, -0.5), (0.5, 0.5, 0.5)] + int[] faceVertexCounts = [4, 4, 4, 4, 4, 4] + int[] faceVertexIndices = [0, 1, 3, 2, 2, 3, 5, 4, 4, 5, 7, 6, 6, 7, 1, 0, 1, 7, 5, 3, 6, 0, 2, 4] + float3[] normals = [(0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 1, 0), (0, 1, 0), (0, 1, 0), (0, 1, 0), (0, 0, -1), (0, 0, -1), (0, 0, -1), (0, 0, -1), (0, -1, 0), (0, -1, 0), (0, -1, 0), (0, -1, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (-1, 0, 0), (-1, 0, 0), (-1, 0, 0), (-1, 0, 0)] ( + interpolation = "faceVarying" + ) + point3f[] points = [(-0.5, -0.5, 0.5), (0.5, -0.5, 0.5), (-0.5, 0.5, 0.5), (0.5, 0.5, 0.5), (-0.5, 0.5, -0.5), (0.5, 0.5, -0.5), (-0.5, -0.5, -0.5), (0.5, -0.5, -0.5)] + color3f[] primvars:displayColor = [(0.8, 0, 0)] + + double3 xformOp:translate = (2, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate"] + } + + def Mesh "color3fArray" + { + float3[] extent = [(-0.5, -0.5, -0.5), (0.5, 0.5, 0.5)] + int[] faceVertexCounts = [4, 4, 4, 4, 4, 4] + int[] faceVertexIndices = [0, 1, 3, 2, 2, 3, 5, 4, 4, 5, 7, 6, 6, 7, 1, 0, 1, 7, 5, 3, 6, 0, 2, 4] + color3f[] normals = [(0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 1, 0), (0, 1, 0), (0, 1, 0), (0, 1, 0), (0, 0, -1), (0, 0, -1), (0, 0, -1), (0, 0, -1), (0, -1, 0), (0, -1, 0), (0, -1, 0), (0, -1, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (-1, 0, 0), (-1, 0, 0), (-1, 0, 0), (-1, 0, 0)] ( + interpolation = "faceVarying" + ) + point3f[] points = [(-0.5, -0.5, 0.5), (0.5, -0.5, 0.5), (-0.5, 0.5, 0.5), (0.5, 0.5, 0.5), (-0.5, 0.5, -0.5), (0.5, 0.5, -0.5), (-0.5, -0.5, -0.5), (0.5, -0.5, -0.5)] + color3f[] primvars:displayColor = [(0.8, 0, 0)] + + double3 xformOp:translate = (4, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate"] + } + + def Mesh "normal3fArray" + { + float3[] extent = [(-0.5, -0.5, -0.5), (0.5, 0.5, 0.5)] + int[] faceVertexCounts = [4, 4, 4, 4, 4, 4] + int[] faceVertexIndices = [0, 1, 3, 2, 2, 3, 5, 4, 4, 5, 7, 6, 6, 7, 1, 0, 1, 7, 5, 3, 6, 0, 2, 4] + normal3f[] normals = [(0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 1, 0), (0, 1, 0), (0, 1, 0), (0, 1, 0), (0, 0, -1), (0, 0, -1), (0, 0, -1), (0, 0, -1), (0, -1, 0), (0, -1, 0), (0, -1, 0), (0, -1, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (-1, 0, 0), (-1, 0, 0), (-1, 0, 0), (-1, 0, 0)] ( + interpolation = "faceVarying" + ) + point3f[] points = [(-0.5, -0.5, 0.5), (0.5, -0.5, 0.5), (-0.5, 0.5, 0.5), (0.5, 0.5, 0.5), (-0.5, 0.5, -0.5), (0.5, 0.5, -0.5), (-0.5, -0.5, -0.5), (0.5, -0.5, -0.5)] + color3f[] primvars:displayColor = [(0.8, 0, 0)] + + double3 xformOp:translate = (6, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate"] + } + + def Mesh "empty" + { + float3[] extent = [(-0.5, -0.5, -0.5), (0.5, 0.5, 0.5)] + int[] faceVertexCounts = [4, 4, 4, 4, 4, 4] + int[] faceVertexIndices = [0, 1, 3, 2, 2, 3, 5, 4, 4, 5, 7, 6, 6, 7, 1, 0, 1, 7, 5, 3, 6, 0, 2, 4] + point3f[] points = [(-0.5, -0.5, 0.5), (0.5, -0.5, 0.5), (-0.5, 0.5, 0.5), (0.5, 0.5, 0.5), (-0.5, 0.5, -0.5), (0.5, 0.5, -0.5), (-0.5, -0.5, -0.5), (0.5, -0.5, -0.5)] + color3f[] primvars:displayColor = [(0.8, 0, 0)] + + double3 xformOp:translate = (8, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate"] + } + + def Mesh "point3f" + { + float3[] extent = [(-0.5, -0.5, -0.5), (0.5, 0.5, 0.5)] + int[] faceVertexCounts = [4, 4, 4, 4, 4, 4] + int[] faceVertexIndices = [0, 1, 3, 2, 2, 3, 5, 4, 4, 5, 7, 6, 6, 7, 1, 0, 1, 7, 5, 3, 6, 0, 2, 4] + point3f normals = (0, 0, 1) + point3f[] points = [(-0.5, -0.5, 0.5), (0.5, -0.5, 0.5), (-0.5, 0.5, 0.5), (0.5, 0.5, 0.5), (-0.5, 0.5, -0.5), (0.5, 0.5, -0.5), (-0.5, -0.5, -0.5), (0.5, -0.5, -0.5)] + color3f[] primvars:displayColor = [(0.8, 0, 0)] + + double3 xformOp:translate = (10, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate"] + } + + def Mesh "float3" + { + float3[] extent = [(-0.5, -0.5, -0.5), (0.5, 0.5, 0.5)] + int[] faceVertexCounts = [4, 4, 4, 4, 4, 4] + int[] faceVertexIndices = [0, 1, 3, 2, 2, 3, 5, 4, 4, 5, 7, 6, 6, 7, 1, 0, 1, 7, 5, 3, 6, 0, 2, 4] + float3 normals = (0, 0, 1) + point3f[] points = [(-0.5, -0.5, 0.5), (0.5, -0.5, 0.5), (-0.5, 0.5, 0.5), (0.5, 0.5, 0.5), (-0.5, 0.5, -0.5), (0.5, 0.5, -0.5), (-0.5, -0.5, -0.5), (0.5, -0.5, -0.5)] + color3f[] primvars:displayColor = [(0.8, 0, 0)] + + double3 xformOp:translate = (12, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate"] + } + + def Mesh "color3f" + { + float3[] extent = [(-0.5, -0.5, -0.5), (0.5, 0.5, 0.5)] + int[] faceVertexCounts = [4, 4, 4, 4, 4, 4] + int[] faceVertexIndices = [0, 1, 3, 2, 2, 3, 5, 4, 4, 5, 7, 6, 6, 7, 1, 0, 1, 7, 5, 3, 6, 0, 2, 4] + color3f normals = (0, 0, 1) + point3f[] points = [(-0.5, -0.5, 0.5), (0.5, -0.5, 0.5), (-0.5, 0.5, 0.5), (0.5, 0.5, 0.5), (-0.5, 0.5, -0.5), (0.5, 0.5, -0.5), (-0.5, -0.5, -0.5), (0.5, -0.5, -0.5)] + color3f[] primvars:displayColor = [(0.8, 0, 0)] + + double3 xformOp:translate = (14, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate"] + } + + def Mesh "normal3f" + { + float3[] extent = [(-0.5, -0.5, -0.5), (0.5, 0.5, 0.5)] + int[] faceVertexCounts = [4, 4, 4, 4, 4, 4] + int[] faceVertexIndices = [0, 1, 3, 2, 2, 3, 5, 4, 4, 5, 7, 6, 6, 7, 1, 0, 1, 7, 5, 3, 6, 0, 2, 4] + normal3f normals = (0, 0, 1) + point3f[] points = [(-0.5, -0.5, 0.5), (0.5, -0.5, 0.5), (-0.5, 0.5, 0.5), (0.5, 0.5, 0.5), (-0.5, 0.5, -0.5), (0.5, 0.5, -0.5), (-0.5, -0.5, -0.5), (0.5, -0.5, -0.5)] + color3f[] primvars:displayColor = [(0.8, 0, 0)] + + double3 xformOp:translate = (16, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate"] + } + + def Mesh "int" + { + float3[] extent = [(-0.5, -0.5, -0.5), (0.5, 0.5, 0.5)] + int[] faceVertexCounts = [4, 4, 4, 4, 4, 4] + int[] faceVertexIndices = [0, 1, 3, 2, 2, 3, 5, 4, 4, 5, 7, 6, 6, 7, 1, 0, 1, 7, 5, 3, 6, 0, 2, 4] + int normals = 7 + point3f[] points = [(-0.5, -0.5, 0.5), (0.5, -0.5, 0.5), (-0.5, 0.5, 0.5), (0.5, 0.5, 0.5), (-0.5, 0.5, -0.5), (0.5, 0.5, -0.5), (-0.5, -0.5, -0.5), (0.5, -0.5, -0.5)] + color3f[] primvars:displayColor = [(0.8, 0, 0)] + + double3 xformOp:translate = (18, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate"] + } + + def Mesh "intArray" + { + float3[] extent = [(-0.5, -0.5, -0.5), (0.5, 0.5, 0.5)] + int[] faceVertexCounts = [4, 4, 4, 4, 4, 4] + int[] faceVertexIndices = [0, 1, 3, 2, 2, 3, 5, 4, 4, 5, 7, 6, 6, 7, 1, 0, 1, 7, 5, 3, 6, 0, 2, 4] + int[] normals = [0, 1, 3, 2, 2, 3, 5, 4, 4, 5, 7, 6, 6, 7, 1, 0, 1, 7, 5, 3, 6, 0, 2, 4] + point3f[] points = [(-0.5, -0.5, 0.5), (0.5, -0.5, 0.5), (-0.5, 0.5, 0.5), (0.5, 0.5, 0.5), (-0.5, 0.5, -0.5), (0.5, 0.5, -0.5), (-0.5, -0.5, -0.5), (0.5, -0.5, -0.5)] + color3f[] primvars:displayColor = [(0.8, 0, 0)] + + double3 xformOp:translate = (20, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate"] + } + + def Mesh "point3dArray" + { + float3[] extent = [(-0.5, -0.5, -0.5), (0.5, 0.5, 0.5)] + int[] faceVertexCounts = [4, 4, 4, 4, 4, 4] + int[] faceVertexIndices = [0, 1, 3, 2, 2, 3, 5, 4, 4, 5, 7, 6, 6, 7, 1, 0, 1, 7, 5, 3, 6, 0, 2, 4] + point3d[] normals = [(0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 1, 0), (0, 1, 0), (0, 1, 0), (0, 1, 0), (0, 0, -1), (0, 0, -1), (0, 0, -1), (0, 0, -1), (0, -1, 0), (0, -1, 0), (0, -1, 0), (0, -1, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (-1, 0, 0), (-1, 0, 0), (-1, 0, 0), (-1, 0, 0)] ( + interpolation = "faceVarying" + ) + point3f[] points = [(-0.5, -0.5, 0.5), (0.5, -0.5, 0.5), (-0.5, 0.5, 0.5), (0.5, 0.5, 0.5), (-0.5, 0.5, -0.5), (0.5, 0.5, -0.5), (-0.5, -0.5, -0.5), (0.5, -0.5, -0.5)] + color3f[] primvars:displayColor = [(0.8, 0, 0)] + + double3 xformOp:translate = (22, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate"] + } + + def Mesh "double3Array" + { + float3[] extent = [(-0.5, -0.5, -0.5), (0.5, 0.5, 0.5)] + int[] faceVertexCounts = [4, 4, 4, 4, 4, 4] + int[] faceVertexIndices = [0, 1, 3, 2, 2, 3, 5, 4, 4, 5, 7, 6, 6, 7, 1, 0, 1, 7, 5, 3, 6, 0, 2, 4] + double3[] normals = [(0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 1, 0), (0, 1, 0), (0, 1, 0), (0, 1, 0), (0, 0, -1), (0, 0, -1), (0, 0, -1), (0, 0, -1), (0, -1, 0), (0, -1, 0), (0, -1, 0), (0, -1, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (-1, 0, 0), (-1, 0, 0), (-1, 0, 0), (-1, 0, 0)] ( + interpolation = "faceVarying" + ) + point3f[] points = [(-0.5, -0.5, 0.5), (0.5, -0.5, 0.5), (-0.5, 0.5, 0.5), (0.5, 0.5, 0.5), (-0.5, 0.5, -0.5), (0.5, 0.5, -0.5), (-0.5, -0.5, -0.5), (0.5, -0.5, -0.5)] + color3f[] primvars:displayColor = [(0.8, 0, 0)] + + double3 xformOp:translate = (24, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate"] + } + + def Mesh "color3dArray" + { + float3[] extent = [(-0.5, -0.5, -0.5), (0.5, 0.5, 0.5)] + int[] faceVertexCounts = [4, 4, 4, 4, 4, 4] + int[] faceVertexIndices = [0, 1, 3, 2, 2, 3, 5, 4, 4, 5, 7, 6, 6, 7, 1, 0, 1, 7, 5, 3, 6, 0, 2, 4] + color3d[] normals = [(0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 1, 0), (0, 1, 0), (0, 1, 0), (0, 1, 0), (0, 0, -1), (0, 0, -1), (0, 0, -1), (0, 0, -1), (0, -1, 0), (0, -1, 0), (0, -1, 0), (0, -1, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (-1, 0, 0), (-1, 0, 0), (-1, 0, 0), (-1, 0, 0)] ( + interpolation = "faceVarying" + ) + point3f[] points = [(-0.5, -0.5, 0.5), (0.5, -0.5, 0.5), (-0.5, 0.5, 0.5), (0.5, 0.5, 0.5), (-0.5, 0.5, -0.5), (0.5, 0.5, -0.5), (-0.5, -0.5, -0.5), (0.5, -0.5, -0.5)] + color3f[] primvars:displayColor = [(0.8, 0, 0)] + + double3 xformOp:translate = (26, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate"] + } + + def Mesh "normal3dArray" + { + float3[] extent = [(-0.5, -0.5, -0.5), (0.5, 0.5, 0.5)] + int[] faceVertexCounts = [4, 4, 4, 4, 4, 4] + int[] faceVertexIndices = [0, 1, 3, 2, 2, 3, 5, 4, 4, 5, 7, 6, 6, 7, 1, 0, 1, 7, 5, 3, 6, 0, 2, 4] + normal3d[] normals = [(0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 1, 0), (0, 1, 0), (0, 1, 0), (0, 1, 0), (0, 0, -1), (0, 0, -1), (0, 0, -1), (0, 0, -1), (0, -1, 0), (0, -1, 0), (0, -1, 0), (0, -1, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0), (-1, 0, 0), (-1, 0, 0), (-1, 0, 0), (-1, 0, 0)] ( + interpolation = "faceVarying" + ) + point3f[] points = [(-0.5, -0.5, 0.5), (0.5, -0.5, 0.5), (-0.5, 0.5, 0.5), (0.5, 0.5, 0.5), (-0.5, 0.5, -0.5), (0.5, 0.5, -0.5), (-0.5, -0.5, -0.5), (0.5, -0.5, -0.5)] + color3f[] primvars:displayColor = [(0.8, 0, 0)] + + double3 xformOp:translate = (28, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate"] + } + + def Mesh "double" + { + float3[] extent = [(-0.5, -0.5, -0.5), (0.5, 0.5, 0.5)] + int[] faceVertexCounts = [4, 4, 4, 4, 4, 4] + int[] faceVertexIndices = [0, 1, 3, 2, 2, 3, 5, 4, 4, 5, 7, 6, 6, 7, 1, 0, 1, 7, 5, 3, 6, 0, 2, 4] + double normals = 7.0 + point3f[] points = [(-0.5, -0.5, 0.5), (0.5, -0.5, 0.5), (-0.5, 0.5, 0.5), (0.5, 0.5, 0.5), (-0.5, 0.5, -0.5), (0.5, 0.5, -0.5), (-0.5, -0.5, -0.5), (0.5, -0.5, -0.5)] + color3f[] primvars:displayColor = [(0.8, 0, 0)] + + double3 xformOp:translate = (30, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate"] + } + + def Mesh "doubleArray" + { + float3[] extent = [(-0.5, -0.5, -0.5), (0.5, 0.5, 0.5)] + int[] faceVertexCounts = [4, 4, 4, 4, 4, 4] + int[] faceVertexIndices = [0, 1, 3, 2, 2, 3, 5, 4, 4, 5, 7, 6, 6, 7, 1, 0, 1, 7, 5, 3, 6, 0, 2, 4] + double[] normals = [0.1, 1.1, 3.1, 2.1, 2.1, 3.1, 5.1, 4.1, 4.1, 5.1, 7.1, 6.1, 6.1, 7.1, 1.1, 0.1, 1.1, 7.1, 5.1, 3.1, 6.1, 0.1, 2.1, 4.1] + point3f[] points = [(-0.5, -0.5, 0.5), (0.5, -0.5, 0.5), (-0.5, 0.5, 0.5), (0.5, 0.5, 0.5), (-0.5, 0.5, -0.5), (0.5, 0.5, -0.5), (-0.5, -0.5, -0.5), (0.5, -0.5, -0.5)] + color3f[] primvars:displayColor = [(0.8, 0, 0)] + + double3 xformOp:translate = (32, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate"] + } +} \ No newline at end of file diff --git a/test_assets/schemaTests/usdGeom/meshes/normals_types/screenshots/normalsTypes_usdrecord_22.08.png b/test_assets/schemaTests/usdGeom/meshes/normals_types/screenshots/normalsTypes_usdrecord_22.08.png new file mode 100644 index 00000000..1b74f31f Binary files /dev/null and b/test_assets/schemaTests/usdGeom/meshes/normals_types/screenshots/normalsTypes_usdrecord_22.08.png differ diff --git a/test_assets/schemaTests/usdGeom/meshes/points_types/README.md b/test_assets/schemaTests/usdGeom/meshes/points_types/README.md new file mode 100644 index 00000000..9f9127f0 --- /dev/null +++ b/test_assets/schemaTests/usdGeom/meshes/points_types/README.md @@ -0,0 +1,12 @@ +# Points Types + +## Screenshot + +![screenshot](screenshots/pointsTypes_usdrecord_22.08.png) +_usdrecord 22.08_ + +## Description + +This set of meshes is using various different data types for the `points` attribute to check the robustness of parsers. + +Schema specification: diff --git a/test_assets/schemaTests/usdGeom/meshes/points_types/pointsTypes.usda b/test_assets/schemaTests/usdGeom/meshes/points_types/pointsTypes.usda new file mode 100644 index 00000000..fdaeaada --- /dev/null +++ b/test_assets/schemaTests/usdGeom/meshes/points_types/pointsTypes.usda @@ -0,0 +1,185 @@ +#usda 1.0 +( + defaultPrim = "World" + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) + +def Scope "World" +{ + def Mesh "point3fArray" + { + int[] faceVertexCounts = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3] + int[] faceVertexIndices = [0, 4, 6, 0, 6, 2, 0, 1, 5, 0, 5, 4, 4, 5, 7, 4, 7, 6, 3, 7, 5, 3, 5, 1, 6, 7, 3, 6, 3, 2, 2, 3, 1, 2, 1, 0] + point3f[] points = [(-0.5, -0.5, -0.5), (0.5, -0.5, -0.5), (-0.5, 0.5, -0.5), (0.5, 0.5, -0.5), (-0.5, -0.5, 0.5), (0.5, -0.5, 0.5), (-0.5, 0.5, 0.5), (0.5, 0.5, 0.5)] + float3[] extent = [(-0.5, -0.5, -0.5), (0.5, 0.5, 0.5)] + + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate"] + } + + def Mesh "float3Array" + { + int[] faceVertexCounts = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3] + int[] faceVertexIndices = [0, 4, 6, 0, 6, 2, 0, 1, 5, 0, 5, 4, 4, 5, 7, 4, 7, 6, 3, 7, 5, 3, 5, 1, 6, 7, 3, 6, 3, 2, 2, 3, 1, 2, 1, 0] + float3[] points = [(-0.5, -0.5, -0.5), (0.5, -0.5, -0.5), (-0.5, 0.5, -0.5), (0.5, 0.5, -0.5), (-0.5, -0.5, 0.5), (0.5, -0.5, 0.5), (-0.5, 0.5, 0.5), (0.5, 0.5, 0.5)] + float3[] extent = [(-0.5, -0.5, -0.5), (0.5, 0.5, 0.5)] + + double3 xformOp:translate = (2, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate"] + } + + def Mesh "color3fArray" + { + int[] faceVertexCounts = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3] + int[] faceVertexIndices = [0, 4, 6, 0, 6, 2, 0, 1, 5, 0, 5, 4, 4, 5, 7, 4, 7, 6, 3, 7, 5, 3, 5, 1, 6, 7, 3, 6, 3, 2, 2, 3, 1, 2, 1, 0] + color3f[] points = [(-0.5, -0.5, -0.5), (0.5, -0.5, -0.5), (-0.5, 0.5, -0.5), (0.5, 0.5, -0.5), (-0.5, -0.5, 0.5), (0.5, -0.5, 0.5), (-0.5, 0.5, 0.5), (0.5, 0.5, 0.5)] + float3[] extent = [(-0.5, -0.5, -0.5), (0.5, 0.5, 0.5)] + + double3 xformOp:translate = (4, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate"] + } + + def Mesh "normal3fArray" + { + int[] faceVertexCounts = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3] + int[] faceVertexIndices = [0, 4, 6, 0, 6, 2, 0, 1, 5, 0, 5, 4, 4, 5, 7, 4, 7, 6, 3, 7, 5, 3, 5, 1, 6, 7, 3, 6, 3, 2, 2, 3, 1, 2, 1, 0] + normal3f[] points = [(-0.5, -0.5, -0.5), (0.5, -0.5, -0.5), (-0.5, 0.5, -0.5), (0.5, 0.5, -0.5), (-0.5, -0.5, 0.5), (0.5, -0.5, 0.5), (-0.5, 0.5, 0.5), (0.5, 0.5, 0.5)] + float3[] extent = [(-0.5, -0.5, -0.5), (0.5, 0.5, 0.5)] + + double3 xformOp:translate = (6, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate"] + } + + def Mesh "intArray" + { + int[] faceVertexCounts = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3] + int[] faceVertexIndices = [0, 4, 6, 0, 6, 2, 0, 1, 5, 0, 5, 4, 4, 5, 7, 4, 7, 6, 3, 7, 5, 3, 5, 1, 6, 7, 3, 6, 3, 2, 2, 3, 1, 2, 1, 0] + int[] points = [0, 4, 6, 0, 6, 2, 0, 1, 5, 0, 5, 4, 4, 5, 7, 4, 7, 6, 3, 7, 5, 3, 5, 1, 6, 7, 3, 6, 3, 2, 2, 3, 1, 2, 1, 0] + float3[] extent = [(-0.5, -0.5, -0.5), (0.5, 0.5, 0.5)] + + double3 xformOp:translate = (8, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate"] + } + + def Mesh "point3f" + { + int[] faceVertexCounts = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3] + int[] faceVertexIndices = [0, 4, 6, 0, 6, 2, 0, 1, 5, 0, 5, 4, 4, 5, 7, 4, 7, 6, 3, 7, 5, 3, 5, 1, 6, 7, 3, 6, 3, 2, 2, 3, 1, 2, 1, 0] + point3f points = (-0.5, -0.5, -0.5) + float3[] extent = [(-0.5, -0.5, -0.5), (0.5, 0.5, 0.5)] + + double3 xformOp:translate = (10, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate"] + } + + def Mesh "float3" + { + int[] faceVertexCounts = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3] + int[] faceVertexIndices = [0, 4, 6, 0, 6, 2, 0, 1, 5, 0, 5, 4, 4, 5, 7, 4, 7, 6, 3, 7, 5, 3, 5, 1, 6, 7, 3, 6, 3, 2, 2, 3, 1, 2, 1, 0] + float3 points = (-0.5, -0.5, -0.5) + float3[] extent = [(-0.5, -0.5, -0.5), (0.5, 0.5, 0.5)] + + double3 xformOp:translate = (12, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate"] + } + + def Mesh "color3f" + { + int[] faceVertexCounts = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3] + int[] faceVertexIndices = [0, 4, 6, 0, 6, 2, 0, 1, 5, 0, 5, 4, 4, 5, 7, 4, 7, 6, 3, 7, 5, 3, 5, 1, 6, 7, 3, 6, 3, 2, 2, 3, 1, 2, 1, 0] + color3f points = (-0.5, -0.5, -0.5) + float3[] extent = [(-0.5, -0.5, -0.5), (0.5, 0.5, 0.5)] + + double3 xformOp:translate = (14, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate"] + } + + def Mesh "normal3f" + { + int[] faceVertexCounts = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3] + int[] faceVertexIndices = [0, 4, 6, 0, 6, 2, 0, 1, 5, 0, 5, 4, 4, 5, 7, 4, 7, 6, 3, 7, 5, 3, 5, 1, 6, 7, 3, 6, 3, 2, 2, 3, 1, 2, 1, 0] + normal3f points = (-0.5, -0.5, -0.5) + float3[] extent = [(-0.5, -0.5, -0.5), (0.5, 0.5, 0.5)] + + double3 xformOp:translate = (16, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate"] + } + + def Mesh "int" + { + int[] faceVertexCounts = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3] + int[] faceVertexIndices = [0, 4, 6, 0, 6, 2, 0, 1, 5, 0, 5, 4, 4, 5, 7, 4, 7, 6, 3, 7, 5, 3, 5, 1, 6, 7, 3, 6, 3, 2, 2, 3, 1, 2, 1, 0] + int points = 7 + float3[] extent = [(-0.5, -0.5, -0.5), (0.5, 0.5, 0.5)] + + double3 xformOp:translate = (18, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate"] + } + + def Mesh "empty" + { + int[] faceVertexCounts = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3] + int[] faceVertexIndices = [0, 4, 6, 0, 6, 2, 0, 1, 5, 0, 5, 4, 4, 5, 7, 4, 7, 6, 3, 7, 5, 3, 5, 1, 6, 7, 3, 6, 3, 2, 2, 3, 1, 2, 1, 0] + float3[] extent = [(-0.5, -0.5, -0.5), (0.5, 0.5, 0.5)] + + double3 xformOp:translate = (20, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate"] + } + + def Mesh "point3dArray" + { + int[] faceVertexCounts = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3] + int[] faceVertexIndices = [0, 4, 6, 0, 6, 2, 0, 1, 5, 0, 5, 4, 4, 5, 7, 4, 7, 6, 3, 7, 5, 3, 5, 1, 6, 7, 3, 6, 3, 2, 2, 3, 1, 2, 1, 0] + point3d[] points = [(-0.5, -0.5, -0.5), (0.5, -0.5, -0.5), (-0.5, 0.5, -0.5), (0.5, 0.5, -0.5), (-0.5, -0.5, 0.5), (0.5, -0.5, 0.5), (-0.5, 0.5, 0.5), (0.5, 0.5, 0.5)] + float3[] extent = [(-0.5, -0.5, -0.5), (0.5, 0.5, 0.5)] + + double3 xformOp:translate = (22, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate"] + } + + def Mesh "floatdArray" + { + int[] faceVertexCounts = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3] + int[] faceVertexIndices = [0, 4, 6, 0, 6, 2, 0, 1, 5, 0, 5, 4, 4, 5, 7, 4, 7, 6, 3, 7, 5, 3, 5, 1, 6, 7, 3, 6, 3, 2, 2, 3, 1, 2, 1, 0] + double3[] points = [(-0.5, -0.5, -0.5), (0.5, -0.5, -0.5), (-0.5, 0.5, -0.5), (0.5, 0.5, -0.5), (-0.5, -0.5, 0.5), (0.5, -0.5, 0.5), (-0.5, 0.5, 0.5), (0.5, 0.5, 0.5)] + float3[] extent = [(-0.5, -0.5, -0.5), (0.5, 0.5, 0.5)] + + double3 xformOp:translate = (24, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate"] + } + + def Mesh "color3dArray" + { + int[] faceVertexCounts = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3] + int[] faceVertexIndices = [0, 4, 6, 0, 6, 2, 0, 1, 5, 0, 5, 4, 4, 5, 7, 4, 7, 6, 3, 7, 5, 3, 5, 1, 6, 7, 3, 6, 3, 2, 2, 3, 1, 2, 1, 0] + color3d[] points = [(-0.5, -0.5, -0.5), (0.5, -0.5, -0.5), (-0.5, 0.5, -0.5), (0.5, 0.5, -0.5), (-0.5, -0.5, 0.5), (0.5, -0.5, 0.5), (-0.5, 0.5, 0.5), (0.5, 0.5, 0.5)] + float3[] extent = [(-0.5, -0.5, -0.5), (0.5, 0.5, 0.5)] + + double3 xformOp:translate = (26, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate"] + } + + def Mesh "normal3dArray" + { + int[] faceVertexCounts = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3] + int[] faceVertexIndices = [0, 4, 6, 0, 6, 2, 0, 1, 5, 0, 5, 4, 4, 5, 7, 4, 7, 6, 3, 7, 5, 3, 5, 1, 6, 7, 3, 6, 3, 2, 2, 3, 1, 2, 1, 0] + normal3d[] points = [(-0.5, -0.5, -0.5), (0.5, -0.5, -0.5), (-0.5, 0.5, -0.5), (0.5, 0.5, -0.5), (-0.5, -0.5, 0.5), (0.5, -0.5, 0.5), (-0.5, 0.5, 0.5), (0.5, 0.5, 0.5)] + float3[] extent = [(-0.5, -0.5, -0.5), (0.5, 0.5, 0.5)] + + double3 xformOp:translate = (28, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate"] + } + + def Mesh "doubleArray" + { + int[] faceVertexCounts = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3] + int[] faceVertexIndices = [0, 4, 6, 0, 6, 2, 0, 1, 5, 0, 5, 4, 4, 5, 7, 4, 7, 6, 3, 7, 5, 3, 5, 1, 6, 7, 3, 6, 3, 2, 2, 3, 1, 2, 1, 0] + double[] points = [0.1, 4.1, 6.1, 0.1, 6.1, 2.1, 0.1, 1.1, 5.1, 0.1, 5.1, 4.1, 4.1, 5.1, 7.1, 4.1, 7.1, 6.1, 3.1, 7.1, 5.1, 3.1, 5.1, 1.1, 6.1, 7.1, 3.1, 6.1, 3.1, 2.1, 2.1, 3.1, 1.1, 2.1, 1.1, 0.1] + float3[] extent = [(-0.5, -0.5, -0.5), (0.5, 0.5, 0.5)] + + double3 xformOp:translate = (30, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate"] + } +} diff --git a/test_assets/schemaTests/usdGeom/meshes/points_types/screenshots/pointsTypes_usdrecord_22.08.png b/test_assets/schemaTests/usdGeom/meshes/points_types/screenshots/pointsTypes_usdrecord_22.08.png new file mode 100644 index 00000000..0a75e11b Binary files /dev/null and b/test_assets/schemaTests/usdGeom/meshes/points_types/screenshots/pointsTypes_usdrecord_22.08.png differ diff --git a/test_assets/schemaTests/usdGeom/meshes/quad_mesh/README.md b/test_assets/schemaTests/usdGeom/meshes/quad_mesh/README.md new file mode 100644 index 00000000..fedbd8b7 --- /dev/null +++ b/test_assets/schemaTests/usdGeom/meshes/quad_mesh/README.md @@ -0,0 +1,18 @@ +# Quad Mesh + +## Screenshot + +![screenshot](screenshots/quad_usdrecord_22.08.png) +_usdrecord 22.08_ + +## Description + +This is a standard mesh using quad faces. + +```usda +int[] faceVertexCounts = [4, 4, 4, 4, 4, 4] +``` + +A corresponding triangular mesh is located [here](../triangled_mesh/). + +Schema specification: diff --git a/test_assets/schemaTests/usdGeom/meshes/quad_mesh/quads.usda b/test_assets/schemaTests/usdGeom/meshes/quad_mesh/quads.usda new file mode 100644 index 00000000..60c95276 --- /dev/null +++ b/test_assets/schemaTests/usdGeom/meshes/quad_mesh/quads.usda @@ -0,0 +1,15 @@ +#usda 1.0 +( + defaultPrim = "mesh" + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) + +def Mesh "mesh" +{ + int[] faceVertexCounts = [4, 4, 4, 4, 4, 4] + int[] faceVertexIndices = [0, 4, 6, 2, 0, 1, 5, 4, 4, 5, 7, 6, 3, 7, 5, 1, 6, 7, 3, 2, 2, 3, 1, 0] + point3f[] points = [(-0.5, -0.5, -0.5), (0.5, -0.5, -0.5), (-0.5, 0.5, -0.5), (0.5, 0.5, -0.5), (-0.5, -0.5, 0.5), (0.5, -0.5, 0.5), (-0.5, 0.5, 0.5), (0.5, 0.5, 0.5)] + float3[] extent = [(-0.5, -0.5, -0.5), (0.5, 0.5, 0.5)] +} \ No newline at end of file diff --git a/test_assets/schemaTests/usdGeom/meshes/quad_mesh/screenshots/quads_usdrecord_22.08.png b/test_assets/schemaTests/usdGeom/meshes/quad_mesh/screenshots/quads_usdrecord_22.08.png new file mode 100644 index 00000000..0ee9b616 Binary files /dev/null and b/test_assets/schemaTests/usdGeom/meshes/quad_mesh/screenshots/quads_usdrecord_22.08.png differ diff --git a/test_assets/schemaTests/usdGeom/meshes/singleSided/README.md b/test_assets/schemaTests/usdGeom/meshes/singleSided/README.md new file mode 100644 index 00000000..eafd462a --- /dev/null +++ b/test_assets/schemaTests/usdGeom/meshes/singleSided/README.md @@ -0,0 +1,12 @@ +# Single Sided Mesh + +## Screenshot + +![screenshot](screenshots/singleSided_usdrecord_22.08.png) +_usdrecord 22.08_ + +## Description + +These are two single sided meshes with `doubleSided = 0`. The same example is available with double sided meshes at [doubleSided](../doubleSided). + +Schema specification: diff --git a/test_assets/schemaTests/usdGeom/meshes/singleSided/screenshots/singleSided_usdrecord_22.08.png b/test_assets/schemaTests/usdGeom/meshes/singleSided/screenshots/singleSided_usdrecord_22.08.png new file mode 100644 index 00000000..bd1a93c9 Binary files /dev/null and b/test_assets/schemaTests/usdGeom/meshes/singleSided/screenshots/singleSided_usdrecord_22.08.png differ diff --git a/test_assets/schemaTests/usdGeom/meshes/singleSided/singleSided.usda b/test_assets/schemaTests/usdGeom/meshes/singleSided/singleSided.usda new file mode 100644 index 00000000..4ffac369 --- /dev/null +++ b/test_assets/schemaTests/usdGeom/meshes/singleSided/singleSided.usda @@ -0,0 +1,28 @@ +#usda 1.0 +( + defaultPrim = "World" + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) + +def Scope "World" +{ + def Mesh "Plane_0" { + uniform bool doubleSided = 0 + float2[] primvars:st = [(0, 0), (1, 0), (1, 1), (0, 1)] (interpolation = "vertex") + color3f[] primvars:displayColor = [(0.0, 0.0, 0.8)] + int[] faceVertexCounts = [4] + int[] faceVertexIndices = [0, 1, 2, 3] + point3f[] points = [(-2,-2,-2), (0, -2,-2), (0, 2, -2), (-2, 2, -2)] + } + + def Mesh "Plane_1" { + uniform bool doubleSided = 0 + float2[] primvars:st = [(0, 0), (1, 0), (1, 1), (0, 1)] (interpolation = "vertex") + color3f[] primvars:displayColor = [(0.8, 0.0, 0.0)] + int[] faceVertexCounts = [4] + int[] faceVertexIndices = [0, 1, 2, 3] + point3f[] points = [(0,-2,-2), (0, 2, -2), (2, 2, -2), (2, -2,-2)] + } +} \ No newline at end of file diff --git a/test_assets/schemaTests/usdGeom/meshes/subdiv_bilinear/README.md b/test_assets/schemaTests/usdGeom/meshes/subdiv_bilinear/README.md new file mode 100644 index 00000000..9a9efb28 --- /dev/null +++ b/test_assets/schemaTests/usdGeom/meshes/subdiv_bilinear/README.md @@ -0,0 +1,16 @@ +# Bilinear Subdivision + +## Screenshot + +![screenshot](screenshots/subdiv_bilinear_usdrecord_22.08.png) +_usdrecord 22.08_ + +## Description + +This mesh is using `bilinear` subdivision. + +```usda +uniform token subdivisionScheme = "bilinear" +``` + +Schema specification: diff --git a/test_assets/schemaTests/usdGeom/meshes/subdiv_bilinear/screenshots/subdiv_bilinear_usdrecord_22.08.png b/test_assets/schemaTests/usdGeom/meshes/subdiv_bilinear/screenshots/subdiv_bilinear_usdrecord_22.08.png new file mode 100644 index 00000000..bafdfa74 Binary files /dev/null and b/test_assets/schemaTests/usdGeom/meshes/subdiv_bilinear/screenshots/subdiv_bilinear_usdrecord_22.08.png differ diff --git a/test_assets/schemaTests/usdGeom/meshes/subdiv_bilinear/subdiv_bilinear.usda b/test_assets/schemaTests/usdGeom/meshes/subdiv_bilinear/subdiv_bilinear.usda new file mode 100644 index 00000000..53956e47 --- /dev/null +++ b/test_assets/schemaTests/usdGeom/meshes/subdiv_bilinear/subdiv_bilinear.usda @@ -0,0 +1,17 @@ +#usda 1.0 +( + defaultPrim = "mesh" + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) + +def Mesh "mesh" +{ + int[] faceVertexCounts = [4, 4, 4, 4, 4, 4] + int[] faceVertexIndices = [0, 4, 6, 2, 0, 1, 5, 4, 4, 5, 7, 6, 3, 7, 5, 1, 6, 7, 3, 2, 2, 3, 1, 0] + point3f[] points = [(-0.5, -0.5, -0.5), (0.5, -0.5, -0.5), (-0.5, 0.5, -0.5), (0.5, 0.5, -0.5), (-0.5, -0.5, 0.5), (0.5, -0.5, 0.5), (-0.5, 0.5, 0.5), (0.5, 0.5, 0.5)] + float3[] extent = [(-0.5, -0.5, -0.5), (0.5, 0.5, 0.5)] + uniform token subdivisionScheme = "bilinear" + +} diff --git a/test_assets/schemaTests/usdGeom/meshes/subdiv_catmullClark/README.md b/test_assets/schemaTests/usdGeom/meshes/subdiv_catmullClark/README.md new file mode 100644 index 00000000..64536e96 --- /dev/null +++ b/test_assets/schemaTests/usdGeom/meshes/subdiv_catmullClark/README.md @@ -0,0 +1,16 @@ +# CatmullClark Subdivision + +## Screenshot + +![screenshot](screenshots/subdiv_catmullClark_usdrecord_22.08.png) +_usdrecord 22.08_ + +## Description + +This mesh is using `catmullClark` subdivision. + +```usda +uniform token subdivisionScheme = "catmullClark" +``` + +Schema specification: diff --git a/test_assets/schemaTests/usdGeom/meshes/subdiv_catmullClark/screenshots/subdiv_catmullClark_usdrecord_22.08.png b/test_assets/schemaTests/usdGeom/meshes/subdiv_catmullClark/screenshots/subdiv_catmullClark_usdrecord_22.08.png new file mode 100644 index 00000000..0ee9b616 Binary files /dev/null and b/test_assets/schemaTests/usdGeom/meshes/subdiv_catmullClark/screenshots/subdiv_catmullClark_usdrecord_22.08.png differ diff --git a/test_assets/schemaTests/usdGeom/meshes/subdiv_catmullClark/subdiv_catmullClark.usda b/test_assets/schemaTests/usdGeom/meshes/subdiv_catmullClark/subdiv_catmullClark.usda new file mode 100644 index 00000000..367e872a --- /dev/null +++ b/test_assets/schemaTests/usdGeom/meshes/subdiv_catmullClark/subdiv_catmullClark.usda @@ -0,0 +1,16 @@ +#usda 1.0 +( + defaultPrim = "mesh" + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) + +def Mesh "mesh" +{ + int[] faceVertexCounts = [4, 4, 4, 4, 4, 4] + int[] faceVertexIndices = [0, 4, 6, 2, 0, 1, 5, 4, 4, 5, 7, 6, 3, 7, 5, 1, 6, 7, 3, 2, 2, 3, 1, 0] + point3f[] points = [(-0.5, -0.5, -0.5), (0.5, -0.5, -0.5), (-0.5, 0.5, -0.5), (0.5, 0.5, -0.5), (-0.5, -0.5, 0.5), (0.5, -0.5, 0.5), (-0.5, 0.5, 0.5), (0.5, 0.5, 0.5)] + float3[] extent = [(-0.5, -0.5, -0.5), (0.5, 0.5, 0.5)] + uniform token subdivisionScheme = "catmullClark" +} diff --git a/test_assets/schemaTests/usdGeom/meshes/subdiv_loop_quads/README.md b/test_assets/schemaTests/usdGeom/meshes/subdiv_loop_quads/README.md new file mode 100644 index 00000000..4ad330b4 --- /dev/null +++ b/test_assets/schemaTests/usdGeom/meshes/subdiv_loop_quads/README.md @@ -0,0 +1,16 @@ +# Loop Subdivision - Quads + +## Screenshot + +![screenshot](screenshots/subdiv_loop_quads_usdrecord_22.08.png) +_usdrecord 22.08_ + +## Description + +This quad mesh is using `loop` subdivision. + +```usda +uniform token subdivisionScheme = "loop" +``` + +Schema specification: diff --git a/test_assets/schemaTests/usdGeom/meshes/subdiv_loop_quads/screenshots/subdiv_loop_quads_usdrecord_22.08.png b/test_assets/schemaTests/usdGeom/meshes/subdiv_loop_quads/screenshots/subdiv_loop_quads_usdrecord_22.08.png new file mode 100644 index 00000000..0ee9b616 Binary files /dev/null and b/test_assets/schemaTests/usdGeom/meshes/subdiv_loop_quads/screenshots/subdiv_loop_quads_usdrecord_22.08.png differ diff --git a/test_assets/schemaTests/usdGeom/meshes/subdiv_loop_quads/subdiv_loop_quads.usda b/test_assets/schemaTests/usdGeom/meshes/subdiv_loop_quads/subdiv_loop_quads.usda new file mode 100644 index 00000000..dc68c123 --- /dev/null +++ b/test_assets/schemaTests/usdGeom/meshes/subdiv_loop_quads/subdiv_loop_quads.usda @@ -0,0 +1,16 @@ +#usda 1.0 +( + defaultPrim = "mesh" + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) + +def Mesh "mesh" +{ + int[] faceVertexCounts = [4, 4, 4, 4, 4, 4] + int[] faceVertexIndices = [0, 4, 6, 2, 0, 1, 5, 4, 4, 5, 7, 6, 3, 7, 5, 1, 6, 7, 3, 2, 2, 3, 1, 0] + point3f[] points = [(-0.5, -0.5, -0.5), (0.5, -0.5, -0.5), (-0.5, 0.5, -0.5), (0.5, 0.5, -0.5), (-0.5, -0.5, 0.5), (0.5, -0.5, 0.5), (-0.5, 0.5, 0.5), (0.5, 0.5, 0.5)] + float3[] extent = [(-0.5, -0.5, -0.5), (0.5, 0.5, 0.5)] + uniform token subdivisionScheme = "loop" +} \ No newline at end of file diff --git a/test_assets/schemaTests/usdGeom/meshes/subdiv_loop_triangles/README.md b/test_assets/schemaTests/usdGeom/meshes/subdiv_loop_triangles/README.md new file mode 100644 index 00000000..a8ecdd75 --- /dev/null +++ b/test_assets/schemaTests/usdGeom/meshes/subdiv_loop_triangles/README.md @@ -0,0 +1,16 @@ +# Loop Subdivision - Triangled + +## Screenshot + +![screenshot](screenshots/subdiv_loop_triangles_usdrecord_22.08.png) +_usdrecord 22.08_ + +## Description + +This triangled mesh is using `loop` subdivision. + +```usda +uniform token subdivisionScheme = "loop" +``` + +Schema specification: diff --git a/test_assets/schemaTests/usdGeom/meshes/subdiv_loop_triangles/screenshots/subdiv_loop_triangles_usdrecord_22.08.png b/test_assets/schemaTests/usdGeom/meshes/subdiv_loop_triangles/screenshots/subdiv_loop_triangles_usdrecord_22.08.png new file mode 100644 index 00000000..73fabfb8 Binary files /dev/null and b/test_assets/schemaTests/usdGeom/meshes/subdiv_loop_triangles/screenshots/subdiv_loop_triangles_usdrecord_22.08.png differ diff --git a/test_assets/schemaTests/usdGeom/meshes/subdiv_loop_triangles/subdiv_loop_triangles.usda b/test_assets/schemaTests/usdGeom/meshes/subdiv_loop_triangles/subdiv_loop_triangles.usda new file mode 100644 index 00000000..c7bf5622 --- /dev/null +++ b/test_assets/schemaTests/usdGeom/meshes/subdiv_loop_triangles/subdiv_loop_triangles.usda @@ -0,0 +1,16 @@ +#usda 1.0 +( + defaultPrim = "mesh" + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) + +def Mesh "mesh" +{ + int[] faceVertexCounts = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3] + int[] faceVertexIndices = [0, 4, 6, 0, 6, 2, 0, 1, 5, 0, 5, 4, 4, 5, 7, 4, 7, 6, 3, 7, 5, 3, 5, 1, 6, 7, 3, 6, 3, 2, 2, 3, 1, 2, 1, 0] + point3f[] points = [(-0.5, -0.5, -0.5), (0.5, -0.5, -0.5), (-0.5, 0.5, -0.5), (0.5, 0.5, -0.5), (-0.5, -0.5, 0.5), (0.5, -0.5, 0.5), (-0.5, 0.5, 0.5), (0.5, 0.5, 0.5)] + float3[] extent = [(-0.5, -0.5, -0.5), (0.5, 0.5, 0.5)] + uniform token subdivisionScheme = "loop" +} \ No newline at end of file diff --git a/test_assets/schemaTests/usdGeom/meshes/subdiv_none/README.md b/test_assets/schemaTests/usdGeom/meshes/subdiv_none/README.md new file mode 100644 index 00000000..f9b88b1b --- /dev/null +++ b/test_assets/schemaTests/usdGeom/meshes/subdiv_none/README.md @@ -0,0 +1,16 @@ +# Subdivision None + +## Screenshot + +![screenshot](screenshots/subdiv_none_usdrecord_22.08.png) +_usdrecord 22.08_ + +## Description + +This mesh is using `none` subdivision. + +```usda +uniform token subdivisionScheme = "none" +``` + +Schema specification: diff --git a/test_assets/schemaTests/usdGeom/meshes/subdiv_none/screenshots/subdiv_none_usdrecord_22.08.png b/test_assets/schemaTests/usdGeom/meshes/subdiv_none/screenshots/subdiv_none_usdrecord_22.08.png new file mode 100644 index 00000000..bafdfa74 Binary files /dev/null and b/test_assets/schemaTests/usdGeom/meshes/subdiv_none/screenshots/subdiv_none_usdrecord_22.08.png differ diff --git a/test_assets/schemaTests/usdGeom/meshes/subdiv_none/subdiv_none.usda b/test_assets/schemaTests/usdGeom/meshes/subdiv_none/subdiv_none.usda new file mode 100644 index 00000000..24baccd1 --- /dev/null +++ b/test_assets/schemaTests/usdGeom/meshes/subdiv_none/subdiv_none.usda @@ -0,0 +1,16 @@ +#usda 1.0 +( + defaultPrim = "mesh" + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) + +def Mesh "mesh" +{ + int[] faceVertexCounts = [4, 4, 4, 4, 4, 4] + int[] faceVertexIndices = [0, 4, 6, 2, 0, 1, 5, 4, 4, 5, 7, 6, 3, 7, 5, 1, 6, 7, 3, 2, 2, 3, 1, 0] + point3f[] points = [(-0.5, -0.5, -0.5), (0.5, -0.5, -0.5), (-0.5, 0.5, -0.5), (0.5, 0.5, -0.5), (-0.5, -0.5, 0.5), (0.5, -0.5, 0.5), (-0.5, 0.5, 0.5), (0.5, 0.5, 0.5)] + float3[] extent = [(-0.5, -0.5, -0.5), (0.5, 0.5, 0.5)] + uniform token subdivisionScheme = "none" +} diff --git a/test_assets/schemaTests/usdGeom/meshes/triangled_mesh/README.md b/test_assets/schemaTests/usdGeom/meshes/triangled_mesh/README.md new file mode 100644 index 00000000..a44d66af --- /dev/null +++ b/test_assets/schemaTests/usdGeom/meshes/triangled_mesh/README.md @@ -0,0 +1,18 @@ +# Triangled Mesh + +## Screenshot + +![screenshot](screenshots/triangles_usdrecord_22.08.png) +_usdrecord 22.08_ + +## Description + +This is a standard mesh using triangular faces. + +```usda +int[] faceVertexCounts = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3] +``` + +A corresponding quad mesh is located [here](../quad_mesh/). + +Schema specification: diff --git a/test_assets/schemaTests/usdGeom/meshes/triangled_mesh/screenshots/triangles_usdrecord_22.08.png b/test_assets/schemaTests/usdGeom/meshes/triangled_mesh/screenshots/triangles_usdrecord_22.08.png new file mode 100644 index 00000000..73fabfb8 Binary files /dev/null and b/test_assets/schemaTests/usdGeom/meshes/triangled_mesh/screenshots/triangles_usdrecord_22.08.png differ diff --git a/test_assets/schemaTests/usdGeom/meshes/triangled_mesh/triangles.usda b/test_assets/schemaTests/usdGeom/meshes/triangled_mesh/triangles.usda new file mode 100644 index 00000000..0b1d64b4 --- /dev/null +++ b/test_assets/schemaTests/usdGeom/meshes/triangled_mesh/triangles.usda @@ -0,0 +1,15 @@ +#usda 1.0 +( + defaultPrim = "mesh" + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) + +def Mesh "mesh" +{ + int[] faceVertexCounts = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3] + int[] faceVertexIndices = [0, 4, 6, 0, 6, 2, 0, 1, 5, 0, 5, 4, 4, 5, 7, 4, 7, 6, 3, 7, 5, 3, 5, 1, 6, 7, 3, 6, 3, 2, 2, 3, 1, 2, 1, 0] + point3f[] points = [(-0.5, -0.5, -0.5), (0.5, -0.5, -0.5), (-0.5, 0.5, -0.5), (0.5, 0.5, -0.5), (-0.5, -0.5, 0.5), (0.5, -0.5, 0.5), (-0.5, 0.5, 0.5), (0.5, 0.5, 0.5)] + float3[] extent = [(-0.5, -0.5, -0.5), (0.5, 0.5, 0.5)] +} \ No newline at end of file diff --git a/test_assets/schemaTests/usdGeom/primitives/README.md b/test_assets/schemaTests/usdGeom/primitives/README.md new file mode 100644 index 00000000..29181360 --- /dev/null +++ b/test_assets/schemaTests/usdGeom/primitives/README.md @@ -0,0 +1,59 @@ +# Primitives + +These files show all available mesh primitives. + +Schema specification: + +## Capsule + +[capsule.usda](./capsule.usda) + +This file shows an example of the `Capsule` primitive. + +![screenshot](screenshots/capsule_usdrecord_22.08.png) +_capsule.usda, usdrecord 22.08_ + +## Cone + +[cone.usda](./cone.usda) + +This file shows an example of the `Cone` primitive. + +![screenshot](screenshots/cone_usdrecord_22.08.png) +_cone.usda, usdrecord 22.08_ + +## Cube + +[cube.usda](./cube.usda) + +This file shows an example of the `Cube` primitive. + +![screenshot](screenshots/cube_usdrecord_22.08.png) +_cube.usda, usdrecord 22.08_ + +## Cylinder + +[cylinder.usda](./cylinder.usda) + +This file shows an example of the `Cylinder` primitive. + +![screenshot](screenshots/cylinder_usdrecord_22.08.png) +_cylinder.usda, usdrecord 22.08_ + +## Sphere + +[sphere.usda](./sphere.usda) + +This file shows an example of the `Sphere` primitive. + +![screenshot](screenshots/sphere_usdrecord_22.08.png) +_sphere.usda, usdrecord 22.08_ + +## All Primitives + +[all_primitives.usda](./all_primitives.usda) + +This files includes all of the above primivites. + +![screenshot](screenshots/all_primitives_usdrecord_22.08.png) +_all_primitives.usda, usdrecord 22.08_ diff --git a/test_assets/schemaTests/usdGeom/primitives/all_primitives.usda b/test_assets/schemaTests/usdGeom/primitives/all_primitives.usda new file mode 100644 index 00000000..e4667c0b --- /dev/null +++ b/test_assets/schemaTests/usdGeom/primitives/all_primitives.usda @@ -0,0 +1,61 @@ +#usda 1.0 +( + defaultPrim = "World" + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) + +def Scope "World" +{ + def Capsule "Capsule" + { + double height = 1.0 + double radius = 0.5 + uniform token axis = "Z" + float3[] extent = [(-0.5, -0.5, -1.0), (0.5, 0.5, 1.0)] + + double3 xformOp:translate = (0, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate"] + } + + def Cone "Cone" + { + double height = 2.0 + double radius = 1.0 + uniform token axis = "Z" + float3[] extent = [(-1.0, -1.0, -1.0), (1.0, 1.0, 1.0)] + + double3 xformOp:translate = (2, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate"] + } + + def Cube "Cube" + { + double size = 2.0 + float3[] extent = [(-1.0, -1.0, -1.0), (1.0, 1.0, 1.0)] + + double3 xformOp:translate = (4, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate"] + } + + def Cylinder "Cylinder" + { + double height = 2.0 + double radius = 1.0 + uniform token axis = "Z" + float3[] extent = [(-1.0, -1.0, -1.0), (1.0, 1.0, 1.0)] + + double3 xformOp:translate = (6, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate"] + } + + def Sphere "Sphere" + { + double radius = 1.0 + float3[] extent = [(-1.0, -1.0, -1.0), (1.0, 1.0, 1.0)] + + double3 xformOp:translate = (8, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate"] + } +} \ No newline at end of file diff --git a/test_assets/schemaTests/usdGeom/primitives/capsule.usda b/test_assets/schemaTests/usdGeom/primitives/capsule.usda new file mode 100644 index 00000000..8d541efc --- /dev/null +++ b/test_assets/schemaTests/usdGeom/primitives/capsule.usda @@ -0,0 +1,14 @@ +#usda 1.0 +( + defaultPrim = "Capsule" + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) + +def Capsule "Capsule" +{ + double height = 1.0 + double radius = 0.5 + uniform token axis = "Z" +} \ No newline at end of file diff --git a/test_assets/schemaTests/usdGeom/primitives/cone.usda b/test_assets/schemaTests/usdGeom/primitives/cone.usda new file mode 100644 index 00000000..70531fb7 --- /dev/null +++ b/test_assets/schemaTests/usdGeom/primitives/cone.usda @@ -0,0 +1,15 @@ +#usda 1.0 +( + defaultPrim = "Cone" + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) + +def Cone "Cone" +{ + double height = 2.0 + double radius = 1.0 + uniform token axis = "Z" + float3[] extent = [(-1.0, -1.0, -1.0), (1.0, 1.0, 1.0)] +} \ No newline at end of file diff --git a/test_assets/schemaTests/usdGeom/primitives/cube.usda b/test_assets/schemaTests/usdGeom/primitives/cube.usda new file mode 100644 index 00000000..8f9371ff --- /dev/null +++ b/test_assets/schemaTests/usdGeom/primitives/cube.usda @@ -0,0 +1,13 @@ +#usda 1.0 +( + defaultPrim = "Cube" + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) + +def Cube "Cube" +{ + double size = 2.0 + float3[] extent = [(-1.0, -1.0, -1.0), (1.0, 1.0, 1.0)] +} \ No newline at end of file diff --git a/test_assets/schemaTests/usdGeom/primitives/cylinder.usda b/test_assets/schemaTests/usdGeom/primitives/cylinder.usda new file mode 100644 index 00000000..278ca4a1 --- /dev/null +++ b/test_assets/schemaTests/usdGeom/primitives/cylinder.usda @@ -0,0 +1,15 @@ +#usda 1.0 +( + defaultPrim = "Cylinder" + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) + +def Cylinder "Cylinder" +{ + double height = 2.0 + double radius = 1.0 + uniform token axis = "Z" + float3[] extent = [(-1.0, -1.0, -1.0), (1.0, 1.0, 1.0)] +} \ No newline at end of file diff --git a/test_assets/schemaTests/usdGeom/primitives/screenshots/all_primitives_usdrecord_22.08.png b/test_assets/schemaTests/usdGeom/primitives/screenshots/all_primitives_usdrecord_22.08.png new file mode 100644 index 00000000..df3f6708 Binary files /dev/null and b/test_assets/schemaTests/usdGeom/primitives/screenshots/all_primitives_usdrecord_22.08.png differ diff --git a/test_assets/schemaTests/usdGeom/primitives/screenshots/capsule_usdrecord_22.08.png b/test_assets/schemaTests/usdGeom/primitives/screenshots/capsule_usdrecord_22.08.png new file mode 100644 index 00000000..08ef3871 Binary files /dev/null and b/test_assets/schemaTests/usdGeom/primitives/screenshots/capsule_usdrecord_22.08.png differ diff --git a/test_assets/schemaTests/usdGeom/primitives/screenshots/cone_usdrecord_22.08.png b/test_assets/schemaTests/usdGeom/primitives/screenshots/cone_usdrecord_22.08.png new file mode 100644 index 00000000..25338599 Binary files /dev/null and b/test_assets/schemaTests/usdGeom/primitives/screenshots/cone_usdrecord_22.08.png differ diff --git a/test_assets/schemaTests/usdGeom/primitives/screenshots/cube_usdrecord_22.08.png b/test_assets/schemaTests/usdGeom/primitives/screenshots/cube_usdrecord_22.08.png new file mode 100644 index 00000000..bafdfa74 Binary files /dev/null and b/test_assets/schemaTests/usdGeom/primitives/screenshots/cube_usdrecord_22.08.png differ diff --git a/test_assets/schemaTests/usdGeom/primitives/screenshots/cylinder_usdrecord_22.08.png b/test_assets/schemaTests/usdGeom/primitives/screenshots/cylinder_usdrecord_22.08.png new file mode 100644 index 00000000..13c501e5 Binary files /dev/null and b/test_assets/schemaTests/usdGeom/primitives/screenshots/cylinder_usdrecord_22.08.png differ diff --git a/test_assets/schemaTests/usdGeom/primitives/screenshots/sphere_usdrecord_22.08.png b/test_assets/schemaTests/usdGeom/primitives/screenshots/sphere_usdrecord_22.08.png new file mode 100644 index 00000000..f3e565d3 Binary files /dev/null and b/test_assets/schemaTests/usdGeom/primitives/screenshots/sphere_usdrecord_22.08.png differ diff --git a/test_assets/schemaTests/usdGeom/primitives/sphere.usda b/test_assets/schemaTests/usdGeom/primitives/sphere.usda new file mode 100644 index 00000000..baddbcbc --- /dev/null +++ b/test_assets/schemaTests/usdGeom/primitives/sphere.usda @@ -0,0 +1,13 @@ +#usda 1.0 +( + defaultPrim = "Sphere" + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) + +def Sphere "Sphere" +{ + double radius = 1.0 + float3[] extent = [(-1.0, -1.0, -1.0), (1.0, 1.0, 1.0)] +} \ No newline at end of file diff --git a/test_assets/schemaTests/usdGeom/transforms/README.md b/test_assets/schemaTests/usdGeom/transforms/README.md new file mode 100644 index 00000000..2e9940ab --- /dev/null +++ b/test_assets/schemaTests/usdGeom/transforms/README.md @@ -0,0 +1,93 @@ +# Transforms + +These files showcase different transform operations. + +Schema specification: + +## Simple Transform + +[simple_transform.usda](./simple_transform.usda) + +This file shows an example of a mesh with a simple, common stack of transform operations. + +```usda +uniform token[] xformOpOrder = [ + "xformOp:translate", + "xformOp:rotateXYZ", + "xformOp:scale" +] +``` + +![screenshot](screenshots/simple_transform_usdrecord_22.08.png) +_simple_transform.usda, usdrecord 22.08_ + +## Complex Transform + +[complex_transform.usda](./complex_transform.usda) + +This file shows an example of a mesh with a complex stack of transform operations. + +```usda +uniform token[] xformOpOrder = [ + "xformOp:translate", + "xformOp:translate:rotatePivotOffset", + "xformOp:translate:rotatePivot", + "xformOp:rotateXYZ:rotateOffset", + "xformOp:rotateXYZ", + "!invert!xformOp:translate:rotatePivot", + "xformOp:translate:scalePivotOffset", + "xformOp:translate:scalePivot", + "xformOp:transform:shear", + "xformOp:scale:scaleOffset", + "xformOp:scale", + "!invert!xformOp:translate:scalePivot" +] +``` + +![screenshot](screenshots/complex_transform_usdrecord_22.08.png) +_complex_transform.usda, usdrecord 22.08_ + +## Matrix Transform + +[matrix_transform.usda](./matrix_transform.usda) + +This file shows an example of a mesh with a matrix transform. + +```usda +uniform token[] xformOpOrder = ["xformOp:transform"] +``` + +![screenshot](screenshots/matrix_transform_usdrecord_22.08.png) +_matrix_transform.usda, usdrecord 22.08_ + +## Weird Matrix Transform + +[weird_matrix_transform.usda](./weird_matrix_transform.usda) + +This file shows an example of a mesh with a matrix transform with weird, nonsensible values. + +```usda +custom Matrix4d xformOp:transform = ((1, 2, 3, 4), (5, 6, 7, 8), (9, 10, 11, 12), (13, 14, 15, 1)) +uniform token[] xformOpOrder = ["xformOp:transform"] +``` + +![screenshot](screenshots/weird_matrix_transform_usdrecord_22.08.png) +_weird_matrix_transform.usda, usdrecord 22.08_ + +## Nested Xforms + +[xforms_nested.usda](./xforms_nested.usda) + +This file uses nestes `Xforms` to verify that transform operations are correctly applied in order. + +![screenshot](screenshots/xforms_nested_usdrecord_22.08.png) +_xforms_nested.usda, usdrecord 22.08_ + +## Nested Scopes and Xforms + +[scopes_and_xforms_nested.usda](./scopes_and_xforms_nested.usda) + +This file uses nestes `Scopes` and `Xforms` to verify that transform operations are correctly applied in order and that a mix of `Scopes` and `Xforms` doesn't cause issues. + +![screenshot](screenshots/scopes_and_xforms_nested_usdrecord_22.08.png) +_scopes_and_xforms_nested.usda, usdrecord 22.08_ diff --git a/test_assets/schemaTests/usdGeom/transforms/complex_transform.usda b/test_assets/schemaTests/usdGeom/transforms/complex_transform.usda new file mode 100644 index 00000000..91220d96 --- /dev/null +++ b/test_assets/schemaTests/usdGeom/transforms/complex_transform.usda @@ -0,0 +1,32 @@ +#usda 1.0 +( + defaultPrim = "World" + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) + +def Scope "World" +{ + over "axis" (references = [@../../../_common/axis.usda@]){} + + def Mesh "mesh" + { + double3 xformOp:translate = (1, 2, 3) + float3 xformOp:translate:rotatePivotOffset = (4, 5, 6) + float3 xformOp:translate:rotatePivot = (7, 8, 9) + float3 xformOp:rotateXYZ:rotateOffset = (10, 11, 12) + float3 xformOp:rotateXYZ = (110, 120, 130) + float3 xformOp:translate:scalePivotOffset = (1, 2, 3) + float3 xformOp:translate:scalePivot = (4, 5, 6) + Matrix4d xformOp:transform:shear = ((1, 0.5, 0,0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 0, 0, 1)) + float3 xformOp:scale:scaleOffset = (7, 8, 9) + float3 xformOp:scale = (0.1, 0.2, 0.3) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:translate:rotatePivotOffset", "xformOp:translate:rotatePivot", "xformOp:rotateXYZ:rotateOffset", "xformOp:rotateXYZ", "!invert!xformOp:translate:rotatePivot", "xformOp:translate:scalePivotOffset", "xformOp:translate:scalePivot", "xformOp:transform:shear", "xformOp:scale:scaleOffset", "xformOp:scale", "!invert!xformOp:translate:scalePivot"] + + int[] faceVertexCounts = [4, 4, 4, 4, 4, 4] + int[] faceVertexIndices = [0, 4, 6, 2, 0, 1, 5, 4, 4, 5, 7, 6, 3, 7, 5, 1, 6, 7, 3, 2, 2, 3, 1, 0] + point3f[] points = [(-0.5, -0.5, -0.5), (0.5, -0.5, -0.5), (-0.5, 0.5, -0.5), (0.5, 0.5, -0.5), (-0.5, -0.5, 0.5), (0.5, -0.5, 0.5), (-0.5, 0.5, 0.5), (0.5, 0.5, 0.5)] + float3[] extent = [(-0.5, -0.5, -0.5), (0.5, 0.5, 0.5)] + } +} \ No newline at end of file diff --git a/test_assets/schemaTests/usdGeom/transforms/matrix_transform.usda b/test_assets/schemaTests/usdGeom/transforms/matrix_transform.usda new file mode 100644 index 00000000..8875ccd0 --- /dev/null +++ b/test_assets/schemaTests/usdGeom/transforms/matrix_transform.usda @@ -0,0 +1,22 @@ +#usda 1.0 +( + defaultPrim = "World" + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) + +def Scope "World" +{ + over "axis" (references = [@../../../_common/axis.usda@]){} + + def Mesh "mesh" + { + custom Matrix4d xformOp:transform = ((0, 0.5, -0.8660254037844386, 0), (-1.7320508075688772, 0.8660254037844388, 0.5, 0), (1.5, 2.25, 1.2990381056766584, 0), (4, 5, 6, 1)) + uniform token[] xformOpOrder = ["xformOp:transform"] + + int[] faceVertexCounts = [4, 4, 4, 4, 4, 4] + int[] faceVertexIndices = [0, 4, 6, 2, 0, 1, 5, 4, 4, 5, 7, 6, 3, 7, 5, 1, 6, 7, 3, 2, 2, 3, 1, 0] + point3f[] points = [(-0.5, -0.5, -0.5), (0.5, -0.5, -0.5), (-0.5, 0.5, -0.5), (0.5, 0.5, -0.5), (-0.5, -0.5, 0.5), (0.5, -0.5, 0.5), (-0.5, 0.5, 0.5), (0.5, 0.5, 0.5)] + } +} \ No newline at end of file diff --git a/test_assets/schemaTests/usdGeom/transforms/scopes_and_xforms_nested.usda b/test_assets/schemaTests/usdGeom/transforms/scopes_and_xforms_nested.usda new file mode 100644 index 00000000..8da16a02 --- /dev/null +++ b/test_assets/schemaTests/usdGeom/transforms/scopes_and_xforms_nested.usda @@ -0,0 +1,36 @@ +#usda 1.0 +( + defaultPrim = "World" + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) + +def Scope "World" +{ + over "axis" (references = [@../../../_common/axis.usda@]){} + + def Xform "A" + { + double3 xformOp:translate = (1, 2, 3) + uniform token[] xformOpOrder = ["xformOp:translate"] + + def Scope "B" + { + def Xform "C" + { + double3 xformOp:translate = (3, 3, 3) + uniform token[] xformOpOrder = ["xformOp:translate"] + + def Cube "D" {} + } + } + } + + def Cube "cube" + { + double3 xformOp:translate = (1, 1, 1) + uniform token[] xformOpOrder = ["xformOp:translate"] + } +} + diff --git a/test_assets/schemaTests/usdGeom/transforms/screenshots/complex_transform_usdrecord_22.08.png b/test_assets/schemaTests/usdGeom/transforms/screenshots/complex_transform_usdrecord_22.08.png new file mode 100644 index 00000000..667d1340 Binary files /dev/null and b/test_assets/schemaTests/usdGeom/transforms/screenshots/complex_transform_usdrecord_22.08.png differ diff --git a/test_assets/schemaTests/usdGeom/transforms/screenshots/matrix_transform_usdrecord_22.08.png b/test_assets/schemaTests/usdGeom/transforms/screenshots/matrix_transform_usdrecord_22.08.png new file mode 100644 index 00000000..789f63a8 Binary files /dev/null and b/test_assets/schemaTests/usdGeom/transforms/screenshots/matrix_transform_usdrecord_22.08.png differ diff --git a/test_assets/schemaTests/usdGeom/transforms/screenshots/scopes_and_xforms_nested_usdrecord_22.08.png b/test_assets/schemaTests/usdGeom/transforms/screenshots/scopes_and_xforms_nested_usdrecord_22.08.png new file mode 100644 index 00000000..e4adfc96 Binary files /dev/null and b/test_assets/schemaTests/usdGeom/transforms/screenshots/scopes_and_xforms_nested_usdrecord_22.08.png differ diff --git a/test_assets/schemaTests/usdGeom/transforms/screenshots/simple_transform_usdrecord_22.08.png b/test_assets/schemaTests/usdGeom/transforms/screenshots/simple_transform_usdrecord_22.08.png new file mode 100644 index 00000000..789f63a8 Binary files /dev/null and b/test_assets/schemaTests/usdGeom/transforms/screenshots/simple_transform_usdrecord_22.08.png differ diff --git a/test_assets/schemaTests/usdGeom/transforms/screenshots/weird_matrix_transform_usdrecord_22.08.png b/test_assets/schemaTests/usdGeom/transforms/screenshots/weird_matrix_transform_usdrecord_22.08.png new file mode 100644 index 00000000..a2e8e7e7 Binary files /dev/null and b/test_assets/schemaTests/usdGeom/transforms/screenshots/weird_matrix_transform_usdrecord_22.08.png differ diff --git a/test_assets/schemaTests/usdGeom/transforms/screenshots/xforms_nested_usdrecord_22.08.png b/test_assets/schemaTests/usdGeom/transforms/screenshots/xforms_nested_usdrecord_22.08.png new file mode 100755 index 00000000..79dd03da Binary files /dev/null and b/test_assets/schemaTests/usdGeom/transforms/screenshots/xforms_nested_usdrecord_22.08.png differ diff --git a/test_assets/schemaTests/usdGeom/transforms/simple_transform.usda b/test_assets/schemaTests/usdGeom/transforms/simple_transform.usda new file mode 100644 index 00000000..f26e38c5 --- /dev/null +++ b/test_assets/schemaTests/usdGeom/transforms/simple_transform.usda @@ -0,0 +1,26 @@ +#usda 1.0 +( + defaultPrim = "World" + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) + +def Scope "World" +{ + over "axis" (references = [@../../../_common/axis.usda@]){} + + def Mesh "mesh" + { + float3 xformOp:rotateXYZ = (30, 60, 90) + float3 xformOp:scale = (1, 2, 3) + double3 xformOp:translate = (4, 5, 6) + uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] + + int[] faceVertexCounts = [4, 4, 4, 4, 4, 4] + int[] faceVertexIndices = [0, 4, 6, 2, 0, 1, 5, 4, 4, 5, 7, 6, 3, 7, 5, 1, 6, 7, 3, 2, 2, 3, 1, 0] + point3f[] points = [(-0.5, -0.5, -0.5), (0.5, -0.5, -0.5), (-0.5, 0.5, -0.5), (0.5, 0.5, -0.5), (-0.5, -0.5, 0.5), (0.5, -0.5, 0.5), (-0.5, 0.5, 0.5), (0.5, 0.5, 0.5)] + float3[] extent = [(-0.5, -0.5, -0.5), (0.5, 0.5, 0.5)] + } +} + diff --git a/test_assets/schemaTests/usdGeom/transforms/weird_matrix_transform.usda b/test_assets/schemaTests/usdGeom/transforms/weird_matrix_transform.usda new file mode 100644 index 00000000..9723d462 --- /dev/null +++ b/test_assets/schemaTests/usdGeom/transforms/weird_matrix_transform.usda @@ -0,0 +1,23 @@ +#usda 1.0 +( + defaultPrim = "World" + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) + +def Scope "World" +{ + over "axis" (references = [@../../../_common/axis.usda@]){} + + def Mesh "mesh" + { + custom Matrix4d xformOp:transform = ((1, 2, 3, 4), (5, 6, 7, 8), (9, 10, 11, 12), (13, 14, 15, 1)) + uniform token[] xformOpOrder = ["xformOp:transform"] + + int[] faceVertexCounts = [4, 4, 4, 4, 4, 4] + int[] faceVertexIndices = [0, 4, 6, 2, 0, 1, 5, 4, 4, 5, 7, 6, 3, 7, 5, 1, 6, 7, 3, 2, 2, 3, 1, 0] + point3f[] points = [(-0.5, -0.5, -0.5), (0.5, -0.5, -0.5), (-0.5, 0.5, -0.5), (0.5, 0.5, -0.5), (-0.5, -0.5, 0.5), (0.5, -0.5, 0.5), (-0.5, 0.5, 0.5), (0.5, 0.5, 0.5)] + float3[] extent = [(-0.5, -0.5, -0.5), (0.5, 0.5, 0.5)] + } +} \ No newline at end of file diff --git a/test_assets/schemaTests/usdGeom/transforms/xforms_nested.usda b/test_assets/schemaTests/usdGeom/transforms/xforms_nested.usda new file mode 100644 index 00000000..cb120972 --- /dev/null +++ b/test_assets/schemaTests/usdGeom/transforms/xforms_nested.usda @@ -0,0 +1,35 @@ +#usda 1.0 +( + defaultPrim = "World" + customLayerData = { + string copyright = '''Copyright 2022 Apple Inc. All rights reserved.''' + } +) + +def Scope "World" +{ + over "axis" (references = [@../../../_common/axis.usda@]){} + + def Xform "A" + { + double3 xformOp:translate = (1, 2, 3) + uniform token[] xformOpOrder = ["xformOp:translate"] + + def Xform "B" + { + double3 xformOp:translate = (0.1, 0.2, 0.3) + uniform token[] xformOpOrder = ["xformOp:translate"] + + def Xform "C" + { + double3 xformOp:translate = (0.01, 0.02, 0.03) + uniform token[] xformOpOrder = ["xformOp:translate"] + + def Cube "Cube" + { + } + } + } + } +} +