|
Materialx Protobuf API 1.39.5
Serialization API to convert between MaterialX and Google Protobuf formats.
|
Google Protocol Buffers offer a compact, deterministic, and version-safe way to represent shading networks. Its .proto schemas generate strong, multi-language APIs (C++, Python, JS, etc.) while supporting forward/backward compatibility via numeric field IDs, optional, oneof, and reserved fields. Deterministic binary output enables caching, network distribution, and equality checks, and messages are thread-safe for concurrent reads and parallel I/O.
Caveats: unlike USDShade, it does not handle scene composition or variants, and unlike glTF, it lacks binary packaging or runtime constraints — pipeline and runtime logic must be handled separately.
.proto files define a pure data schema that generates strongly typed classes across C++, Python, JS, and more — ensuring consistent APIs.optional, reserved, and oneof allow forward/backward compatibility at the data model, API, and ABI levels..proto generates bindings automatically, removing manual interface code.Protobuf offers some interesting features as a serialization format.
.proto) that can be compiled into strongly typed classes in different languages for API consistency.optional, reserved, and oneof usage rules – allowing fields to be added or deprecated without breaking older versions..proto file acts as the single source of truth for generating bindings, removing the need for manual interfaces (e.g., pybind11). USDShade it does not provide any scene composition or variant logic as it is not a stage system. glTF it does not support binary packaging nor runtime constraints.