This project has moved and is read-only. For the latest updates, please go here.
This UVAtlas sample is an implementation of the uvatlas command-line sample from the DirectX SDK using UVAtlas, DirectXTex, and DirectXMesh rather than D3DX. This tool imports geometry and generates an isochart mesh.

The original tool imported from legacy X files. This version imports from Wavefront OBJ or VBO files.


UVAtlas.exe uses the following command syntax:

uvatlas [-q <level>] [-n <number>] [-st <float>] [-g <float>] [-w <number>] [-h <number>] [-ta | -ga] [-nn | -na | -ne] [-tt | -tb] [-cw] [-c] [-t] [-it <filename>]
[-iv <channel>] [-sdkmesh | -cmo | -vbo] [-nodds] [-flip]
[-flipv] [-flipz] [-o <filename] [-y] [-nologo] <file-name(s)>

The optional command-line switches are described in the following table.

Optional Switches Description

  • -q level sets quality level to DEFAULT, FAST or QUALITY. With DEFAULT, the tool uses QUALITY for meshes below a threshold, and FAST otherwise.
  • -n number sets the maximum number of charts to generate. The default of 0 uses max-stretch as the limit. Note this is a soft limit.
  • -st float sets the maximum amount of stretch 0.0..1.0, defaulting to 0.16667
  • -g float is the the gutter width between charts in texels, which defaults to 2.0
  • -w, -h number texture width/height for the atlas, defaults to 512x512.
  • -ta when generating adjacency use topological adjacency (the default)
  • -ga when generating adjacency use geometric adjacency (uses epsilon of 1e-5f)
  • -nn generate normals weighted by angle
  • -na generate normals weighted by area
  • -ne generate normals weighted equally
  • -tt generate tangents.
  • -tb generate tangents and bi-tangents (aka bi-normals).
  • -cw faces are clockwise (defaults to counter-clockwise) for generating normal
  • -c generate mesh with colors showing charts (replaces the materials set and attributes in the output).
  • -t generates a separate mesh with uvs as position information to allow visualization of the isochart. Output name has "_texture" appended.
  • -it filename calculates IMT for the mesh using this texture map
  • -iv channel calculates IMT using per-vertex data where channel is NORMAL, COLOR, or TEXCOORD
  • -sdkmesh output an .SDKMESH file (the default)
  • -cmo output a .CMO file (requires normals, tangents and texture coordinates).
  • -vbo output a .VBO file (requires normals and texture coordinates).
  • -nodds prevents extension renaming in exported materials. By default, texture filenames are converted from an existing image extension to .dds assuming they are going to be processed by 'texconv'. This flag prevents the renaming and leaves the original extension.
  • -flip reverses the winding of faces
  • -flipv inverts the v texture coordinate (Direct3D vs. OpenGL image orientation)
  • -flipz negates the z component (RH vs. LH view systems)
  • -o filename specifies output filename which is otherwise generated from the input file name. Use of this switch supports only one input file.
  • -y overwrite existing output file if any. By default, the tool will abort if the output file already exists.
  • -nologo suppress copyright message


uvatlas cup.obj -t -c

This loads the geometry in a Wavefront OBJ file 'cup.obj', generates normals (using weight by angle), generates an isochart, and then writes the result to cup.sdkmesh as well as a visualization to cup_texture.sdkmesh both using a material set that colors each face by which chart it belongs to in the atlas.

Last edited Dec 1, 2015 at 12:49 AM by walbourn, version 8