Files
tinyusdz/models/openpbr-brick-sphere.usda
Syoyo Fujita 567ee25f1d Add synthetic OpenPBR MaterialX test scenes with texturing
Created comprehensive test suite for OpenPBR materials demonstrating various
material properties and texture mapping workflows. All scenes use proper USD
shader node IDs (OpenPBRSurface, UsdUVTexture, UsdPrimvarReader_float2) rather
than MaterialX node definition IDs.

New test files:
- openpbr-brick-sphere.usda: Diffuse material with brick texture
- openpbr-metallic-cube.usda: Metallic material with checkerboard
- openpbr-emissive-plane.usda: Emissive with cat texture (Mesh - MaterialX exportable)
- openpbr-glass-sphere.usda: Glass/transmission material
- openpbr-subsurface-sphere.usda: Subsurface scattering with texture
- openpbr-coated-cube.usda: Clear coat over brick texture
- openpbr-multi-object.usda: Multi-material scene (4 objects, 4 materials)

Texture asset:
- textures/brick.bmp: 64x64 red brick pattern with gray mortar
- create_brick_texture.py: Python script to generate brick texture

Documentation:
- OPENPBR_TESTS_README.md: Comprehensive guide covering material structure,
  shader node IDs, Tydra conversion limitations, and testing procedures

Material features demonstrated:
- Base layer (color, metalness, roughness)
- Specular (weight, roughness, IOR)
- Transmission (weight, color, thin_walled)
- Emission (color, luminance)
- Subsurface scattering (color, weight, radius, radius_scale)
- Coat (weight, roughness, IOR, color)
- Texture mapping with UV coordinates
- Multiple texture formats (BMP, PNG, JPG)

Note: Materials bound to parametric primitives (Sphere, Cube) are not
currently converted by Tydra RenderScene. Use explicit Mesh primitives
for MaterialX export compatibility.

Tested: All files parse correctly, emissive-plane exports to MaterialX XML/JSON

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-05 01:50:24 +09:00

56 lines
1.6 KiB
Plaintext

#usda 1.0
(
doc = "Simple OpenPBR material with brick texture"
metersPerUnit = 1
upAxis = "Y"
defaultPrim = "World"
)
def Xform "World"
{
def Sphere "BrickSphere"
{
double radius = 1.0
rel material:binding = </World/_materials/BrickMaterial>
texCoord2f[] primvars:st = [(0, 0), (1, 0), (1, 1), (0, 1)] (
interpolation = "vertex"
)
}
def Scope "_materials"
{
def Material "BrickMaterial"
{
token outputs:surface.connect = </World/_materials/BrickMaterial/OpenPBRSurface.outputs:surface>
def Shader "OpenPBRSurface"
{
uniform token info:id = "OpenPBRSurface"
color3f inputs:base_color.connect = </World/_materials/BrickMaterial/BrickTexture.outputs:rgb>
float inputs:base_metalness = 0.0
float inputs:base_weight = 1.0
float inputs:specular_roughness = 0.7
float inputs:specular_weight = 0.5
token outputs:surface
}
def Shader "BrickTexture"
{
uniform token info:id = "UsdUVTexture"
asset inputs:file = @./textures/brick.bmp@
string inputs:filtertype = "linear"
float2 inputs:texcoord.connect = </World/_materials/BrickMaterial/Primvar.outputs:result>
color3f outputs:rgb
}
def Shader "Primvar"
{
uniform token info:id = "UsdPrimvarReader_float2"
int inputs:index = 0
float2 outputs:result
}
}
}
}