Skip to content

UVAtlasPartition

Chuck Walbourn edited this page Jan 21, 2022 · 4 revisions
UVAtlas

Create a UV atlas for a mesh, which is then followed by a call to UVAtlasPack.

HRESULT UVAtlasPartition(
    const XMFLOAT3* positions, size_t nVerts,
    const void* indices, DXGI_FORMAT indexFormat, size_t nFaces,
    size_t maxChartNumber, float maxStretch,
    const uint32_t *adjacency, const uint32_t *falseEdgeAdjacency,
    const float *pIMTArray,
    std::function<HRESULT(float percentComplete)> statusCallBack,
    float callbackFrequency,
    UVATLAS options,
    std::vector<UVAtlasVertex>& vMeshOutVertexBuffer,
    std::vector<uint8_t>& vMeshOutIndexBuffer,
    std::vector<uint32_t>* pvFacePartitioning,
    std::vector<uint32_t>* pvVertexRemapArray,
    std::vector<uint32_t>& vPartitionResultAdjacency,
    float *maxStretchOut = nullptr, size_t *numChartsOut = nullptr);

Parameters

See UVAtlasCreate which details the majority of the parameters to this function.

vPartitionResultAdjacency: Contains three values per face. This is used as input to the UVAtlasPack.

Remarks

UVAtlas can partition mesh geometry two ways:

  • Based on the number of charts
  • Based on the maximum allowed stretch. If the maximum allowed stretch is 0, each triangle will likely be in its own chart

For Use

  • Universal Windows Platform apps
  • Windows desktop apps
  • Windows 11
  • Windows 10
  • Windows 8.1
  • Xbox One
  • Xbox Series X|S
  • Windows Subsystem for Linux

Architecture

  • x86
  • x64
  • ARM64

For Development

  • Visual Studio 2022
  • Visual Studio 2019 (16.11)
  • clang/LLVM v12 - v18
  • GCC 10.5, 11.4, 12.3
  • MinGW 12.2, 13.2
  • CMake 3.20

Related Projects

A python wrapper of UVAtlasTool

DirectXMesh

DirectXTex

DirectXMath

Tools

Test Suite

Content Exporter

DxCapsViewer

Clone this wiki locally