Home

Awesome

xatlas

Travis CI Build Status License: MIT

A cleaned up version of thekla_atlas.

Mesh charting, parameterization and atlas packing. Suitable for generating unique texture coordinates for baking lightmaps.

Changes from thekla_atlas

How to use

  1. Create an atlas with xatlas::Create.
  2. Add one or more meshes with xatlas::AddMesh. Mesh geometry should be manifold.
  3. Call xatlas::ComputeCharts. Meshes are segmented into roughly disk-shaped charts.
  4. Call xatlas::ParameterizeCharts. Charts are flattened into 2D parameterizations.
  5. Call xatlas::PackCharts. Charts are packed into one or more atlases. You can call xatlas::PackCharts multiple times to tweak options like unit to texel scale and resolution.
  6. The xatlas::Atlas instance created in the first step now contains the result: meshes with a new UV channel that cross-reference input meshes. The number of vertices has likely increased compared to the input meshes, as the new UV channel duplicates some vertices that were previously shared between triangles. The number and coherence of indices remain unchanged, some are changed to reference vertices that were duplicated.
  7. Cleanup with xatlas::Destroy.

TODO

Links

Ignacio Castaño's blog post on thekla_atlas

Microsoft's UVAtlas

Ministry of Flat - Commercial automated UV unwrapper.

Lightmapper - Hemicube based lightmap baking. The example model texture coordinates were generated by thekla_atlas.

aobaker - Ambient occlusion baking. Uses thekla_atlas.

Gazebo model by Teh_Bucket

Tunnel scene by LMHPoly