MaterialDefinition

A material definition: a shared, named recipe with parameters, patterns and channels (rendering-revamp §RVM-1, §RVM-6).

In the namespace construct::model. Declared in src/libs/libconstruct/construct/model/MaterialDefinition.hpp.

Detailed description

A definition is one YAML record, and the text is the model, as it is for an SDF definition (construct-definition-editor §DUM-3): every reader parses the text, and every writer changes one value of it through YamlTextEditor, so the comments and the key order of the record stay as the author wrote them.

A definition lives in one of three homes (§RVM-5). Its id is a slug, the same in every process, which fixes the random built-in ids of M3. A scene record that was copied from the library remembers the library slug and the fingerprint of the record it copied, in its from key.

The channels drive OpenPBR Surface 1.1.1 (openpbr::channels()) and the material extensions (MaterialExtensions). A channel that a definition does not name takes the OpenPBR default.

In this section