Files
Mujoco_WASM/python/mujoco/testdata/simple_usd_preview_surface.usda
T
Sam Haves 7da32d186f Add basic visual material parsing support to USD interop.
For this first iteration we only support simple UsdPreviewSurface spec node graphs.

PiperOrigin-RevId: 786309455
Change-Id: I2e5501a65b22aca6da570bc94394514c67bd100a
2025-07-23 09:21:56 -07:00

82 lines
2.6 KiB
Plaintext

#usda 1.0
(
endTimeCode = 1
framesPerSecond = 24
metersPerUnit = 1
startTimeCode = 1
timeCodesPerSecond = 24
upAxis = "Y"
)
def Xform "World"
{
def Cube "Cube" (
prepend apiSchemas = ["MaterialBindingAPI"]
)
{
float3[] extent = [(-1, -1, -1), (1, 1, 1)]
rel material:binding = </materials/simple_usd_preview_surface>
double size = 2
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 Cube "Cube2" (
prepend apiSchemas = ["MaterialBindingAPI"]
)
{
float3[] extent = [(-1, -1, -1), (1, 1, 1)]
rel material:binding = </materials/simple_usd_texture>
double size = 2
matrix4d xformOp:transform = ( (1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 0, 0, 1) )
matrix4d xformOp:transform:transform1 = ( (1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, -2.9009591341018677, 0, 1) )
uniform token[] xformOpOrder = ["xformOp:transform", "xformOp:transform:transform1"]
}
}
def Scope "materials"
{
def Material "simple_usd_preview_surface" (
prepend inherits = </__class_mtl__/simple_usd_preview_surface>
)
{
token outputs:surface.connect = </materials/simple_usd_preview_surface/usdpreviewsurface.outputs:surface>
def Shader "usdpreviewsurface"
{
uniform token info:id = "UsdPreviewSurface"
color3f inputs:diffuseColor = (0.1, 0.2, 0.3)
color3f inputs:emissiveColor = (0.4, 0.5, 0.6)
float inputs:metallic = 0.123
float inputs:roughness = 0.456
token outputs:surface
}
}
def Material "simple_usd_texture" (
prepend inherits = </__class_mtl__/simple_usd_texture>
)
{
token outputs:surface.connect = </materials/simple_usd_texture/usdpreviewsurface.outputs:surface>
def Shader "usdpreviewsurface"
{
uniform token info:id = "UsdPreviewSurface"
color3f inputs:diffuseColor = (0.1, 0.2, 0.3)
color3f inputs:diffuseColor.connect = </materials/simple_usd_texture/usduvtexture1.outputs:rgb>
color3f inputs:emissiveColor = (0.4, 0.5, 0.6)
float inputs:metallic = 0.123
float inputs:roughness = 0.456
token outputs:surface
}
def Shader "usduvtexture1"
{
uniform token info:id = "UsdUVTexture"
asset inputs:file = @./checkerboard.png@
vector3f outputs:rgb
}
}
}