![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <UVPacking.h>
Classes | |
| struct | IUVMeshView |
Public Member Functions | |
| GEOMETRYCORE_API bool | StandardPack (IUVMeshView *Mesh, int NumIslands, TFunctionRef< void(int, TArray< int32 > &)> CopyIsland) |
| bool | StandardPack (IUVMeshView *Mesh, const TArray< TArray< int > > &UVIslands) |
| Version of StandardPack that takes an array of arrays instead of a TFunctionRef, for convenience. | |
| GEOMETRYCORE_API bool | StackPack (IUVMeshView *Mesh, int NumIslands, TFunctionRef< void(int, TArray< int32 > &)> CopyIsland) |
| bool | StackPack (IUVMeshView *Mesh, const TArray< TArray< int > > &UVIslands) |
| Version of StackPack that takes an array of arrays instead of a TFunctionRef, for convenience. | |
Public Attributes | |
| int32 | TextureResolution = 512 |
| float | GutterSize = 1.0 |
| bool | bPreserveScale = false |
| bool | bPreserveRotation = false |
| bool | bAllowFlips = false |
| bool | bScaleIslandsByWorldSpaceTexelRatio = false |
Protected Member Functions | |
| GEOMETRYCORE_API void | GetIslandStats (IUVMeshView *Mesh, const TArray< int32 > &Island, FAxisAlignedBox2d &IslandBoundsOut, double &IslandScaleFactorOut, double &UVAreaOut) |
FUVPacker implements various strategies for packing UV islands in a generic mesh class. The UV islands must already be identified, this class simply scales/rotates/translates the islands to fit.
|
protected |
Compute common stats used by the packing algorithms to transform UV islands
|
inline |
Version of StackPack that takes an array of arrays instead of a TFunctionRef, for convenience.
| bool FUVPacker::StackPack | ( | IUVMeshView * | Mesh, |
| int | NumIslands, | ||
| TFunctionRef< void(int, TArray< int32 > &)> | CopyIsland | ||
| ) |
Uniformly scale all UV islands so that the largest fits in positive-unit-square, and translate each islands separately so that it's bbox-min is at the origin. So the islands are "stacked" and all fit in the unit box.
|
inline |
Version of StandardPack that takes an array of arrays instead of a TFunctionRef, for convenience.
| bool FUVPacker::StandardPack | ( | IUVMeshView * | Mesh, |
| int | NumIslands, | ||
| TFunctionRef< void(int, TArray< int32 > &)> | CopyIsland | ||
| ) |
Standard UE UV layout, similar to that used for Lightmap UVs. All UV islands are packed into standard positive-unit-square. Only supports single-pixel border size.
If true, islands can be flipped in addition to rotate/translate/scale
If true, original island rotation is maintained during any packing process. Automatically prevents bAllowFlips from applying, if set.
If true, original island scale is maintained during any packing process.
Attempt to rescale islands to match texel-to-world-space ratio across islands, based on ratio of World- and UV-space edge lengths
| float UE::Geometry::FUVPacker::GutterSize = 1.0 |
Thickness of gutter/border in pixel dimensions. Not supported by all packing methods
| int32 UE::Geometry::FUVPacker::TextureResolution = 512 |
Resolution of the target texture. This is used to convert pixel gutter/border thickness to UV space