Skip to content

Instantly share code, notes, and snippets.

@carlynorama
Created June 28, 2023 23:08
Show Gist options
  • Save carlynorama/80b503dd66d1a23c4c6354f190e751dc to your computer and use it in GitHub Desktop.
Save carlynorama/80b503dd66d1a23c4c6354f190e751dc to your computer and use it in GitHub Desktop.
Rainbow Cube USD examples
#usda 1.0
def Xform "Rainbow"
{
def Mesh "cubeMesh"
{
float3[] extent = [(-2, -2, -2), (2, 2, 2)]
int[] faceVertexCounts = [4, 4, 4, 4, 4, 4]
int[] faceVertexIndices = [0, 1, 2, 3, 4, 5, 6, 7, 0, 6, 5, 1, 4, 7, 3, 2, 0, 3, 7, 6, 4, 2, 1, 5]
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)]
color3f[] primvars:displayColor = [(0, 0, 1), (1,0,1), (1,0,0), (0, 1, 0),(0, 0, 1), (1,0,1), (1,0,0), (0, 1, 0)](
interpolation = "vertex"
)
uniform token subdivisionScheme = "none"
}
}
#usda 1.0
def Xform "Rainbow"
{
def Cube "cube"
{
float3[] extent = [(-2, -2, -2), (2, 2, 2)]
color3f[] primvars:displayColor = [(0, 0, 1), (1,0,1), (1,0,0), (0, 1, 0),(0, 0, 1), (1,0,1), (1,0,0), (0, 1, 0)](
interpolation = "vertex"
)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment