mirror of
https://github.com/lighttransport/tinyusdz.git
synced 2026-01-18 01:11:17 +01:00
Bump MaterialX version from 1.38 to 1.39 for Blender 4.5+ compatibility
Updated MaterialX version across codebase and documentation to 1.39, which is the version supported by Blender 4.5+ MaterialX exports. Changes: - Updated JSON schema version in materialx-to-json.cc to "1.39" - Updated documentation headers and examples in: - doc/materialx.md - doc/MATERIALX-SUPPORT-STATUS.md - Added "(Blender 4.5+ compatible)" notes throughout documentation - Updated version compatibility section to list 1.39 as primary, with 1.36-1.38 as legacy versions This ensures seamless compatibility with MaterialX files exported from Blender 4.5 and later versions, while maintaining backward compatibility with older MaterialX 1.38 files. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -16,14 +16,14 @@ TinyUSDZ provides comprehensive MaterialX/OpenPBR support through:
|
||||
### ✅ Implemented (Import & Export)
|
||||
|
||||
#### Export:
|
||||
- **MaterialX 1.38 Export** - `ExportMaterialX()` in `threejs-exporter.cc`
|
||||
- **MaterialX 1.39 Export** - `ExportMaterialX()` in `threejs-exporter.cc` (Blender 4.5+ compatible)
|
||||
- **OpenPBR Surface Shader** - All parameter groups supported
|
||||
- **Texture Nodes** - Image nodes with color space and channel extraction
|
||||
- **XML Generation** - Compliant MaterialX 1.38 document structure
|
||||
- **XML Generation** - Compliant MaterialX 1.39 document structure
|
||||
- **Color Space Support** - sRGB, Linear, Rec.709, ACES variants
|
||||
|
||||
#### Import (NEW - January 2025):
|
||||
- **MaterialX 1.38 Import** - `ReadMaterialXFromString()`, `ReadMaterialXFromFile()`
|
||||
- **MaterialX 1.39 Import** - `ReadMaterialXFromString()`, `ReadMaterialXFromFile()`
|
||||
- **Built-in XML Parser** - Secure, dependency-free parser (no pugixml required)
|
||||
- **OpenPBR Surface Shader** - Complete parameter support in `MtlxOpenPBRSurface`
|
||||
- **Autodesk Standard Surface** - Full support in `MtlxAutodeskStandardSurface`
|
||||
@@ -468,5 +468,5 @@ python -m http.server 8000
|
||||
---
|
||||
|
||||
**Last Updated**: January 2025
|
||||
**TinyUSDZ Version**: 0.8.x
|
||||
**MaterialX Version**: 1.38
|
||||
**TinyUSDZ Version**: 0.9.x
|
||||
**MaterialX Version**: 1.39 (Blender 4.5+ compatible)
|
||||
|
||||
@@ -108,7 +108,7 @@ MaterialX files typically specify color spaces at multiple levels:
|
||||
|
||||
1. **Document Level**: Set in the root `<materialx>` element
|
||||
```xml
|
||||
<materialx version="1.38" colorspace="lin_rec709">
|
||||
<materialx version="1.39" colorspace="lin_rec709">
|
||||
```
|
||||
|
||||
2. **Texture Level**: Specified on `<image>` and `<tiledimage>` nodes
|
||||
@@ -430,7 +430,7 @@ make
|
||||
1. **Basic MaterialX XML Parsing**
|
||||
- XML parser in `src/usdMtlx.cc` using pugixml
|
||||
- Secure MaterialX parser in `sandbox/mtlx-parser/` (dependency-free)
|
||||
- Support for MaterialX v1.36, v1.37, v1.38
|
||||
- Support for MaterialX v1.36, v1.37, v1.38, v1.39 (Blender 4.5+)
|
||||
|
||||
2. **Color Space Support**
|
||||
- Complete color space conversion functions in `src/image-util.cc`
|
||||
@@ -476,7 +476,7 @@ make
|
||||
- [ ] **Extend MaterialXConfigAPI structure**
|
||||
```cpp
|
||||
struct MaterialXConfigAPI {
|
||||
TypedAttributeWithFallback<std::string> mtlx_version{"1.38"};
|
||||
TypedAttributeWithFallback<std::string> mtlx_version{"1.39"}; // Blender 4.5+ compatible
|
||||
TypedAttributeWithFallback<std::string> mtlx_namespace{""};
|
||||
TypedAttributeWithFallback<std::string> mtlx_colorspace{"lin_rec709"};
|
||||
TypedAttributeWithFallback<std::string> mtlx_sourceUri{""};
|
||||
@@ -717,9 +717,9 @@ make
|
||||
- Maintain compatibility with pxrUSD
|
||||
|
||||
2. **MaterialX Version Support**
|
||||
- Primary: MaterialX 1.38 (current)
|
||||
- Legacy: MaterialX 1.36, 1.37
|
||||
- Future: MaterialX 1.39+ preparation
|
||||
- Primary: MaterialX 1.39 (current - Blender 4.5+ compatible)
|
||||
- Legacy: MaterialX 1.36, 1.37, 1.38
|
||||
- Future: MaterialX 1.40+ preparation
|
||||
|
||||
## Validation Checklist
|
||||
|
||||
|
||||
@@ -123,7 +123,7 @@ bool ConvertMtlxNodeGraphToJson(
|
||||
|
||||
std::stringstream ss;
|
||||
ss << "{\n";
|
||||
ss << " \"version\": \"1.38\",\n"; // MaterialX version
|
||||
ss << " \"version\": \"1.39\",\n"; // MaterialX version (Blender 4.5+ compatible)
|
||||
ss << " \"nodegraph\": {\n";
|
||||
ss << " \"name\": \"" << EscapeJsonString(nodegraph.GetName()) << "\",\n";
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace tydra {
|
||||
/// Follows MaterialX XML structure as closely as possible for compatibility
|
||||
/// Schema format (JSON):
|
||||
/// {
|
||||
/// "version": "1.38", // MaterialX version
|
||||
/// "version": "1.39", // MaterialX version (Blender 4.5+ compatible)
|
||||
/// "nodegraph": {
|
||||
/// "name": "NG_shader1", // NodeGraph name
|
||||
/// "nodes": [ // Array of nodes
|
||||
|
||||
Reference in New Issue
Block a user