unreal.Texture

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

Bases: unreal.StreamableRenderAsset

C++ Source:

  • Module: Engine

  • File: Texture.h

Editor Properties: (see get_editor_property/set_editor_property)

  • adjust_brightness (float): [Read-Write] Adjust Brightness: Static texture brightness adjustment (scales HSV value.) (Non-destructive; Requires texture source art to be available.)

  • adjust_brightness_curve (float): [Read-Write] Adjust Brightness Curve: Static texture curve adjustment (raises HSV value to the specified power.) (Non-destructive; Requires texture source art to be available.)

  • adjust_hue (float): [Read-Write] Adjust Hue: Static texture hue adjustment (0 - 360) (offsets HSV hue by value in degrees.) (Non-destructive; Requires texture source art to be available.)

  • adjust_max_alpha (float): [Read-Write] Adjust Max Alpha: Remaps the alpha to the specified min/max range, defines the new value of 1 (Non-destructive; Requires texture source art to be available.)

  • adjust_min_alpha (float): [Read-Write] Adjust Min Alpha: Remaps the alpha to the specified min/max range, defines the new value of 0 (Non-destructive; Requires texture source art to be available.)

  • adjust_rgb_curve (float): [Read-Write] Adjust RGBCurve: Static texture RGB curve adjustment (raises linear-space RGB color to the specified power.) (Non-destructive; Requires texture source art to be available.)

  • adjust_saturation (float): [Read-Write] Adjust Saturation: Static texture saturation adjustment (scales HSV saturation.) (Non-destructive; Requires texture source art to be available.)

  • adjust_vibrance (float): [Read-Write] Adjust Vibrance: Static texture “vibrance” adjustment (0 - 1) (HSV saturation algorithm adjustment.) (Non-destructive; Requires texture source art to be available.)

  • alpha_coverage_thresholds (Vector4): [Read-Write] Alpha Coverage Thresholds: Alpha values per channel to compare to when preserving alpha coverage. 0 means disable channel. Typical good values in 0.5 - 0.9, not 1.0

  • asset_import_data (AssetImportData): [Read-Only] Asset Import Data

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

  • chroma_key_color (Color): [Read-Write] Chroma Key Color: The color that will be replaced with transparent black if chroma keying is enabled

  • chroma_key_texture (bool): [Read-Write] Chroma Key Texture: Whether to chroma key the image, replacing any pixels that match ChromaKeyColor with transparent black

  • chroma_key_threshold (float): [Read-Write] Chroma Key Threshold: The threshold that components have to match for the texel to be considered equal to the ChromaKeyColor when chroma keying (<=, set to 0 to require a perfect exact match)

  • composite_power (float): [Read-Write] Composite Power: default 1, high values result in a stronger effect e.g 1, 2, 4, 8 this is no slider because the texture update would not be fast enough

  • composite_texture (Texture): [Read-Write] Composite Texture: Can be defined to modify the roughness based on the normal map variation (mostly from mip maps). MaxAlpha comes in handy to define a base roughness if no source alpha was there. Make sure the normal map has at least as many mips as this texture.

  • composite_texture_mode (CompositeTextureMode): [Read-Write] Composite Texture Mode: defines how the CompositeTexture is applied, e.g. CTM_RoughnessFromNormalAlpha

  • compression_no_alpha (bool): [Read-Write] Compression No Alpha: If enabled, the texture’s alpha channel will be discarded during compression

  • compression_quality (TextureCompressionQuality): [Read-Write] Compression Quality: The compression quality for generated ASTC textures (i.e. mobile platform textures).

  • compression_settings (TextureCompressionSettings): [Read-Write] Compression Settings: Compression settings to use when building the texture.

  • defer_compression (bool): [Read-Write] Defer Compression: If enabled, defer compression of the texture until save or manually compressed in the texture editor.

  • dither_mip_map_alpha (bool): [Read-Write] Dither Mip Map Alpha: When true, the alpha channel of mip-maps and the base image are dithered for smooth LOD transitions.

  • do_scale_mips_for_alpha_coverage (bool): [Read-Write] Do Scale Mips for Alpha Coverage: Whether mip RGBA should be scaled to preserve the number of pixels with Value >= AlphaCoverageThresholds. AlphaCoverageThresholds are ignored if this is off.

  • downscale (PerPlatformFloat): [Read-Write] Downscale: Downscale source texture, applied only to textures without mips 0.0 - use scale value from texture group 1.0 - do not scale texture > 1.0 - scale texure

  • downscale_options (TextureDownscaleOptions): [Read-Write] Downscale Options: Texture downscaling options

  • filter (TextureFilter): [Read-Write] Filter: The texture filtering mode to use when sampling this texture.

  • flip_green_channel (bool): [Read-Write] Flip Green Channel: When true the texture’s green channel will be inverted. This is useful for some normal maps.

  • global_force_mip_levels_to_be_resident (bool): [Read-Write] Global Force Mip Levels to be Resident: Global and serialized version of ForceMiplevelsToBeResident.

  • lod_bias (int32): [Read-Write] LODBias: A bias to the index of the top mip level to use.

  • lod_group (TextureGroup): [Read-Write] LODGroup: Texture group this texture belongs to

  • lossy_compression_amount (TextureLossyCompressionAmount): [Read-Write] Lossy Compression Amount: How aggressively should any relevant lossy compression be applied. For compressors that support EncodeSpeed (i.e. Oodle), this is only

    applied if enabled (see Project Settings -> Texture Encoding). Note that this is in addition to any unavoidable loss due to the target format - selecting “No Lossy Compression” will not result in zero distortion for BCn formats.

  • max_texture_size (int32): [Read-Write] Max Texture Size: The maximum resolution for generated textures. A value of 0 means the maximum size for the format on each platform.

  • mip_gen_settings (TextureMipGenSettings): [Read-Write] Mip Gen Settings: Per asset specific setting to define the mip-map generation properties like sharpening and kernel size.

  • mip_load_options (TextureMipLoadOptions): [Read-Write] Mip Load Options: The texture mip load options.

  • never_stream (bool): [Read-Write] Never Stream

  • num_cinematic_mip_levels (int32): [Read-Write] Num Cinematic Mip Levels: Number of mip-levels to use for cinematic quality.

  • oodle_texture_sdk_version (Name): [Read-Write] Oodle Texture Sdk Version: Oodle Texture SDK Version to encode with. Enter ‘latest’ to update; ‘None’ preserves legacy encoding to avoid patches.

  • padding_color (Color): [Read-Write] Padding Color: The color used to pad the texture out if it is resized due to PowerOfTwoMode

  • power_of_two_mode (TexturePowerOfTwoSetting): [Read-Write] Power Of Two Mode: How to pad the texture to a power of 2 size (if necessary)

  • preserve_border (bool): [Read-Write] Preserve Border: When true the texture’s border will be preserved during mipmap generation.

  • source_color_settings (TextureSourceColorSettings): [Read-Write] Source Color Settings: Texture color management settings: source encoding and color space.

  • srgb (bool): [Read-Write] SRGB: This should be unchecked if using alpha channels individually as masks.

  • use_legacy_gamma (bool): [Read-Write] Use Legacy Gamma: A flag for using the simplified legacy gamma space e.g pow(color,1/2.2) for converting from FColor to FLinearColor, if we’re doing sRGB.

  • virtual_texture_streaming (bool): [Read-Write] Virtual Texture Streaming: Is this texture streamed in using VT

