FUVPacker

[FUVPacker](API\Plugins\GeometricObjects\Parameterization\FUVPacker) implements various strategies for packing UV islands in a generic mesh class.

Windows
MacOS
Linux

References

Module

GeometricObjects

Header

/Engine/Plugins/Experimental/GeometryProcessing/Source/GeometricObjects/Public/Parameterization/UVPacking.h

Include

#include "Parameterization/UVPacking.h"

Syntax

class FUVPacker

Remarks

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.

Variables

Name Description

Public variable

bool

 

bAllowFlips

If true, islands can be flipped in addition to rotate/translate/scale

Public variable

bool

 

bScaleIslandsByWorldSpaceTexelRatio

Attempt to rescale islands to match texel-to-world-space ratio across islands, based on ratio of World- and UV-space edge lengths

Public variable

float

 

GutterSize

Thickness of gutter/border in pixel dimensions. Not supported by all packing methods

Public variable

int32

 

TextureResolution

Resolution of the target texture. This is used to convert pixel gutter/border thickness to UV space

Functions

Name Description

Protected function

void

 

GetIslandStats

(
    IUVMeshView* Mesh,
    const TArray< int32 >& Island,
    FAxisAlignedBox2d& IslandBoundsOut,
    double& IslandScaleFactorOut,
    double& UVAreaOut
)

Compute common stats used by the packing algorithms to transform UV islands

Public function

bool

 

StackPack

(
    IUVMeshView* Mesh,
    const TArray< TArray< int >>& UVIs...
)

Version of StackPack that takes an array of arrays instead of a TFunctionRef, for convenience.

Public function

bool

 

StackPack

(
    IUVMeshView* Mesh,
    int NumIslands,
    TFunctionRef< void< int...
)

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.

Public function

bool

 

StandardPack

(
    IUVMeshView* Mesh,
    const TArray< TArray< int >>& UVIs...
)

Version of StandardPack that takes an array of arrays instead of a TFunctionRef, for convenience.

Public function

bool

 

StandardPack

(
    IUVMeshView* Mesh,
    int NumIslands,
    TFunctionRef< void< int...
)

Standard UE UV layout, similar to that used for Lightmap UVs.

Classes

Name

Description

Public struct

IUVMeshView

Abstract interface to apply UV packer a mesh

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss