Skip to main content

MaterialX

The MaterialX plugin implements loading, saving, and management of materials defined using the MaterialX specification. It supports parsing material definitions from files, memory streams, or Xml nodes and generates MaterialShading resources for rendering. Materials can be organized hierarchically to enable efficient sharing and reuse across scenes and assets.

info

This plugin is integrated into Tellusim Explorer.

#include <materials/materialx/include/TellusimMaterialX.h>
#include <materials/materialx/include/TellusimMaterialXShading.h>

Example

// Create root material
MaterialX root_material;
if(!root_material.init()) return false;

// Load MaterialX file
MaterialXShading material_shading(&root_material);
if(!material_shading.load("standard_surface_brick_procedural.mtlx") return false;

// Create scene material
MaterialShading material(scene);
if(!material_shading.create(material)) return false;