unreal.Material

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

Bases: unreal.MaterialInterface

A Material is an asset which can be applied to a mesh to control the visual look of the scene. When light from the scene hits the surface, the shading model of the material is used to calculate how that light interacts with the surface.

Warning: Creating new materials directly increases shader compile times! Consider creating a Material Instance off of an existing material instead.

C++ Source:

  • Module: Engine
  • File: Material.h

Editor Properties: (see get_editor_property/set_editor_property)

  • allow_negative_emissive_color (bool): [Read-Write] Whether the material should allow outputting negative emissive color values. Only allowed on unlit materials.
  • allow_translucent_custom_depth_writes (bool): [Read-Write] Allows a translucent material to be used with custom depth writing by compiling additional shaders.
  • 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
  • automatically_set_usage_in_editor (bool): [Read-Write] Whether to automatically set usage flags based on what the material is applied to in the editor. It can be useful to disable this on a base material with many instances, where adding another usage flag accidentally (eg bUsedWithSkeletalMeshes) can add a lot of shader permutations.
  • blend_mode (BlendMode): [Read-Write] Determines how the material’s color is blended with background colors.
  • blendable_location (BlendableLocation): [Read-Write] Where the node is inserted in the (post processing) graph, only used if domain is PostProcess
  • blendable_output_alpha (bool): [Read-Write] If this is enabled, the blendable will output alpha
  • blendable_priority (int32): [Read-Write] If multiple nodes with the same type are inserted at the same point, this defined order and if they get combined, only used if domain is PostProcess
  • block_gi (bool): [Read-Write] If enabled, the material’s opacity defines how much GI is blocked when using the LightPropagationVolume feature
  • cast_dynamic_shadow_as_masked (bool): [Read-Write] If true, translucent materials will cast dynamic shadows according to their opacity. OpacityMaskClipValue is used as the threshold value.
  • compute_fog_per_pixel (bool): [Read-Write] When true, translucent materials have fog computed for every pixel, which costs more but fixes artifacts due to low tessellation.
  • contact_shadows (bool): [Read-Write] Contact shadows on translucency
  • d3d11_tessellation_mode (MaterialTessellationMode): [Read-Write] The type of tessellation to apply to this object. Note D3D11 required for anything except MTM_NoTessellation.
  • decal_blend_mode (DecalBlendMode): [Read-Write] Defines how the GBuffer chanels are getting manipulated by a decal material pass. (only with MaterialDomain == MD_DeferredDecal)
  • disable_depth_test (bool): [Read-Write] Whether to draw on top of opaque pixels even if behind them. This only has meaning for translucency.
  • dither_opacity_mask (bool): [Read-Write] Dither opacity mask. When combined with Temporal AA this can be used as a form of limited translucency which supports all lighting features.
  • dithered_lod_transition (bool): [Read-Write] Whether meshes rendered with the material should support dithered LOD transitions.
  • enable_adaptive_tessellation (bool): [Read-Write] Enables adaptive tessellation, which tries to maintain a uniform number of pixels per triangle.
  • enable_crack_free_displacement (bool): [Read-Write] Prevents cracks in the surface of the mesh when using tessellation.
  • enable_mobile_separate_translucency (bool): [Read-Write] Indicates that the translucent material should not be affected by bloom or DOF. (Note: Depth testing is not available)
  • enable_responsive_aa (bool): [Read-Write] Indicates that the material should be rendered using responsive anti-aliasing. Improves sharpness of small moving particles such as sparks. Only use for small moving features because it will cause aliasing of the background.
  • enable_separate_translucency (bool): [Read-Write] Indicates that the material should be rendered in the SeparateTranslucency Pass (not affected by DOF, requires bAllowSeparateTranslucency to be set in .ini).
  • fully_rough (bool): [Read-Write] Forces the material to be completely rough. Saves a number of instructions and one sampler.
  • generate_spherical_particle_normals (bool): [Read-Write] Whether to generate spherical normals for particles that use this material.
  • lightmass_settings (LightmassMaterialInterfaceSettings): [Read-Write] The Lightmass settings for this object.
  • material_decal_response (MaterialDecalResponse): [Read-Write] Defines how the material reacts on DBuffer decals (Affects look, performance and texture/sample usage). Non DBuffer Decals can be disabled on the primitive (e.g. static mesh)
  • material_domain (MaterialDomain): [Read-Write] The domain that the material’s attributes will be evaluated in. Certain pieces of material functionality are only valid in certain domains, for example vertex normal is only valid on a surface.
  • max_displacement (float): [Read-Write] Max Displacement
  • normal_curvature_to_roughness (bool): [Read-Write] Reduce roughness based on screen space normal changes.
  • num_customized_u_vs (int32): [Read-Write] Number of customized UV inputs to display. Unconnected customized UV inputs will just pass through the vertex UVs.
  • opacity_mask_clip_value (float): [Read-Write] If BlendMode is BLEND_Masked, the surface is not rendered where OpacityMask < OpacityMaskClipValue.
  • output_velocity_on_base_pass (bool): [Read-Write] Skips outputting velocity during the base pass.
  • parameter_group_data (Array(ParameterGroupData)): [Read-Write] Controls where this parameter group is displayed in a material instance parameter list. The lower the number the higher up in the parameter list.
  • phys_material (PhysicalMaterial): [Read-Write] Physical material to use for this graphics material. Used for sounds, effects etc.
  • preview_mesh (SoftObjectPath): [Read-Write] The mesh used by the material editor to preview the material.
  • refraction_depth_bias (float): [Read-Write] This is the refraction depth bias, larger values offset distortion to prevent closer objects from rendering into the distorted surface at acute viewing angles but increases the disconnect between surface and where the refraction starts.
  • refraction_mode (RefractionMode): [Read-Write] Controls how the Refraction input is interpreted and how the refraction offset into scene color is computed for this material.
  • screen_space_reflections (bool): [Read-Write] SSR on translucency
  • shading_model (MaterialShadingModel): [Read-Write] Determines how inputs are combined to create the material’s final color.
  • subsurface_profile (SubsurfaceProfile): [Read-Write] SubsurfaceProfile, for Screen Space Subsurface Scattering
  • tangent_space_normal (bool): [Read-Write] Whether the material takes a tangent space normal or a world space normal as input. (TangentSpace requires extra instructions but is often more convenient).
  • thumbnail_info (ThumbnailInfo): [Read-Only] Information for thumbnail rendering
  • translucency_directional_lighting_intensity (float): [Read-Write] Useful for artificially increasing the influence of the normal on the lighting result for translucency. A value larger than 1 increases the influence of the normal, a value smaller than 1 makes the lighting more ambient.
  • translucency_lighting_mode (TranslucencyLightingMode): [Read-Write] Sets the lighting mode that will be used on this material if it is translucent.
  • translucent_backscattering_exponent (float): [Read-Write] Controls how diffuse the material’s backscattering is when using the MSM_Subsurface shading model. Larger exponents give a less diffuse look (smaller, brighter backscattering highlight). This is only used when the object is casting a volumetric translucent shadow from a directional light.
  • translucent_multiple_scattering_extinction (LinearColor): [Read-Write] Colored extinction factor used to approximate multiple scattering in dense volumes. This is only used when the object is casting a volumetric translucent shadow.
  • translucent_self_shadow_density_scale (float): [Read-Write] Scale used to make translucent self-shadowing more or less opaque than the material’s shadow on other objects. This is only used when the object is casting a volumetric translucent shadow.
  • translucent_self_shadow_second_density_scale (float): [Read-Write] Used to make a second self shadow gradient, to add interesting shading in the shadow of the first.
  • translucent_self_shadow_second_opacity (float): [Read-Write] Controls the strength of the second self shadow gradient.
  • translucent_shadow_density_scale (float): [Read-Write] Scale used to make translucent shadows more or less opaque than the material’s actual opacity.
  • translucent_shadow_start_offset (float): [Read-Write] Local space distance to bias the translucent shadow. Positive values move the shadow away from the light.
  • two_sided (bool): [Read-Write] Indicates that the material should be rendered without backface culling and the normal should be flipped for backfaces.
  • use_emissive_for_dynamic_area_lighting (bool): [Read-Write] If enabled, the material’s emissive colour is injected into the LightPropagationVolume
  • use_full_precision (bool): [Read-Write] Forces this material to use full (highp) precision in the pixel shader. This is slower than the default (mediump) but can be used to work around precision-related rendering errors. This setting has no effect on older mobile devices that do not support high precision.
  • use_hq_forward_reflections (bool): [Read-Write] * Forward renderer: enables multiple parallax-corrected reflection captures that blend together. * Mobile renderer: blend between nearest 3 reflection captures, but reduces the number of samplers available to the material as two more samplers will be used for reflection cubemaps.
  • use_lightmap_directionality (bool): [Read-Write] Use lightmap directionality and per pixel normals. If disabled, lighting from lightmaps will be flat but cheaper.
  • use_material_attributes (bool): [Read-Write] when true, the material attributes pin is used instead of the regular pins.
  • use_planar_forward_reflections (bool): [Read-Write] Enables planar reflection when using the forward renderer or mobile. Enabling this setting reduces the number of samplers available to the material as one more sampler will be used for the planar reflection.
  • use_translucency_vertex_fog (bool): [Read-Write] When true, translucent materials are fogged. Defaults to true.
  • used_with_beam_trails (bool): [Read-Write] Indicates that the material and its instances can be use with beam trails This will result in the shaders required to support beam trails being compiled which will increase shader compile time and memory usage.
  • used_with_clothing (bool): [Read-Write] Indicates that the material and its instances can be use with clothing This will result in the shaders required to support clothing being compiled which will increase shader compile time and memory usage.
  • used_with_editor_compositing (bool): [Read-Write] Indicates that the material and its instances can be use with editor compositing This will result in the shaders required to support editor compositing being compiled which will increase shader compile time and memory usage.
  • used_with_geometry_cache (bool): [Read-Write] Used with Geometry Cache
  • used_with_instanced_static_meshes (bool): [Read-Write] Indicates that the material and its instances can be use with instanced static meshes This will result in the shaders required to support instanced static meshes being compiled which will increase shader compile time and memory usage.
  • used_with_mesh_particles (bool): [Read-Write] Indicates that the material and its instances can be use with mesh particles This will result in the shaders required to support mesh particles being compiled which will increase shader compile time and memory usage.
  • used_with_morph_targets (bool): [Read-Write] Indicates that the material and its instances can be use with morph targets This will result in the shaders required to support morph targets being compiled which will increase shader compile time and memory usage.
  • used_with_niagara_mesh_particles (bool): [Read-Write] Used with Niagara Mesh Particles
  • used_with_niagara_ribbons (bool): [Read-Write] Used with Niagara Ribbons
  • used_with_niagara_sprites (bool): [Read-Write] Indicates that the material and its instances can be use with Niagara sprites (meshes and ribbons, respectively) This will result in the shaders required to support Niagara sprites being compiled which will increase shader compile time and memory usage.
  • used_with_particle_sprites (bool): [Read-Write] Indicates that the material and its instances can be use with particle sprites This will result in the shaders required to support particle sprites being compiled which will increase shader compile time and memory usage.
  • used_with_skeletal_mesh (bool): [Read-Write] Indicates that the material and its instances can be use with skeletal meshes. This will result in the shaders required to support skeletal meshes being compiled which will increase shader compile time and memory usage.
  • used_with_spline_meshes (bool): [Read-Write] Indicates that the material and its instances can be use with spline meshes This will result in the shaders required to support spline meshes being compiled which will increase shader compile time and memory usage.
  • used_with_static_lighting (bool): [Read-Write] Indicates that the material and its instances can be use with static lighting This will result in the shaders required to support static lighting being compiled which will increase shader compile time and memory usage.
  • wireframe (bool): [Read-Write] Enables a wireframe view of the mesh the material is applied to.
  • write_only_alpha (bool): [Read-Write] Whether the transluency pass should write its alpha, and only the alpha, into the framebuffer
