Class AutodeskInteractiveStandardMaterialMapper
A specialized StandardMaterialMapper that converts TriLib virtual materials into Autodesk Interactive materials. This mapper adjusts the material presets based on the currently active render pipeline (HDRP, URP, or Standard), and it forces the use of a Shader Variant Collection.
Inheritance
Inherited Members
Namespace: TriLibCore.Mappers
Assembly: Assembly-CSharp.dll
Syntax
[Serializable]
[CreateAssetMenu(menuName = "TriLib/Mappers/Material/Autodesk Interactive Standard Material Mapper", fileName = "AutodeskInteractiveStandardMaterialMapper")]
public class AutodeskInteractiveStandardMaterialMapper : StandardMaterialMapper
Properties
CutoutMaterialPreset
A cutout material preset for materials that use alpha testing (fully transparent vs. fully opaque).
Declaration
public override Material CutoutMaterialPreset { get; }
Property Value
| Type | Description |
|---|---|
| Material |
Overrides
CutoutMaterialPresetNoMetallicTexture
A cutout material preset for materials with no metallic texture usage.
Declaration
public override Material CutoutMaterialPresetNoMetallicTexture { get; }
Property Value
| Type | Description |
|---|---|
| Material |
Overrides
ExtractMetallicAndSmoothness
Indicates whether this Material Mapper automatically extracts Metallic and Smoothness textures.
Declaration
public override bool ExtractMetallicAndSmoothness { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Overrides
LoadingMaterial
An optional placeholder material used while a model’s final materials and textures are still loading.
Declaration
public override Material LoadingMaterial { get; }
Property Value
| Type | Description |
|---|---|
| Material |
Overrides
MaterialPreset
The default (opaque) material preset.
Declaration
public override Material MaterialPreset { get; }
Property Value
| Type | Description |
|---|---|
| Material |
Overrides
MaterialPresetNoMetallicTexture
The default (opaque) material preset for materials with no metallic texture usage.
Declaration
public override Material MaterialPresetNoMetallicTexture { get; }
Property Value
| Type | Description |
|---|---|
| Material |
Overrides
TransparentComposeMaterialPreset
A “compose” material preset used in layered alpha workflows when
AlphaMaterialMode is set to CutoutAndTransparent.
This is applied as a secondary pass for partially transparent regions.
Declaration
public override Material TransparentComposeMaterialPreset { get; }
Property Value
| Type | Description |
|---|---|
| Material |
Overrides
TransparentComposeMaterialPresetNoMetallicTexture
The “compose” material preset for partially transparent materials that have no metallic texture usage.
Declaration
public override Material TransparentComposeMaterialPresetNoMetallicTexture { get; }
Property Value
| Type | Description |
|---|---|
| Material |
Overrides
TransparentMaterialPreset
A fully transparent (alpha) material preset.
Declaration
public override Material TransparentMaterialPreset { get; }
Property Value
| Type | Description |
|---|---|
| Material |
Overrides
TransparentMaterialPresetNoMetallicTexture
A fully transparent (alpha) material preset for materials without a metallic texture.
Declaration
public override Material TransparentMaterialPresetNoMetallicTexture { get; }
Property Value
| Type | Description |
|---|---|
| Material |
Overrides
UseShaderVariantCollection
If overridden to return true, indicates that this mapper uses a Shader Variant
Collection instead of the usual material presets. By default, it returns false.
Declaration
public override bool UseShaderVariantCollection { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Overrides
Remarks
Implementers can override this to provide advanced material handling, especially when working with different pipelines or specialized shader setups.
Methods
ApplyGlossinessMapTexture(TextureLoadingContext)
Declaration
protected override IEnumerable ApplyGlossinessMapTexture(TextureLoadingContext textureLoadingContext)
Parameters
| Type | Name | Description |
|---|---|---|
| TextureLoadingContext | textureLoadingContext |
Returns
| Type | Description |
|---|---|
| IEnumerable |
Overrides
GetGlossinessOrRoughnessName(MaterialMapperContext)
Retrieves the property name for glossiness or roughness, depending on the shader’s workflow.
Declaration
public override string GetGlossinessOrRoughnessName(MaterialMapperContext materialMapperContext)
Parameters
| Type | Name | Description |
|---|---|---|
| MaterialMapperContext | materialMapperContext | Context containing the TriLib virtual material and Unity material references. |
Returns
| Type | Description |
|---|---|
| string |
Overrides
IsCompatible(MaterialMapperContext)
Determines whether this mapper can handle the specified material (e.g., by checking
shader keywords, pipeline features, or other criteria). Mappers with false returns
are skipped in favor of others with higher compatibility.
Declaration
public override bool IsCompatible(MaterialMapperContext materialMapperContext)
Parameters
| Type | Name | Description |
|---|---|---|
| MaterialMapperContext | materialMapperContext | The context providing references to both the TriLib |
Returns
| Type | Description |
|---|---|
| bool |
|