TriLib 2.2.8
|
Represents a Material Mapper that converts TriLib Materials into Unity Standard Materials. More...
Public Member Functions | |
override bool | IsCompatible (MaterialMapperContext materialMapperContext) |
Determines whether this Mapper is compatible with the given Material Renderer Context. | |
override void | Map (MaterialMapperContext materialMapperContext) |
Starts the mapping process, comparing the Mapper Properties against the source Material ones. | |
override string | GetDiffuseTextureName (MaterialMapperContext materialMapperContext) |
Gets the Diffuse Texture Property name. | |
override string | GetGlossinessOrRoughnessTextureName (MaterialMapperContext materialMapperContext) |
Gets the Glossiness or Roughness Texture Property name. | |
override string | GetDiffuseColorName (MaterialMapperContext materialMapperContext) |
Gets the Diffuse Color Property name. | |
override string | GetEmissionColorName (MaterialMapperContext materialMapperContext) |
Gets the Emission Color Property name. | |
override string | GetGlossinessOrRoughnessName (MaterialMapperContext materialMapperContext) |
Gets the Glossiness or Roughness Property name. | |
override string | GetMetallicName (MaterialMapperContext materialMapperContext) |
Gets the Metallic Property name. | |
override string | GetMetallicTextureName (MaterialMapperContext materialMapperContext) |
Gets the Metallic Texture Property name. | |
Public Member Functions inherited from TriLibCore.Mappers.MaterialMapper | |
virtual bool | IsCompatible (MaterialMapperContext materialMapperContext) |
Determines whether this Mapper is compatible with the given Material Renderer Context. | |
virtual void | Map (MaterialMapperContext materialMapperContext) |
Starts the mapping process, comparing the Mapper Properties against the source Material ones. | |
void | ApplyMaterialToRenderer (MaterialRendererContext materialRendererContext) |
Applies Material to the Renderer using the context data. | |
virtual string | GetDiffuseTextureName (MaterialMapperContext materialMapperContext) |
Gets the Diffuse Texture Property name. | |
virtual string | GetDiffuseColorName (MaterialMapperContext materialMapperContext) |
Gets the Diffuse Color Property name. | |
virtual string | GetEmissionColorName (MaterialMapperContext materialMapperContext) |
Gets the Emission Color Property name. | |
virtual string | GetGlossinessOrRoughnessName (MaterialMapperContext materialMapperContext) |
Gets the Glossiness or Roughness Property name. | |
virtual string | GetMetallicName (MaterialMapperContext materialMapperContext) |
Gets the Metallic Property name. | |
virtual string | GetGlossinessOrRoughnessTextureName (MaterialMapperContext materialMapperContext) |
Gets the Glossiness or Roughness Texture Property name. | |
virtual string | GetMetallicTextureName (MaterialMapperContext materialMapperContext) |
Gets the Metallic Texture Property name. | |
Properties | |
override Material | MaterialPreset [get] |
override Material | CutoutMaterialPreset [get] |
override Material | TransparentComposeMaterialPreset [get] |
override Material | TransparentMaterialPreset [get] |
override Material | MaterialPresetNoMetallicTexture [get] |
override Material | CutoutMaterialPresetNoMetallicTexture [get] |
override Material | TransparentMaterialPresetNoMetallicTexture [get] |
override Material | TransparentComposeMaterialPresetNoMetallicTexture [get] |
override Material | LoadingMaterial [get] |
override bool | ExtractMetallicAndSmoothness [get] |
Properties inherited from TriLibCore.Mappers.MaterialMapper | |
static List< string > | RegisteredMappers [get] |
Default Material Mappers list. | |
static List< string > | RegisteredMapperNamespaces [get] |
Default Material Mappers namespace list. | |
virtual bool | ExtractMetallicAndSmoothness = true [get] |
Turn off this field to disable metallic and smoothness textures extraction. | |
virtual Material | MaterialPreset [get] |
Standard Material preset to instantiate. | |
virtual Material | CutoutMaterialPreset [get] |
Cutout material preset. | |
virtual Material | TransparentMaterialPreset [get] |
Transparent (alpha) material preset. | |
virtual Material | TransparentComposeMaterialPreset [get] |
Compose (secondary) material preset to use when AssetLoaderOptions.AlphaMaterialMode is set to CutoutAndTransparent. | |
virtual Material | MaterialPresetNoMetallicTexture [get] |
virtual Material | CutoutMaterialPresetNoMetallicTexture [get] |
virtual Material | TransparentMaterialPresetNoMetallicTexture [get] |
virtual Material | TransparentComposeMaterialPresetNoMetallicTexture [get] |
virtual Material | SpecularMaterialPreset [get] |
virtual Material | SpecularCutoutMaterialPreset [get] |
virtual Material | SpecularTransparentMaterialPreset [get] |
virtual Material | SpecularTransparentComposeMaterialPreset [get] |
virtual Material | AutodeskMaterialPreset [get] |
virtual Material | AutodeskCutoutMaterialPreset [get] |
virtual Material | AutodeskTransparentMaterialPreset [get] |
virtual Material | AutodeskTransparentComposeMaterialPreset [get] |
virtual Material | LoadingMaterial [get] |
Gets the loading Material preset for this Mapper. | |
Additional Inherited Members | |
Public Attributes inherited from TriLibCore.Mappers.MaterialMapper | |
bool | ForceStandardMaterial = false |
Force the usage of the Standard Material preset? | |
int | CheckingOrder |
Priority when testing the compatibility of this Mapper. Lower priority Mappers will be tested later. | |
Static Public Attributes inherited from TriLibCore.Mappers.MaterialMapper | |
static Action< TextureLoadingContext > | CreateTextureCallback |
static Action< TextureLoadingContext > | LoadTextureCallback |
static Action< TextureLoadingContext > | ScanForAlphaPixelsCallback |
static Action< TextureLoadingContext > | ApplyTextureCallback |
static Action< TextureLoadingContext > | FixNPOTTextureCallback |
static Action< TextureLoadingContext > | FixNormalMapCallback |
static Action< TextureLoadingContext > | PostProcessTextureCallback |
The method to call when the Mapper has to post-process a Texture data. | |
Protected Member Functions inherited from TriLibCore.Mappers.MaterialMapper | |
void | LoadTextureWithCallbacks (MaterialMapperContext materialMapperContext, TextureType textureType, ITexture texture, params Action< TextureLoadingContext >[] onTextureProcessed) |
Loads a Texture using callbacks to be called on the main Thread later. | |
void | BuildMaterial (MaterialMapperContext materialMapperContext) |
Creates the final Unity Material using the given context data. | |
Static Protected Member Functions inherited from TriLibCore.Mappers.MaterialMapper | |
static void | CheckTextureOffsetAndScaling (TextureLoadingContext textureLoadingContext) |
Applies the Texture scaling and offset, when applicable. | |
static void | CheckTextureOffsetAndScaling (MaterialMapperContext materialMapperContext, ITexture texture, bool textureLoaded) |
Represents a Material Mapper that converts TriLib Materials into Unity Standard Materials.
|
virtual |
Gets the Diffuse Color Property name.
materialMapperContext | The source Material Mapper Context, containing the Virtual Material and Unity Material. |
Reimplemented from TriLibCore.Mappers.MaterialMapper.
|
virtual |
Gets the Diffuse Texture Property name.
materialMapperContext | The source Material Mapper Context, containing the Virtual Material and Unity Material. |
Reimplemented from TriLibCore.Mappers.MaterialMapper.
|
virtual |
Gets the Emission Color Property name.
materialMapperContext | The source Material Mapper Context, containing the Virtual Material and Unity Material. |
Reimplemented from TriLibCore.Mappers.MaterialMapper.
|
virtual |
Gets the Glossiness or Roughness Property name.
materialMapperContext | The source Material Mapper Context, containing the Virtual Material and Unity Material. |
Reimplemented from TriLibCore.Mappers.MaterialMapper.
|
virtual |
Gets the Glossiness or Roughness Texture Property name.
materialMapperContext | The source Material Mapper Context, containing the Virtual Material and Unity Material. |
Reimplemented from TriLibCore.Mappers.MaterialMapper.
|
virtual |
Gets the Metallic Property name.
materialMapperContext | The source Material Mapper Context, containing the Virtual Material and Unity Material. |
Reimplemented from TriLibCore.Mappers.MaterialMapper.
|
virtual |
Gets the Metallic Texture Property name.
materialMapperContext | The source Material Mapper Context, containing the Virtual Material and Unity Material. |
Reimplemented from TriLibCore.Mappers.MaterialMapper.
|
virtual |
Determines whether this Mapper is compatible with the given Material Renderer Context.
materialMapperContext | The source Material Mapper Context, containing the Virtual Material and Unity Material. |
true
if this Mapper is compatible with the given Material Renderer Context, otherwise, false
.Reimplemented from TriLibCore.Mappers.MaterialMapper.
|
virtual |
Starts the mapping process, comparing the Mapper Properties against the source Material ones.
materialMapperContext | The source Material Mapper Context, containing the Virtual Material and Unity Material. |
Reimplemented from TriLibCore.Mappers.MaterialMapper.