UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
UE::TextureUtilitiesCommon Namespace Reference

Classes

class  TPNGDataFill
 

Functions

TEXTUREUTILITIESCOMMON_API bool GetDefaultSRGB (TextureCompressionSettings TC, ETextureSourceFormat ImportImageFormat, bool ImportImageSRGB)
 
TEXTUREUTILITIESCOMMON_API ETextureImportPNGInfill GetPNGInfillSetting ()
 
template<typename ImageClassType >
bool AutoDetectAndChangeGrayScale (ImageClassType &Image)
 
template TEXTUREUTILITIESCOMMON_API bool AutoDetectAndChangeGrayScale (FImage &Image)
 
template TEXTUREUTILITIESCOMMON_API bool AutoDetectAndChangeGrayScale (FMipMapImage &Image)
 
void FillZeroAlphaPNGData (int32 SizeX, int32 SizeY, ETextureSourceFormat SourceFormat, uint8 *SourceData, bool bDoOnComplexAlphaNotJustBinaryTransparency)
 
uint32 ParseUDIMName (const FString &Name, const FString &UdimRegexPattern, FString &OutPrefixName, FString &OutPostfixName)
 
int32 GetUDIMIndex (int32 BlockX, int32 BlockY)
 
TMap< int32, FString > GetUDIMBlocksFromSourceFile (const FString &File, const FString &UdimRegexPattern, FString *OutFilenameWithoutUdimPatternAndExtension)
 
void ExtractUDIMCoordinates (int32 UDIMIndex, int32 &OutBlockX, int32 &OutBlockY)
 
template<typename ImageClassType >
TEXTUREUTILITIESCOMMON_API bool AutoDetectAndChangeGrayScale (ImageClassType &Image)
 
TEXTUREUTILITIESCOMMON_API bool IsImportResolutionValid (int64 Width, int64 Height, bool bAllowNonPowerOfTwo, FText *OutErrorMessage)
 

Variables

constexpr int32 UDIM_Max_X = 9
 
constexpr int32 UDIM_Max_Y = 90
 
constexpr int32 UDIM_Min_Index = 1001
 
constexpr int32 UDIM_Max_Index = UDIM_Min_Index + UDIM_Max_X + UDIM_Max_Y * 10
 
constexpr const TCHARDefaultUdimRegexPattern = TEXT(R"((.+?)[._](\d{4})$)")
 

Function Documentation

◆ AutoDetectAndChangeGrayScale() [1/4]

template TEXTUREUTILITIESCOMMON_API bool UE::TextureUtilitiesCommon::AutoDetectAndChangeGrayScale ( FImage Image)

◆ AutoDetectAndChangeGrayScale() [2/4]

template TEXTUREUTILITIESCOMMON_API bool UE::TextureUtilitiesCommon::AutoDetectAndChangeGrayScale ( FMipMapImage Image)

◆ AutoDetectAndChangeGrayScale() [3/4]

bool UE::TextureUtilitiesCommon::AutoDetectAndChangeGrayScale ( ImageClassType Image)

Detect the existence of gray scale image in some formats and convert those to a gray scale equivalent image

Returns
true if the image was converted

◆ AutoDetectAndChangeGrayScale() [4/4]

TEXTUREUTILITIESCOMMON_API bool UE::TextureUtilitiesCommon::AutoDetectAndChangeGrayScale ( ImageClassType Image)

Detect the existence of gray scale image in some formats and convert those to a gray scale equivalent image

Returns
true if the image was converted

◆ ExtractUDIMCoordinates()

TEXTUREUTILITIESCOMMON_API void UE::TextureUtilitiesCommon::ExtractUDIMCoordinates ( int32  UDIMIndex,
int32 OutBlockX,
int32 OutBlockY 
)

◆ FillZeroAlphaPNGData()

TEXTUREUTILITIESCOMMON_API void UE::TextureUtilitiesCommon::FillZeroAlphaPNGData ( int32  SizeX,
int32  SizeY,
ETextureSourceFormat  SourceFormat,
uint8 SourceData,
bool  bDoOnComplexAlphaNotJustBinaryTransparency 
)

For PNG texture importing, this ensures that any pixels with an alpha value of zero have an RGB assigned to them from a neighboring pixel which has non-zero alpha. This is needed as PNG exporters tend to turn pixels that are RGBA = (x,x,x,0) to (1,1,1,0) and this produces artifacts when drawing the texture with bilinear filtering.

Parameters
TextureSource- The source texture
SourceData- The source texture data

◆ GetDefaultSRGB()

TEXTUREUTILITIESCOMMON_API bool UE::TextureUtilitiesCommon::GetDefaultSRGB ( TextureCompressionSettings  TC,
ETextureSourceFormat  ImportImageFormat,
bool  ImportImageSRGB 
)

◆ GetPNGInfillSetting()

TEXTUREUTILITIESCOMMON_API ETextureImportPNGInfill UE::TextureUtilitiesCommon::GetPNGInfillSetting ( )

Resolves PNG infill setting using, in order of preference, per-project user settings, project settings, and legacy config settings.

◆ GetUDIMBlocksFromSourceFile()

TEXTUREUTILITIESCOMMON_API TMap< int32, FString > UE::TextureUtilitiesCommon::GetUDIMBlocksFromSourceFile ( const FString &  File,
const FString &  UdimRegexPattern,
FString *  OutFilenameWithoutUdimPatternAndExtension = nullptr 
)

Parse the file for the UDIM pattern If the pattern is found search in the folder of the file for the others blocks

◆ GetUDIMIndex()

TEXTUREUTILITIESCOMMON_API int32 UE::TextureUtilitiesCommon::GetUDIMIndex ( int32  BlockX,
int32  BlockY 
)

◆ IsImportResolutionValid()

bool UE::TextureUtilitiesCommon::IsImportResolutionValid ( int64  Width,
int64  Height,
bool  bAllowNonPowerOfTwo,
FText OutErrorMessage 
)

Tests if the given height and width specify a supported texture resolution to import; Can optionally check if the height/width are powers of two

Parameters
WidthThe width of an imported texture whose validity should be checked
HeightThe height of an imported texture whose validity should be checked
bAllowNonPowerOfTwoWhether or not non-power-of-two textures are allowed
OutErrorMessageOptional output for an error message
Returns
bool true if the given height/width represent a supported texture resolution, false if not

NOTE: may open a dialog box to ask user if large non-VT import is wanted!

◆ ParseUDIMName()

TEXTUREUTILITIESCOMMON_API uint32 UE::TextureUtilitiesCommon::ParseUDIMName ( const FString &  Name,
const FString &  UdimRegexPattern,
FString &  OutPrefixName,
FString &  OutPostfixName 
)

Variable Documentation

◆ DefaultUdimRegexPattern

constexpr const TCHAR* UE::TextureUtilitiesCommon::DefaultUdimRegexPattern = TEXT(R"((.+?)[._](\d{4})$)")
constexpr

◆ UDIM_Max_Index

constexpr int32 UE::TextureUtilitiesCommon::UDIM_Max_Index = UDIM_Min_Index + UDIM_Max_X + UDIM_Max_Y * 10
constexpr

◆ UDIM_Max_X

constexpr int32 UE::TextureUtilitiesCommon::UDIM_Max_X = 9
constexpr

◆ UDIM_Max_Y

constexpr int32 UE::TextureUtilitiesCommon::UDIM_Max_Y = 90
constexpr

◆ UDIM_Min_Index

constexpr int32 UE::TextureUtilitiesCommon::UDIM_Min_Index = 1001
constexpr