Attention: Here be dragons (unstable version)

This is the latest (unstable) version of this documentation, which may document features not available in or compatible with released stable versions of Redot.

ResourceImporterAnimatedTexture

Deprecated: AnimatedTexture is deprecated.

Inherits: ResourceImporter < RefCounted < Object

Imports an animated image for use in 2D rendering.

Description

This importer imports AnimatedTexture resources. If you need to process the image in scripts in a more convenient way, use ResourceImporterImageFrames instead.

Properties

bool

process/fix_alpha_border

true

int

process/frame_limit

0

bool

process/hdr_as_srgb

false

bool

process/premult_alpha

false

int

process/size_limit

0


Property Descriptions

bool process/fix_alpha_border = true 🔗

If true, puts pixels of the same surrounding color in transition from transparent to opaque areas for all textures. For textures displayed with bilinear filtering, this helps to reduce the outline effect when exporting images from an image editor.

It's recommended to leave this enabled (as it is by default), unless this causes issues for a particular animated image.


int process/frame_limit = 0 🔗

If set to a value greater than 0, the frames to read is limited on import to a value smaller than or equal to the value specified here.

This can be used to reduce memory usage at the cost of truncated animations.


bool process/hdr_as_srgb = false 🔗

Some HDR images you can find online may be broken and contain sRGB color data (instead of linear color data). It is advised not to use those files. If you absolutely have to, enabling process/hdr_as_srgb will make them look correct.

Warning: Enabling process/hdr_as_srgb on well-formatted HDR images will cause the resulting image to look too dark, so leave this on false if unsure.


bool process/premult_alpha = false 🔗

An alternative to fixing darkened borders with process/fix_alpha_border is to use premultiplied alpha. By enabling this option, all the textures will be converted to this format. A premultiplied alpha texture requires specific materials to be displayed correctly:

A CanvasItemMaterial will need to be created and configured to use the CanvasItemMaterial.BLEND_MODE_PREMULT_ALPHA blend mode on CanvasItems that use this texture. In custom @canvas_item shaders, render_mode blend_premul_alpha; should be used.


int process/size_limit = 0 🔗

If set to a value greater than 0, the size of each individual texture is limited on import to a value smaller than or equal to the value specified here. For non-square textures, the size limit affects the longer dimension, with the shorter dimension scaled to preserve aspect ratio. Resizing is performed using cubic interpolation.

This can be used to reduce memory usage without affecting the source images, or avoid issues with textures not displaying on mobile/web platforms (as these usually can't display textures larger than 4096×4096).