Files
tinyusdz/models/geomsubset-material-001.usda
2024-04-14 05:42:13 +09:00

94 lines
2.9 KiB
Plaintext

#usda 1.0
(
defaultPrim = "grid2"
endTimeCode = 1
framesPerSecond = 24
metersPerUnit = 1
startTimeCode = 1
timeCodesPerSecond = 24
upAxis = "Y"
)
def Xform "grid2" (
kind = "component"
)
{
matrix4d xformOp:transform:xform = ( (1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 0, 0, 1) )
uniform token[] xformOpOrder = ["xformOp:transform:xform"]
def Mesh "mesh_0"
{
float3[] extent = [(-1, 0, -1), (1, 0, 1)]
int[] faceVertexCounts = [4, 4, 4, 4, 4, 4, 4, 4, 4]
int[] faceVertexIndices = [0, 1, 5, 4, 1, 2, 6, 5, 2, 3, 7, 6, 4, 5, 9, 8, 5, 6, 10, 9, 6, 7, 11, 10, 8, 9, 13, 12, 9, 10, 14, 13, 10, 11, 15, 14]
uniform token orientation = "leftHanded"
point3f[] points = [(-1, 0, -1), (-0.3333333, 0, -1), (0.33333337, 0, -1), (1, 0, -1), (-1, 0, -0.3333333), (-0.3333333, 0, -0.3333333), (0.33333337, 0, -0.3333333), (1, 0, -0.3333333), (-1, 0, 0.33333337), (-0.3333333, 0, 0.33333337), (0.33333337, 0, 0.33333337), (1, 0, 0.33333337), (-1, 0, 1), (-0.3333333, 0, 1), (0.33333337, 0, 1), (1, 0, 1)] (
interpolation = "vertex"
)
uniform token subdivisionScheme = "none"
uniform token subsetFamily:materialBind:familyType = "partition"
def GeomSubset "subset_red"
{
uniform token elementName = "face"
uniform token familyName = "materialBind"
int[] indices = [0, 1, 2]
rel material:binding = </Looks/Red>
}
def GeomSubset "subset_green"
{
uniform token elementName = "face"
uniform token familyName = "materialBind"
int[] indices = [3, 4, 5]
rel material:binding = </Looks/Green>
}
def GeomSubset "subset_blue"
{
uniform token elementName = "face"
uniform token familyName = "materialBind"
int[] indices = [6, 7, 8]
rel material:binding = </Looks/Blue>
}
}
}
def "Looks"
{
def Material "Red"
{
token outputs:surface.connect = </Looks/Red/sampleShader.outputs:surface>
def Shader "sampleShader"
{
uniform token info:id = "UsdPreviewSurface"
color3f inputs:diffuseColor = (1, 0, 0)
token outputs:surface
}
}
def Material "Green"
{
token outputs:surface.connect = </Looks/Green/sampleShader.outputs:surface>
def Shader "sampleShader"
{
uniform token info:id = "UsdPreviewSurface"
color3f inputs:diffuseColor = (0, 1, 0)
token outputs:surface
}
}
def Material "Blue"
{
token outputs:surface.connect = </Looks/Blue/sampleShader.outputs:surface>
def Shader "sampleShader"
{
uniform token info:id = "UsdPreviewSurface"
color3f inputs:diffuseColor = (0, 0, 1)
token outputs:surface
}
}
}