-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
meta: fix usdchecker errors for cornell box & convert to USDA
- Loading branch information
Showing
2 changed files
with
248 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,248 @@ | ||
#usda 1.0 | ||
( | ||
defaultPrim = "Root" | ||
doc = "Gatling's Example Cornell Box" | ||
metersPerUnit = 1 | ||
upAxis = "Z" | ||
) | ||
|
||
def Xform "Root" | ||
{ | ||
def Xform "Camera" | ||
{ | ||
matrix4d xformOp:transform = ( (1, 0, 0, 0), (0, -4.371138828673793e-8, 1, 0), (0, -1, -4.371138828673793e-8, 0), (0, -7, 0, 1) ) | ||
uniform token[] xformOpOrder = ["xformOp:transform"] | ||
|
||
def Camera "Camera" | ||
{ | ||
float2 clippingRange = (0.1, 100) | ||
float focalLength = 50 | ||
float horizontalAperture = 36 | ||
float horizontalApertureOffset = 0 | ||
token projection = "perspective" | ||
float verticalAperture = 20.25 | ||
float verticalApertureOffset = 0 | ||
} | ||
} | ||
|
||
def Xform "Light" | ||
{ | ||
matrix4d xformOp:transform = ( (1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 0, 0, 1) ) | ||
uniform token[] xformOpOrder = ["xformOp:transform"] | ||
|
||
def Mesh "Light" ( | ||
prepend apiSchemas = ["MaterialBindingAPI"] | ||
) | ||
{ | ||
uniform bool doubleSided = 1 | ||
int[] faceVertexCounts = [4, 4, 4, 4, 4, 4] | ||
int[] faceVertexIndices = [0, 1, 3, 2, 2, 3, 7, 6, 6, 7, 5, 4, 4, 5, 1, 0, 2, 6, 4, 0, 7, 3, 1, 5] | ||
rel material:binding = </Root/Materials/Light> | ||
normal3f[] normals = [(-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, 0), (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, -0, 1), (0, -0, 1), (0, -0, 1), (0, -0, 1)] ( | ||
interpolation = "faceVarying" | ||
) | ||
point3f[] points = [(-0.5, -0.5, 0.98), (-0.5, -0.5, 1), (-0.5, 0.5, 0.98), (-0.5, 0.5, 1), (0.5, -0.5, 0.98), (0.5, -0.5, 1), (0.5, 0.5, 0.98), (0.5, 0.5, 1)] | ||
uniform token subdivisionScheme = "none" | ||
} | ||
} | ||
|
||
def "Materials" | ||
{ | ||
def Material "Light" | ||
{ | ||
token outputs:surface.connect = </Root/Materials/Light/previewShader.outputs:surface> | ||
|
||
def Shader "previewShader" | ||
{ | ||
uniform token info:id = "UsdPreviewSurface" | ||
color3f inputs:diffuseColor = (0.8, 0.8, 0.8) | ||
color3f inputs:emissiveColor = (8.5, 6, 4) | ||
token outputs:surface | ||
} | ||
} | ||
|
||
def Material "White" | ||
{ | ||
token outputs:surface.connect = </Root/Materials/White/previewShader.outputs:surface> | ||
|
||
def Shader "previewShader" | ||
{ | ||
uniform token info:id = "UsdPreviewSurface" | ||
color3f inputs:diffuseColor = (0.8, 0.8, 0.8) | ||
token outputs:surface | ||
} | ||
} | ||
|
||
def Material "Red" | ||
{ | ||
token outputs:surface.connect = </Root/Materials/Red/previewShader.outputs:surface> | ||
|
||
def Shader "previewShader" | ||
{ | ||
uniform token info:id = "UsdPreviewSurface" | ||
color3f inputs:diffuseColor = (1, 0, 0) | ||
token outputs:surface | ||
} | ||
} | ||
|
||
def Material "Green" | ||
{ | ||
token outputs:surface.connect = </Root/Materials/Green/previewShader.outputs:surface> | ||
|
||
def Shader "previewShader" | ||
{ | ||
uniform token info:id = "UsdPreviewSurface" | ||
color3f inputs:diffuseColor = (0, 1, 0) | ||
token outputs:surface | ||
} | ||
} | ||
} | ||
|
||
def Xform "BottomPlane" | ||
{ | ||
matrix4d xformOp:transform = ( (1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 0, 0, 1) ) | ||
uniform token[] xformOpOrder = ["xformOp:transform"] | ||
|
||
def Mesh "BottomPlane" ( | ||
prepend apiSchemas = ["MaterialBindingAPI"] | ||
) | ||
{ | ||
uniform bool doubleSided = 1 | ||
int[] faceVertexCounts = [4] | ||
int[] faceVertexIndices = [0, 1, 3, 2] | ||
rel material:binding = </Root/Materials/White> | ||
normal3f[] normals = [(0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1)] ( | ||
interpolation = "faceVarying" | ||
) | ||
point3f[] points = [(-1, -1, -1), (1, -1, -1), (-1, 1, -1), (1, 1, -1)] | ||
uniform token subdivisionScheme = "none" | ||
} | ||
} | ||
|
||
def Xform "TopPlane" | ||
{ | ||
matrix4d xformOp:transform = ( (1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 0, 0, 1) ) | ||
uniform token[] xformOpOrder = ["xformOp:transform"] | ||
|
||
def Mesh "TopPlane" ( | ||
prepend apiSchemas = ["MaterialBindingAPI"] | ||
) | ||
{ | ||
uniform bool doubleSided = 1 | ||
int[] faceVertexCounts = [4] | ||
int[] faceVertexIndices = [0, 1, 3, 2] | ||
rel material:binding = </Root/Materials/White> | ||
normal3f[] normals = [(-8.940697e-8, 0, -1), (-8.940697e-8, 0, -1), (-8.940697e-8, 0, -1), (-8.940697e-8, 0, -1)] ( | ||
interpolation = "faceVarying" | ||
) | ||
point3f[] points = [(1, -1, 0.99999994), (-1, -1, 1.0000001), (1, 1, 0.99999994), (-1, 1, 1.0000001)] | ||
uniform token subdivisionScheme = "none" | ||
} | ||
} | ||
|
||
def Xform "BackPlane" | ||
{ | ||
matrix4d xformOp:transform = ( (1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 0, 0, 1) ) | ||
uniform token[] xformOpOrder = ["xformOp:transform"] | ||
|
||
def Mesh "BackPlane" ( | ||
prepend apiSchemas = ["MaterialBindingAPI"] | ||
) | ||
{ | ||
uniform bool doubleSided = 1 | ||
int[] faceVertexCounts = [4] | ||
int[] faceVertexIndices = [0, 1, 3, 2] | ||
rel material:binding = </Root/Materials/White> | ||
normal3f[] normals = [(0, -1, -2.9802322e-8), (0, -1, -2.9802322e-8), (0, -1, -2.9802322e-8), (0, -1, -2.9802322e-8)] ( | ||
interpolation = "faceVarying" | ||
) | ||
point3f[] points = [(-1, 1, -1), (1, 1, -1), (-1, 0.99999994, 1), (1, 0.99999994, 1)] | ||
uniform token subdivisionScheme = "none" | ||
} | ||
} | ||
|
||
def Xform "LeftPlane" | ||
{ | ||
matrix4d xformOp:transform = ( (1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 0, 0, 1) ) | ||
uniform token[] xformOpOrder = ["xformOp:transform"] | ||
|
||
def Mesh "LeftPlane" ( | ||
prepend apiSchemas = ["MaterialBindingAPI"] | ||
) | ||
{ | ||
uniform bool doubleSided = 1 | ||
int[] faceVertexCounts = [4] | ||
int[] faceVertexIndices = [0, 1, 3, 2] | ||
rel material:binding = </Root/Materials/Red> | ||
normal3f[] normals = [(1, 0, -2.9802322e-8), (1, 0, -2.9802322e-8), (1, 0, -2.9802322e-8), (1, 0, -2.9802322e-8)] ( | ||
interpolation = "faceVarying" | ||
) | ||
point3f[] points = [(-0.99999994, -1, 1), (-1, -1, -1), (-0.99999994, 1, 1), (-1, 1, -1)] | ||
uniform token subdivisionScheme = "none" | ||
} | ||
} | ||
|
||
def Xform "RightPlane" | ||
{ | ||
matrix4d xformOp:transform = ( (1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 0, 0, 1) ) | ||
uniform token[] xformOpOrder = ["xformOp:transform"] | ||
|
||
def Mesh "RightPlane" ( | ||
prepend apiSchemas = ["MaterialBindingAPI"] | ||
) | ||
{ | ||
uniform bool doubleSided = 1 | ||
int[] faceVertexCounts = [4] | ||
int[] faceVertexIndices = [0, 1, 3, 2] | ||
rel material:binding = </Root/Materials/Green> | ||
normal3f[] normals = [(-1, -0, 0), (-1, -0, 0), (-1, -0, 0), (-1, -0, 0)] ( | ||
interpolation = "faceVarying" | ||
) | ||
point3f[] points = [(1, -1, -1), (1, -1, 1), (1, 1, -1), (1, 1, 1)] | ||
uniform token subdivisionScheme = "none" | ||
} | ||
} | ||
|
||
def Xform "Box1" | ||
{ | ||
matrix4d xformOp:transform = ( (0.28844988346099854, 0.19823384284973145, 0, 0), (-0.19823384284973145, 0.28844988346099854, 0, 0), (0, 0, 0.699999988079071, 0), (-0.3499999940395355, 0.3499999940395355, -0.30000001192092896, 1) ) | ||
uniform token[] xformOpOrder = ["xformOp:transform"] | ||
|
||
def Mesh "Box1" ( | ||
prepend apiSchemas = ["MaterialBindingAPI"] | ||
) | ||
{ | ||
uniform bool doubleSided = 1 | ||
int[] faceVertexCounts = [4, 4, 4, 4, 4, 4] | ||
int[] faceVertexIndices = [0, 1, 3, 2, 2, 3, 7, 6, 6, 7, 5, 4, 4, 5, 1, 0, 2, 6, 4, 0, 7, 3, 1, 5] | ||
rel material:binding = </Root/Materials/White> | ||
normal3f[] normals = [(-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, 0), (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, -0, 1), (0, -0, 1), (0, -0, 1), (0, -0, 1)] ( | ||
interpolation = "faceVarying" | ||
) | ||
point3f[] points = [(-1, -1, -1), (-1, -1, 1), (-1, 1, -1), (-1, 1, 1), (1, -1, -1), (1, -1, 1), (1, 1, -1), (1, 1, 1)] | ||
uniform token subdivisionScheme = "none" | ||
} | ||
} | ||
|
||
def Xform "Box2" | ||
{ | ||
matrix4d xformOp:transform = ( (0.2831651270389557, -0.09908341616392136, 0, 0), (0.09908341616392136, 0.2831651270389557, 0, 0), (0, 0, 0.3501630127429962, 0), (0.45550230145454407, -0.41113391518592834, -0.6499999761581421, 1) ) | ||
uniform token[] xformOpOrder = ["xformOp:transform"] | ||
|
||
def Mesh "Box2" ( | ||
prepend apiSchemas = ["MaterialBindingAPI"] | ||
) | ||
{ | ||
uniform bool doubleSided = 1 | ||
int[] faceVertexCounts = [4, 4, 4, 4, 4, 4] | ||
int[] faceVertexIndices = [0, 1, 3, 2, 2, 3, 7, 6, 6, 7, 5, 4, 4, 5, 1, 0, 2, 6, 4, 0, 7, 3, 1, 5] | ||
rel material:binding = </Root/Materials/White> | ||
normal3f[] normals = [(-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, 0), (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, -0, 1), (0, -0, 1), (0, -0, 1), (0, -0, 1)] ( | ||
interpolation = "faceVarying" | ||
) | ||
point3f[] points = [(-1, -1, -1), (-1, -1, 1), (-1, 1, -1), (-1, 1, 1), (1, -1, -1), (1, -1, 1), (1, 1, -1), (1, 1, 1)] | ||
uniform token subdivisionScheme = "none" | ||
} | ||
} | ||
} | ||
|
Binary file not shown.