Open Search
    ExchangeMapper Material Definition Mapper Manual

    Introduction

    It is possible to translate a material definition by defining a maxon::material::MaterialMappingInterface.
    While having a perfect match from a material definition to another is unrealistic, some material definitions do not support displacement, the maxon::material::MaterialMappingInterface ensures this operation to be done in the best possible way, by for example inverting a roughness value.

    MaterialMappingInterface

    A mapping from a material definition to another is done in two steps:

    1. the constant parameters (e.g. maxon::material::PackedConstantParameter, maxon::material::TypedConstantParameter) are taken in considering.
    2. the non-constant ones (maxon::material::TextureBuffer, maxon::material::ImageReference, maxon::material::SubstanceReference) follow.

    There are two methods to override:

    Each material mapping should be registered in the maxon::material::MaterialMappers registry as a maxon::material::MaterialMappingDescription that contains information about the maxon::Id of the source material definition and the target material definition and the maxon::material::MaterialMappingRef to performs this mapping.

    Further Reading