Giter VIP home page Giter VIP logo

xatlas's Introduction

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

  • Smaller code size - from about 18 KLOC to 8 KLOC
  • Easier to integrate and build - a single source/header file pair instead of around 120 files and 10 directories.
  • Atlas resolution option for outputting multiple atlases.
  • Flexible data description API for input meshes.
  • Better tolerance of bad input geometry. Zero length edges and zero area faces are ignored.

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

  • Adding meshes: check for overlapping and intersecting geometry
  • Charting: simplified/faster code path for dealing with co-planar connected faces
  • Parameterization: use a better hole filling argorithm for non-planar holes
  • Packing: bilinear-aware rasterization
  • Packing: faster brute-force packing

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

xatlas's People

Contributors

jpcy avatar prideout avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.