property adjust_brightness

[Read-Write] Adjust Brightness: Static texture brightness adjustment (scales HSV value.) (Non-destructive; Requires texture source art to be available.)

Type

(float)

property adjust_brightness_curve

[Read-Write] Adjust Brightness Curve: Static texture curve adjustment (raises HSV value to the specified power.) (Non-destructive; Requires texture source art to be available.)

Type

(float)

property adjust_hue

[Read-Write] Adjust Hue: Static texture hue adjustment (0 - 360) (offsets HSV hue by value in degrees.) (Non-destructive; Requires texture source art to be available.)

Type

(float)

property adjust_max_alpha

[Read-Write] Adjust Max Alpha: Remaps the alpha to the specified min/max range, defines the new value of 1 (Non-destructive; Requires texture source art to be available.)

Type

(float)

property adjust_min_alpha

[Read-Write] Adjust Min Alpha: Remaps the alpha to the specified min/max range, defines the new value of 0 (Non-destructive; Requires texture source art to be available.)

Type

(float)

property adjust_rgb_curve

[Read-Write] Adjust RGBCurve: Static texture RGB curve adjustment (raises linear-space RGB color to the specified power.) (Non-destructive; Requires texture source art to be available.)

Type

(float)

property adjust_saturation

[Read-Write] Adjust Saturation: Static texture saturation adjustment (scales HSV saturation.) (Non-destructive; Requires texture source art to be available.)

Type

(float)

property adjust_vibrance

[Read-Write] Adjust Vibrance: Static texture “vibrance” adjustment (0 - 1) (HSV saturation algorithm adjustment.) (Non-destructive; Requires texture source art to be available.)

Type

(float)

property alpha_coverage_thresholds

[Read-Write] Alpha Coverage Thresholds: Alpha values per channel to compare to when preserving alpha coverage. 0 means disable channel. Typical good values in 0.5 - 0.9, not 1.0

Type

(Vector4)

property chroma_key_color

[Read-Write] Chroma Key Color: The color that will be replaced with transparent black if chroma keying is enabled

Type

(Color)

property chroma_key_texture

[Read-Write] Chroma Key Texture: Whether to chroma key the image, replacing any pixels that match ChromaKeyColor with transparent black

