UVAtlas.Partition Method ()

Creates one or more UV texture atlases (like UVAtlas.Create), without performing the final packing step.

Overload List

public static UVAtlasOutput Partition(Mesh, int, float, int, GraphicsStream, float[], PercentageCompleteCallback, float);
public static UVAtlasOutput Partition(Mesh, int, float, int, int[], float[], PercentageCompleteCallback, float);

Remarks

Integrated Metric Tensor Array

The IMTArray is an array of integrated metric tensors. Each element uses 3 Singles to describe an IMT for a single face. The IMT controls how the triangle is stretched in the atlas. The IMT (3 singles - (a,b,c)) contains a symmetric 2x2 matrix as shown here:

a b
b c

Given a vector (s,t) and two vectors v1 and v2:

vector v1
vector v2 = v1 + (s,t)

The distance between vector v1 and v2 is:

sqrt((s, t) * M * (s, t)^T)

In other words, the vector (s,t) enables you to specify the magnitude of the stretch in an arbitrary direction in UV space; where s is the direction from the first to the second vertex, and t is the cross product of the normal and s. For example: a = b = 1 would scale the vector (1,1) by 2, and the vector (1,-1) by 0. Note that this is multiplying the edge length by the square of the matrix; if you want the face to stretch to twice its size with no shearing, the IMT value should be (2, 0, 2), which is the identity matrix times 2.

You can calculate IMTs from texture or vertex signal data by using the methods in the IntegratedMetricTensor class.

Exceptions

Direct3DXException

The operation failed.