automatically_set_usage_in_editor

(bool) – [Read-Only] Whether to automatically set usage flags based on what the material is applied to in the editor. It can be useful to disable this on a base material with many instances, where adding another usage flag accidentally (eg bUsedWithSkeletalMeshes) can add a lot of shader permutations.

blend_mode

(BlendMode) – [Read-Only] Determines how the material’s color is blended with background colors.

blendable_location

(BlendableLocation) – [Read-Write] Where the node is inserted in the (post processing) graph, only used if domain is PostProcess

blendable_output_alpha

(bool) – [Read-Write] If this is enabled, the blendable will output alpha

blendable_priority

(int32) – [Read-Write] If multiple nodes with the same type are inserted at the same point, this defined order and if they get combined, only used if domain is PostProcess

block_gi

(bool) – [Read-Write] If enabled, the material’s opacity defines how much GI is blocked when using the LightPropagationVolume feature

d3d11_tessellation_mode

(MaterialTessellationMode) – [Read-Only] The type of tessellation to apply to this object. Note D3D11 required for anything except MTM_NoTessellation.

enable_adaptive_tessellation

(bool) – [Read-Only] Enables adaptive tessellation, which tries to maintain a uniform number of pixels per triangle.

enable_crack_free_displacement

(bool) – [Read-Only] Prevents cracks in the surface of the mesh when using tessellation.

fully_rough

(bool) – [Read-Only] Forces the material to be completely rough. Saves a number of instructions and one sampler.

material_decal_response

(MaterialDecalResponse) – [Read-Only] Defines how the material reacts on DBuffer decals (Affects look, performance and texture/sample usage). Non DBuffer Decals can be disabled on the primitive (e.g. static mesh)

material_domain

(MaterialDomain) – [Read-Only] The domain that the material’s attributes will be evaluated in. Certain pieces of material functionality are only valid in certain domains, for example vertex normal is only valid on a surface.

normal_curvature_to_roughness

(bool) – [Read-Only] Reduce roughness based on screen space normal changes.

use_emissive_for_dynamic_area_lighting

(bool) – [Read-Write] If enabled, the material’s emissive colour is injected into the LightPropagationVolume

use_full_precision

(bool) – [Read-Only] Forces this material to use full (highp) precision in the pixel shader. This is slower than the default (mediump) but can be used to work around precision-related rendering errors. This setting has no effect on older mobile devices that do not support high precision.

use_hq_forward_reflections

**(bool)* – [Read-Only] * Forward renderer* – enables multiple parallax-corrected reflection captures that blend together. * Mobile renderer: blend between nearest 3 reflection captures, but reduces the number of samplers available to the material as two more samplers will be used for reflection cubemaps.

