unreal.MaterialInstanceDynamic

class unreal.MaterialInstanceDynamic(outer=None, name='None')

Bases: unreal.MaterialInstance

Material Instance Dynamic

C++ Source:

  • Module: Engine

  • File: MaterialInstanceDynamic.h

Editor Properties: (see get_editor_property/set_editor_property)

  • asset_import_data (AssetImportData): [Read-Write] Importing data and options used for this material

  • asset_user_data (Array(AssetUserData)): [Read-Write] Array of user data stored with the asset

  • base_property_overrides (MaterialInstanceBasePropertyOverrides): [Read-Write] Base Property Overrides

  • font_parameter_values (Array(FontParameterValue)): [Read-Write] Font parameters.

  • lightmass_settings (LightmassMaterialInterfaceSettings): [Read-Write] The Lightmass settings for this object.

  • override_subsurface_profile (bool): [Read-Write] Defines if SubsurfaceProfile from this instance is used or it uses the parent one.

  • parent (MaterialInterface): [Read-Write] Parent material.

  • phys_material (PhysicalMaterial): [Read-Write] Physical material to use for this graphics material. Used for sounds, effects etc.

  • physical_material_map (PhysicalMaterial): [Read-Write] Physical material map used with physical material mask, when it exists.

  • preview_mesh (SoftObjectPath): [Read-Write] The mesh used by the material editor to preview the material.

  • runtime_virtual_texture_parameter_values (Array(RuntimeVirtualTextureParameterValue)): [Read-Write] RuntimeVirtualTexture parameters.

  • scalar_parameter_values (Array(ScalarParameterValue)): [Read-Write] Scalar parameters.

  • subsurface_profile (SubsurfaceProfile): [Read-Write] SubsurfaceProfile, for Screen Space Subsurface Scattering

  • texture_parameter_values (Array(TextureParameterValue)): [Read-Write] Texture parameters.

  • thumbnail_info (ThumbnailInfo): [Read-Only] Information for thumbnail rendering

  • vector_parameter_values (Array(VectorParameterValue)): [Read-Write] Vector parameters.

copy_material_instance_parameters(source, quick_parameters_only=False)None

Copies over parameters given a material interface (copy each instance following the hierarchy) Very slow implementation, avoid using at runtime. Hopefully we can replace it later with something like CopyInterpParameters() The output is the object itself (this). Copying ‘quick parameters only’ will result in a much faster copy process but will only copy dynamic scalar, vector and texture parameters on clients.

Parameters
  • source (MaterialInterface) –

  • quick_parameters_only (bool) – Copy scalar, vector and texture parameters only. Much faster but may not include required data

copy_parameter_overrides(material_instance)None

Copy parameter values from another material instance. This will copy only parameters explicitly overridden in that material instance!!

Parameters

material_instance (MaterialInstance) –

get_scalar_parameter_value(parameter_name)float

Get the current scalar (float) parameter value from an MID

Parameters

parameter_name (Name) –

Returns

Return type

float

get_scalar_parameter_value_by_info(parameter_info)float

Get the current scalar (float) parameter value from an MID, using MPI (to allow access to layer parameters)

Parameters

parameter_info (MaterialParameterInfo) –

Returns

Return type

float

get_texture_parameter_value(parameter_name)Texture

Get the current MID texture parameter value

Parameters

parameter_name (Name) –

Returns

Return type

Texture

get_texture_parameter_value_by_info(parameter_info)Texture

Get the current MID texture parameter value, using MPI (to allow access to layer parameters)

Parameters

parameter_info (MaterialParameterInfo) –

Returns

Return type

Texture

get_vector_parameter_value(parameter_name)LinearColor

Get the current MID vector parameter value

Parameters

parameter_name (Name) –

Returns

Return type

LinearColor

get_vector_parameter_value_by_info(parameter_info)LinearColor

Get the current MID vector parameter value, using MPI (to allow access to layer parameters)

Parameters

parameter_info (MaterialParameterInfo) –

Returns

Return type

LinearColor

interpolate_material_instance_parameters(source_a, source_b, alpha)None

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). Supports the case SourceA==this || SourceB==this Both material have to be from the same base material

Parameters
  • source_a (MaterialInstance) – value that is used for Alpha=0, silently ignores the case if 0

  • source_b (MaterialInstance) – value that is used for Alpha=1, silently ignores the case if 0

  • alpha (float) – usually in the range 0..1, values outside the range extrapolate

set_scalar_parameter_value(parameter_name, value)None

Set a MID scalar (float) parameter value

Parameters
  • parameter_name (Name) –

  • value (float) –

set_scalar_parameter_value_by_info(parameter_info, value)None

Set a MID scalar (float) parameter value using MPI (to allow access to layer parameters)

Parameters
set_texture_parameter_value(parameter_name, value)None

Set an MID texture parameter value

Parameters
set_texture_parameter_value_by_info(parameter_info, value)None

Set an MID texture parameter value using MPI (to allow access to layer parameters)

Parameters
set_vector_parameter_value(parameter_name, value)None

Set an MID vector parameter value

Parameters
set_vector_parameter_value_by_info(parameter_info, value)None

Set an MID vector parameter value, using MPI (to allow access to layer parameters)

Parameters