Type

(bool)

property chroma_key_threshold

[Read-Write] Chroma Key Threshold: The threshold that components have to match for the texel to be considered equal to the ChromaKeyColor when chroma keying (<=, set to 0 to require a perfect exact match)

Type

(float)

property composite_power

[Read-Write] Composite Power: default 1, high values result in a stronger effect e.g 1, 2, 4, 8 this is no slider because the texture update would not be fast enough

Type

(float)

property composite_texture

[Read-Write] Composite Texture: Can be defined to modify the roughness based on the normal map variation (mostly from mip maps). MaxAlpha comes in handy to define a base roughness if no source alpha was there. Make sure the normal map has at least as many mips as this texture.

Type

(Texture)

property composite_texture_mode

[Read-Write] Composite Texture Mode: defines how the CompositeTexture is applied, e.g. CTM_RoughnessFromNormalAlpha

Type

(CompositeTextureMode)

property compression_no_alpha

[Read-Write] Compression No Alpha: If enabled, the texture’s alpha channel will be discarded during compression

Type

(bool)

property compression_quality

[Read-Write] Compression Quality: The compression quality for generated ASTC textures (i.e. mobile platform textures).

Type

(TextureCompressionQuality)

property compression_settings

[Read-Write] Compression Settings: Compression settings to use when building the texture.

Type

(TextureCompressionSettings)

property defer_compression

[Read-Write] Defer Compression: If enabled, defer compression of the texture until save or manually compressed in the texture editor.

Type

(bool)

property dither_mip_map_alpha

[Read-Write] Dither Mip Map Alpha: When true, the alpha channel of mip-maps and the base image are dithered for smooth LOD transitions.

Type

(bool)

property do_scale_mips_for_alpha_coverage

[Read-Write] Do Scale Mips for Alpha Coverage: Whether mip RGBA should be scaled to preserve the number of pixels with Value >= AlphaCoverageThresholds. AlphaCoverageThresholds are ignored if this is off.

Type

(bool)

export_to_disk(filename, options) None

Export the specified texture to disk

Parameters
  • filename (str) – The filename on disk to save as

  • options (ImageWriteOptions) – Parameters defining the various export options

property filter

[Read-Write] Filter: The texture filtering mode to use when sampling this texture.

Type

(TextureFilter)

property flip_green_channel

[Read-Write] Flip Green Channel: When true the texture’s green channel will be inverted. This is useful for some normal maps.

Type

(bool)

property lod_bias

[Read-Write] LODBias: A bias to the index of the top mip level to use.

Type

(int32)

property lod_group

[Read-Write] LODGroup: Texture group this texture belongs to

Type

(TextureGroup)

property lossy_compression_amount

[Read-Write] Lossy Compression Amount: How aggressively should any relevant lossy compression be applied. For compressors that support EncodeSpeed (i.e. Oodle), this is only

applied if enabled (see Project Settings -> Texture Encoding). Note that this is in addition to any unavoidable loss due to the target format - selecting “No Lossy Compression” will not result in zero distortion for BCn formats.

Type

(TextureLossyCompressionAmount)

property max_texture_size

[Read-Only] Max Texture Size: The maximum resolution for generated textures. A value of 0 means the maximum size for the format on each platform.

Type

(int32)

property mip_gen_settings

[Read-Write] Mip Gen Settings: Per asset specific setting to define the mip-map generation properties like sharpening and kernel size.

Type

(TextureMipGenSettings)

property mip_load_options

[Read-Write] Mip Load Options: The texture mip load options.

Type

(TextureMipLoadOptions)

property oodle_texture_sdk_version

[Read-Write] Oodle Texture Sdk Version: Oodle Texture SDK Version to encode with. Enter ‘latest’ to update; ‘None’ preserves legacy encoding to avoid patches.

Type

(Name)

property padding_color

[Read-Write] Padding Color: The color used to pad the texture out if it is resized due to PowerOfTwoMode

Type

(Color)

property power_of_two_mode

[Read-Write] Power Of Two Mode: How to pad the texture to a power of 2 size (if necessary)

Type

(TexturePowerOfTwoSetting)

property preserve_border

[Read-Write] Preserve Border: When true the texture’s border will be preserved during mipmap generation.

Type

(bool)

property source_color_settings

[Read-Write] Source Color Settings: Texture color management settings: source encoding and color space.

Type

(TextureSourceColorSettings)

property srgb

[Read-Write] SRGB: This should be unchecked if using alpha channels individually as masks.

Type

(bool)

property use_legacy_gamma

[Read-Write] Use Legacy Gamma: A flag for using the simplified legacy gamma space e.g pow(color,1/2.2) for converting from FColor to FLinearColor, if we’re doing sRGB.

Type

(bool)

property virtual_texture_streaming

[Read-Only] Virtual Texture Streaming: Is this texture streamed in using VT

Type

(bool)