use_lightmap_directionality

(bool) – [Read-Only] Use lightmap directionality and per pixel normals. If disabled, lighting from lightmaps will be flat but cheaper.

use_planar_forward_reflections

(bool) – [Read-Only] Enables planar reflection when using the forward renderer or mobile. Enabling this setting reduces the number of samplers available to the material as one more sampler will be used for the planar reflection.

used_with_beam_trails

(bool) – [Read-Only] Indicates that the material and its instances can be use with beam trails This will result in the shaders required to support beam trails being compiled which will increase shader compile time and memory usage.

used_with_clothing

(bool) – [Read-Only] Indicates that the material and its instances can be use with clothing This will result in the shaders required to support clothing being compiled which will increase shader compile time and memory usage.

used_with_editor_compositing

(bool) – [Read-Only] Indicates that the material and its instances can be use with editor compositing This will result in the shaders required to support editor compositing being compiled which will increase shader compile time and memory usage.

used_with_geometry_cache

(bool) – [Read-Only] Used with Geometry Cache

used_with_instanced_static_meshes

(bool) – [Read-Only] Indicates that the material and its instances can be use with instanced static meshes This will result in the shaders required to support instanced static meshes being compiled which will increase shader compile time and memory usage.

used_with_mesh_particles

(bool) – [Read-Only] Indicates that the material and its instances can be use with mesh particles This will result in the shaders required to support mesh particles being compiled which will increase shader compile time and memory usage.

used_with_morph_targets

(bool) – [Read-Only] Indicates that the material and its instances can be use with morph targets This will result in the shaders required to support morph targets being compiled which will increase shader compile time and memory usage.

used_with_niagara_mesh_particles

(bool) – [Read-Only] Used with Niagara Mesh Particles

used_with_niagara_ribbons

(bool) – [Read-Only] Used with Niagara Ribbons

used_with_niagara_sprites

(bool) – [Read-Only] Indicates that the material and its instances can be use with Niagara sprites (meshes and ribbons, respectively) This will result in the shaders required to support Niagara sprites being compiled which will increase shader compile time and memory usage.

used_with_particle_sprites

(bool) – [Read-Only] Indicates that the material and its instances can be use with particle sprites This will result in the shaders required to support particle sprites being compiled which will increase shader compile time and memory usage.

used_with_skeletal_mesh

(bool) – [Read-Only] Indicates that the material and its instances can be use with skeletal meshes. This will result in the shaders required to support skeletal meshes being compiled which will increase shader compile time and memory usage.

used_with_spline_meshes

(bool) – [Read-Only] Indicates that the material and its instances can be use with spline meshes This will result in the shaders required to support spline meshes being compiled which will increase shader compile time and memory usage.

used_with_static_lighting

(bool) – [Read-Only] Indicates that the material and its instances can be use with static lighting This will result in the shaders required to support static lighting being compiled which will increase shader compile time and memory usage.