Open 3D Engine Atom Gem API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AZ::RPI::ModelMaterialSlot Struct Reference

#include <ModelMaterialSlot.h>

Public Types

using StableId = uint32_t
 

Public Member Functions

 AZ_TYPE_INFO (ModelMaterialSlot, "{0E88A62A-D83D-4C1B-8DE7-CE972B8124B5}")
 

Static Public Member Functions

static void Reflect (AZ::ReflectContext *context)
 

Public Attributes

StableId m_stableId = InvalidStableId
 
Name m_displayName
 The name of the slot as displayed to the user in UI. (Using Name instead of string for fast copies)
 
Data::Asset< MaterialAssetm_defaultMaterialAsset { Data::AssetLoadBehavior::PreLoad }
 The material that will be applied to this slot by default.
 

Static Public Attributes

static const StableId InvalidStableId
 

Detailed Description

Use by model assets to identify a logical material slot. Each slot has a unique ID, a name, and a default material. Each mesh in model will reference a single ModelMaterialSlot. Other classes like MeshFeatureProcessor and MaterialComponent can override the material associated with individual slots to alter the default appearance of the mesh.

Member Data Documentation

◆ m_stableId

StableId AZ::RPI::ModelMaterialSlot::m_stableId = InvalidStableId

This ID must have a consistent value when the asset is reprocessed by the asset pipeline, and must be unique within the ModelLodAsset. In practice, this set using the MaterialUid from SceneAPI. See ModelAssetBuilderComponent::CreateMesh.


The documentation for this struct was generated from the following file: