{"id":13731578,"url":"https://github.com/jpcy/xatlas","last_synced_at":"2025-05-15T08:05:35.766Z","repository":{"id":37396952,"uuid":"140512438","full_name":"jpcy/xatlas","owner":"jpcy","description":"Mesh parameterization / UV unwrapping library","archived":false,"fork":false,"pushed_at":"2024-06-16T22:20:33.000Z","size":17988,"stargazers_count":2211,"open_issues_count":44,"forks_count":224,"subscribers_count":58,"default_branch":"master","last_synced_at":"2025-04-03T17:09:08.053Z","etag":null,"topics":["lightmap","mesh","parameterization","texture-atlas","uv"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jpcy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-07-11T02:43:53.000Z","updated_at":"2025-04-03T14:27:01.000Z","dependencies_parsed_at":"2022-07-12T12:49:46.776Z","dependency_job_id":"bbeb81c7-186a-491b-baad-d193a539d74e","html_url":"https://github.com/jpcy/xatlas","commit_stats":{"total_commits":1207,"total_committers":7,"mean_commits":"172.42857142857142","dds":"0.0074565037282519064","last_synced_commit":"f700c7790aaa030e794b52ba7791a05c085faf0c"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpcy%2Fxatlas","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpcy%2Fxatlas/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpcy%2Fxatlas/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpcy%2Fxatlas/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jpcy","download_url":"https://codeload.github.com/jpcy/xatlas/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248439922,"owners_count":21103713,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["lightmap","mesh","parameterization","texture-atlas","uv"],"created_at":"2024-08-03T02:01:33.351Z","updated_at":"2025-04-11T16:27:10.117Z","avatar_url":"https://github.com/jpcy.png","language":"C++","funding_links":[],"categories":["Texture","Python Libraries","Digital Content Creation Software (DCCs)","C++","Maths"],"sub_categories":["UV/Unwrap library"],"readme":"## xatlas\n\n[![Actions Status](https://github.com/jpcy/xatlas/workflows/build/badge.svg)](https://github.com/jpcy/xatlas/actions) [![Appveyor CI Build Status](https://ci.appveyor.com/api/projects/status/github/jpcy/xatlas?branch=master\u0026svg=true)](https://ci.appveyor.com/project/jpcy/xatlas) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nxatlas is a small C++11 library with no external dependencies that generates unique texture coordinates suitable for baking lightmaps or texture painting.\n\nIt is an independent fork of [thekla_atlas](https://github.com/Thekla/thekla_atlas), used by [The Witness](https://en.wikipedia.org/wiki/The_Witness_(2016_video_game)).\n\n## Screenshots\n\n#### Example - [Cesium Milk Truck](https://github.com/KhronosGroup/glTF-Sample-Models)\n| Viewer | Random packing | Brute force packing |\n|---|---|---|\n| [![Viewer](https://user-images.githubusercontent.com/3744372/69908461-48cace80-143e-11ea-8b73-efea5a9f036e.png)](https://user-images.githubusercontent.com/3744372/69908460-48323800-143e-11ea-8b18-58087493c8e9.png) | ![Random packing](https://user-images.githubusercontent.com/3744372/68638607-d4db8b80-054d-11ea-8238-845d94789a2d.gif) | ![Brute force packing](https://user-images.githubusercontent.com/3744372/68638614-da38d600-054d-11ea-82d9-43e558c46d50.gif) |\n\n#### Example - [Godot Third Person Shooter demo](https://github.com/godotengine/tps-demo)\n[![Godot TPS](https://user-images.githubusercontent.com/3744372/69908463-48cace80-143e-11ea-8035-b669d1a455f6.png)](https://user-images.githubusercontent.com/3744372/69908462-48cace80-143e-11ea-8946-a2c596ec8028.png)\n\n#### [Graphite/Geogram](http://alice.loria.fr/index.php?option=com_content\u0026view=article\u0026id=22)\n![Graphite/Geogram](https://user-images.githubusercontent.com/19478253/69903392-c0deb900-1398-11ea-8a52-c211bc7803a9.gif)\n\n## How to use\n\n### Building\n\nPremake is used. For CMake support, see [here](https://github.com/cpp-pm/xatlas).\n\nIntegration into an existing build is simple, only `xatlas.cpp` and `xatlas.h` are required. They can be found in [source/xatlas](https://github.com/jpcy/xatlas/blob/master/source/xatlas)\n\n#### Windows\n\nRun `bin\\premake.bat`. Open `build\\vs2019\\xatlas.sln`.\n\nNote: change the build configuration to \"Release\". The default - \"Debug\" - severely degrades performance.\n\n#### Linux\n\nRequired packages: `libgl1-mesa-dev libgtk-3-dev xorg-dev`.\n\nInstall Premake version 5. Run `premake5 gmake`, `cd build/gmake`, `make`.\n\n### Bindings\n\n[Python](https://github.com/mworchel/xatlas-python)\n\n### Generate an atlas (simple API)\n\n1. Create an empty atlas with `xatlas::Create`.\n2. Add one or more meshes with `xatlas::AddMesh`.\n3. Call `xatlas::Generate`. Meshes are segmented into charts, which are parameterized and packed into an atlas.\n\nThe `xatlas::Atlas` instance created in the first step now contains the result: each input mesh added by `xatlas::AddMesh` has a corresponding new mesh with a UV channel. New meshes have more vertices (the UV channel adds seams), but the same number of indices.\n\nCleanup with `xatlas::Destroy`.\n\n[Example code here.](https://github.com/jpcy/xatlas/blob/master/source/examples/example.cpp)\n\n### Generate an atlas (tools/editor integration API)\n\nInstead of calling `xatlas::Generate`, the following functions can be called in sequence:\n\n1. `xatlas::ComputeCharts`: meshes are segmented into charts and parameterized.\n2. `xatlas::PackCharts`: charts are packed into one or more atlases.\n\nAll of these functions take a progress callback. Return false to cancel.\n\nYou can call any of these functions multiple times, followed by the proceeding functions, to re-generate the atlas. E.g. calling `xatlas::PackCharts` multiple times to tweak options like unit to texel scale and resolution.\n\nSee the [viewer](https://github.com/jpcy/xatlas/tree/master/source/examples/viewer) for example code.\n\n### Pack multiple atlases into a single atlas\n\n1. Create an empty atlas with `xatlas::Create`.\n2. Add one or more meshes with `xatlas::AddUvMesh`.\n3. Call `xatlas::PackCharts`.\n\n[Example code here.](https://github.com/jpcy/xatlas/blob/master/source/examples/example_uvmesh.cpp)\n\n## Technical information / related publications\n\n[Ignacio Castaño's blog post on thekla_atlas](http://www.ludicon.com/castano/blog/articles/lightmap-parameterization/)\n\nP. Sander, J. Snyder, S. Gortler, and H. Hoppe. [Texture Mapping Progressive Meshes](http://hhoppe.com/proj/tmpm/)\n\nK. Hormann, B. Lévy, and A. Sheffer. [Mesh Parameterization: Theory and Practice](http://alice.loria.fr/publications/papers/2007/SigCourseParam/param-course.pdf)\n\nP. Sander, Z. Wood, S. Gortler, J. Snyder, and H. Hoppe. [Multi-Chart Geometry Images](http://hhoppe.com/proj/mcgim/)\n\nD. Julius, V. Kraevoy, and A. Sheffer. [D-Charts: Quasi-Developable Mesh Segmentation](https://www.cs.ubc.ca/~vlady/dcharts/EG05.pdf)\n\nB. Lévy, S. Petitjean, N. Ray, and J. Maillot. [Least Squares Conformal Maps for Automatic Texture Atlas Generation](https://members.loria.fr/Bruno.Levy/papers/LSCM_SIGGRAPH_2002.pdf)\n\nO. Sorkine, D. Cohen-Or, R. Goldenthal, and D. Lischinski. [Bounded-distortion Piecewise Mesh Parameterization](https://igl.ethz.ch/projects/parameterization/BDPMP/index.php)\n\nY. O’Donnell. [Precomputed Global Illumination in Frostbite](https://media.contentapi.ea.com/content/dam/eacom/frostbite/files/gdc2018-precomputedgiobalilluminationinfrostbite.pdf)\n\n## Used by\n\n[ArmorPaint](https://armorpaint.org/index.html)\n\n[Bakery - GPU Lightmapper](https://assetstore.unity.com/packages/tools/level-design/bakery-gpu-lightmapper-122218)\n\n[DXR Ambient Occlusion Baking](https://github.com/Twinklebear/dxr-ao-bake) - A demo of ambient occlusion map baking using DXR inline ray tracing.\n\n[Filament](https://google.github.io/filament/)\n\n[Godot Engine](https://github.com/godotengine/godot)\n\n[Graphite/Geogram](http://alice.loria.fr/index.php?option=com_content\u0026view=article\u0026id=22)\n\n[Lightmaps - An OpenGL sample demonstrating path traced lightmap baking on the CPU with Embree](https://github.com/diharaw/Lightmaps)\n\n[redner](https://github.com/BachiLi/redner)\n\n[Skylicht Engine](https://github.com/skylicht-lab/skylicht-engine)\n\n[toy](https://github.com/hugoam/toy) / [two](https://github.com/hugoam/two)\n\n[UNIGINE](https://unigine.com/) - [video](https://www.youtube.com/watch?v=S0gR9T1tWPg)\n\n[Wicked Engine](https://github.com/turanszkij/WickedEngine)\n\n## Related projects\n\n[aobaker](https://github.com/prideout/aobaker) - Ambient occlusion baking. Uses [thekla_atlas](https://github.com/Thekla/thekla_atlas).\n\n[Lightmapper](https://github.com/ands/lightmapper) - Hemicube based lightmap baking. The example model texture coordinates were generated by [thekla_atlas](https://github.com/Thekla/thekla_atlas).\n\n[Microsoft's UVAtlas](https://github.com/Microsoft/UVAtlas) - isochart texture atlasing.\n\n[Ministry of Flat](http://www.quelsolaar.com/ministry_of_flat/) - Commercial automated UV unwrapper.\n\n[seamoptimizer](https://github.com/ands/seamoptimizer) - A C/C++ single-file library that minimizes the hard transition errors of disjoint edges in lightmaps.\n\n[simpleuv](https://github.com/huxingyi/simpleuv/) - Automatic UV Unwrapping Library for Dust3D.\n\n## Models used\n\n[Gazebo model](https://opengameart.org/content/gazebo-0) by Teh_Bucket\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjpcy%2Fxatlas","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjpcy%2Fxatlas","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjpcy%2Fxatlas/lists"}