Skip to content

Commit

Permalink
meta: fix usdchecker errors for cornell box & convert to USDA
Browse files Browse the repository at this point in the history
  • Loading branch information
pablode committed Sep 28, 2023
1 parent d31cecb commit 2c963e7
Show file tree
Hide file tree
Showing 2 changed files with 248 additions and 0 deletions.
248 changes: 248 additions & 0 deletions cornell.usda
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 removed cornell.usdc
Binary file not shown.

0 comments on commit 2c963e7

Please sign in to comment.