Navigation
Unreal Engine C++ API Reference > Runtime > Engine > Materials
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UMaterialInterface
- UMaterialInstance
- UMaterialInstanceDynamic
References
Module | Engine |
Header | /Engine/Source/Runtime/Engine/Classes/Materials/MaterialInstanceDynamic.h |
Include | #include "Materials/MaterialInstanceDynamic.h" |
Syntax
UCLASS (HideCategories=Object, CollapseCategories, BlueprintType, MinimalAPI)
class UMaterialInstanceDynamic : public UMaterialInstance
Variables
Type | Name | Description | |
---|---|---|---|
![]() |
TMap< FName, TArray< FName > > | RenamedTextures | In order to remap to the correct texture streaming data, we must keep track of each texture renamed. |
Constructors
Type | Name | Description | |
---|---|---|---|
![]() |
UMaterialInstanceDynamic
(
const FObjectInitializer& ObjectInitializer |
Functions
Type | Name | Description | |
---|---|---|---|
![]() |
void | Remove all parameter values | |
![]() ![]() ![]() |
void | CopyInterpParameters
(
UMaterialInstance* Source |
Copies over parameters given a material instance (only copy from the instance, not following the hierarchy) much faster than K2_CopyMaterialInstanceParameters(), The output is the object itself (this). |
![]() |
void | CopyMaterialUniformParameters
(
UMaterialInterface* Source |
Copies the uniform parameters (scalar, vector and texture) from a material or instance hierarchy. |
![]() ![]() ![]() |
void | CopyParameterOverrides
(
UMaterialInstance* MaterialInstance |
Copy parameter values from another material instance. |
![]() |
void | CopyScalarAndVectorParameters
(
const UMaterialInterface& SourceMaterialToCopyFrom, |
Copy all interpolatable (scalar/vector) parameters from *SourceMaterialToCopyFrom to *this, using the current QualityLevel and given FeatureLevel For runtime use. |
![]() ![]() |
UMaterialInstanceDynamic * | Create
(
UMaterialInterface* ParentMaterial, |
Create a material instance dynamic parented to the specified material. [Optional] Specify name. |
![]() |
void | InitializeMID
(
UMaterialInterface* ParentMaterial |
|
![]() ![]() ![]() |
bool | InitializeScalarParameterAndGetIndex
(
const FName& ParameterName, |
Use this function to set an initial value and fetch the index for use in SetScalarParameterByIndex. |
![]() |
bool | InitializeVectorParameterAndGetIndex
(
const FName& ParameterName, |
Use this function to set an initial value and fetch the index for use in the following function. |
![]() ![]() ![]() |
void | K2_CopyMaterialInstanceParameters
(
UMaterialInterface* Source, |
Copies over parameters given a material interface (copy each instance following the hierarchy) Very slow implementation, avoid using at runtime. |
![]() ![]() ![]() |
float | K2_GetScalarParameterValue
(
FName ParameterName |
Get the current scalar (float) parameter value from an MID |
![]() ![]() ![]() |
float | K2_GetScalarParameterValueByInfo
(
const FMaterialParameterInfo& ParameterInfo |
Get the current scalar (float) parameter value from an MID, using MPI (to allow access to layer parameters) |
![]() ![]() ![]() |
UTexture * | K2_GetTextureParameterValue
(
FName ParameterName |
Get the current MID texture parameter value |
![]() ![]() ![]() |
UTexture * | K2_GetTextureParameterValueByInfo
(
const FMaterialParameterInfo& ParameterInfo |
Get the current MID texture parameter value, using MPI (to allow access to layer parameters) |
![]() ![]() ![]() |
FLinearColor | K2_GetVectorParameterValue
(
FName ParameterName |
Get the current MID vector parameter value |
![]() ![]() ![]() |
FLinearColor | K2_GetVectorParameterValueByInfo
(
const FMaterialParameterInfo& ParameterInfo |
Get the current MID vector parameter value, using MPI (to allow access to layer parameters) |
![]() ![]() ![]() |
void | K2_InterpolateMaterialInstanceParams
(
UMaterialInstance* SourceA, |
Interpolates the scalar and vector parameters of this material instance based on two other material instances, and an alpha blending factor The output is the object itself (this). |
![]() ![]() ![]() |
void | SetDoubleVectorParameterValue
(
FName ParameterName, |
Set an MID vector parameter value |
![]() |
void | SetFontParameterValue
(
const FMaterialParameterInfo& ParameterInfo, |
Set the value of the given font parameter. |
![]() |
void | SetNaniteOverride
(
UMaterialInterface* InMaterial |
|
![]() ![]() ![]() |
void | SetRuntimeVirtualTextureParameterValue
(
FName ParameterName, |
Set an MID texture parameter value |
![]() ![]() ![]() |
void | SetRuntimeVirtualTextureParameterValueByInfo
(
const FMaterialParameterInfo& ParameterInfo, |
Set an MID texture parameter value using MPI (to allow access to layer parameters) |
![]() ![]() ![]() |
bool | SetScalarParameterByIndex
(
int32 ParameterIndex, |
Use the cached value of OutParameterIndex from InitializeScalarParameterAndGetIndex to set the scalar parameter ONLY on the exact same MID. |
![]() ![]() ![]() |
void | SetScalarParameterValue
(
FName ParameterName, |
Set a MID scalar (float) parameter value |
![]() ![]() ![]() |
void | SetScalarParameterValueByInfo
(
const FMaterialParameterInfo& ParameterInfo, |
Set a MID scalar (float) parameter value using MPI (to allow access to layer parameters) |
![]() ![]() ![]() |
void | SetSparseVolumeTextureParameterValue
(
FName ParameterName, |
Set an MID texture parameter value |
![]() ![]() ![]() |
void | SetTextureParameterValue
(
FName ParameterName, |
Set an MID texture parameter value |
![]() ![]() ![]() |
void | SetTextureParameterValueByInfo
(
const FMaterialParameterInfo& ParameterInfo, |
Set an MID texture parameter value using MPI (to allow access to layer parameters) |
![]() |
bool | SetVectorParameterByIndex
(
int32 ParameterIndex, |
Use the cached value of OutParameterIndex above to set the vector parameter ONLY on the exact same MID. |
![]() ![]() ![]() |
void | SetVectorParameterValue
(
FName ParameterName, |
Set an MID vector parameter value |
![]() |
void | SetVectorParameterValue
(
FName ParameterName, |
Conveniences to keep general FLinearColor constructors explicit without adding extra burden to existing users of this function (where the conversion is straightforward). |
![]() |
void | SetVectorParameterValue
(
FName ParameterName, |
|
![]() ![]() ![]() |
void | SetVectorParameterValueByInfo
(
const FMaterialParameterInfo& ParameterInfo, |
Set an MID vector parameter value, using MPI (to allow access to layer parameters) |
![]() |
void | SetVectorParameterValueByInfo
(
const FMaterialParameterInfo& ParameterInfo, |
|
![]() |
void | SetVectorParameterValueByInfo
(
const FMaterialParameterInfo& ParameterInfo, |
Overridden from UMaterialInstance
Type | Name | Description | |
---|---|---|---|
![]() ![]() ![]() |
bool | ||
![]() ![]() |
void |
Overridden from UMaterialInterface
Type | Name | Description | |
---|---|---|---|
![]() ![]() ![]() |
EBlendMode | GetBlendMode () |
|
![]() ![]() ![]() |
bool | ||
![]() ![]() ![]() |
FDisplacementScaling | ||
![]() ![]() ![]() |
float | ||
![]() ![]() ![]() |
float | Material base property overrides. MIDs cannot override these so they just grab from their parent. | |
![]() ![]() ![]() |
FMaterialShadingModelField | ||
![]() ![]() ![]() |
float | GetTextureDensity
(
FName TextureName, |
This overrides does the remapping before looking at the parent data. |
![]() ![]() ![]() |
bool | ||
![]() ![]() ![]() |
bool | ||
![]() ![]() ![]() |
bool | IsMasked () |
|
![]() ![]() ![]() |
bool | ||
![]() ![]() ![]() |
bool | ||
![]() ![]() ![]() |
bool | ||
![]() ![]() ![]() |
bool | IsTwoSided () |