mirror of
https://github.com/lighttransport/tinyusdz.git
synced 2026-01-18 01:11:17 +01:00
Implement support for ND_open_pbr_surface_surfaceshader exported by Blender v4.5 when using MaterialX. This enables proper parsing and conversion of OpenPBR materials from Blender-exported USD files. Key changes: - Add MtlxOpenPBRSurface struct with all Blender v4.5 parameters in usdMtlx.hh - Implement ReconstructShader specialization for MtlxOpenPBRSurface in prim-reconstruct.cc - Add MaterialXConfigAPI detection and OpenPBR shader attachment in render-data.cc - Implement DumpOpenPBRSurface for material output in render-scene-dump.cc - Add pretty-print support for MtlxOpenPBRSurface in pprinter.cc When MaterialXConfigAPI is present on a Material, the system now: 1. Attempts to parse outputs:mtlx:surface connection 2. Falls back to searching for child Shader prims with OpenPBR info:id 3. Converts MtlxOpenPBRSurface to OpenPBRSurface for rendering Tested with models/cube-materialx.usda and models/suzanne-materialx.usda 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
50 KiB
Executable File
50 KiB
Executable File