NEWS: This project is now hosted on GitHub https://github.com/Microsoft/UVAtlas. This site is being maintained for now, but please move to using GitHub. https://github.com/Microsoft/UVAtlas/wiki/UVAtlas

UVAtlas implements the same isochart atlas algorithm as was present in the deprecated D3DX9 utility library. For an overview of this technology, see the Direct3D 9 documentation on MSDN:
http://msdn.microsoft.com/en-us/library/windows/desktop/bb206321.aspx

Headers

The majority of the header files here are intended for internal implementation of the library only. Only the Inc folder is meant as a 'public' header for the library.

Namespace

All the functions in the library are in the DirectX C++ namespace.

Functions

UVAtlasCreate

UVAtlasPartition

UVAtlasPack

UVAtlasComputeIMTFromPerVertexSignal

UVAtlasComputeIMTFromSignal

UVAtlasComputeIMTFromTexture

UVAtlasComputeIMTFromPerTexelSignal

UVAtlasApplyRemap

Structures

UVAtlasVertex is the result output from the atlas creation, partition, and pack operations. It contains a position (which is taken from the original input data possibly with vertex duplication) with unique uv data which is the result of the isochart atlasing.

Parameters

The following standard parameters are used throughout the library:

indices: A 16-bit or 32-bit indexed description of the triangles in a mesh. This must have 3 * nFaces entries, and every group of 3 describes the vertices for a triangle face.

indexFormat: If using 16-bit indices, use DXGI_FORMAT_R16_UINT. If using 32-bit indices, use DXGI_FORMAT_R32_UINT. No other value is supported.

nFaces: Number of faces in the mesh.

positions: The vertex positions of the mesh as indexed by entries in indices. This must have nVerts entries.

texcoords: The UV texture coordinates of the mesh as indexed by entries in indices. This must have nVerts entries.

nVerts: Number of vertices in the mesh.

adjacency: A 32-bit index array with nFaces * 3 entries containing the edge adjacencies for each face in a mesh. Can be -1u to indicate an unused entry. Note: this can be computed from mesh data using DirectXMesh http://go.microsoft.com/fwlink/?LinkID=324981

statusCallback: Since the atlas creation process can be very CPU intensive, this allows the programmer to specify a function to be called periodically to provide feedback status to the user. It should return S_OK to continue and E_ABORT to abort the current operation.

callbackFrequency - This lets you specify how often the callback will be invoked. You can use the default value of UVATLAS_DEFAULT_CALLBACK_FREQUENCY.

Adding to a VS solution

In your application's solution, right-click on the Solution and use "Add \ Existing Project..." to add the appropriate .vcxproj file to your solution.
  • UVAtlas_2015 is for Windows desktop applications building with VS 2015
  • UVAtlas_2013 is for Windows desktop applications building with VS 2013 Express for Desktop, VS 2013 Community, VS 2013 Professional or higher
  • UVAtlas_2012 is for Windows desktop applications building with VS 2012 Express for Desktop, VS 2012 Professional or higher
  • UVAtlas_Windows10 is for universal Windows apps building with VS 2015 targeting Windows 10
  • UVAtlas_Windows81 is for Windows Store apps building with VS 2013 targeting Windows 8.1
  • UVAtlas_XboxOneXDK is for Xbox One exclusive apps building with VS 2012 using the Xbox One XDK
  • UVAtlas_XboxOneADK is for Xbox One hub apps building with VS 2012 using the Xbox One ADK
In your application's project, right-click on the Project and use "References...", then "Add New Reference...", and then check the UVAtlas project name and click OK. For a Windows Store app or Xbox One solution, you need to set Reference Assembly Output to false since UVAtlas is a static C++ library and not a WinRT component.

In your application's project settings, on the "C++ / General" page set Configuration to "All Configurations", set Platform to "All Platforms", and then add the relative path to UVAtlas\Inc;--assuming you have the UVAtlas folder in the same directory as your sln file, it should be $(SolutionDir$)\UVAtlas\Inc;--to the Additional Include Directories properties. Click Apply.

http://blogs.msdn.com/b/vcblog/archive/2010/05/03/flexible-project-to-project-references.aspx

Note: You'll likely want to add both DirectXTex and DirectXMesh to your solution as well, although it's not strictly required.

Reference

Zhou et al, "Iso-charts: Stretch-driven Mesh Parameterization using Spectral Analysis", Eurographics Symposium on Geometry Processing (2004)

http://research.microsoft.com/en-us/um/people/johnsny/papers/isochart.pdf

Sander et al. "Signal-Specialized Parametrization" Europgraphics 2002

http://research.microsoft.com/en-us/um/people/johnsny/papers/ssp.pdf


Last edited Jul 29, 2015 at 11:52 PM by walbourn, version 22