npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@agrande/xatlas-web

v1.3.0

Published

[![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&svg=true)](https://ci.appveyor.

Downloads

13

Readme

xatlas

Actions Status Appveyor CI Build Status License: MIT

xatlas is a small C++11 library with no external dependencies that generates unique texture coordinates suitable for baking lightmaps or texture painting.

It is an independent fork of thekla_atlas, used by The Witness.

Screenshots

Example - Cesium Milk Truck

| Viewer | Random packing | Brute force packing | |---|---|---| | Viewer | Random packing | Brute force packing |

Example - Godot Third Person Shooter demo

Godot TPS

Graphite/Geogram

Graphite/Geogram

How to use

Building

Premake is used. For CMake support, see here.

Integration into an existing build is simple, only xatlas.cpp and xatlas.h are required. They can be found in source/xatlas

Windows

Run build\premake.bat. Open build\vs2019\xatlas.sln.

Note: change the build configuration to "Release". The default - "Debug" - severely degrades performance.

Linux

Required packages: libgl1-mesa-dev libgtk-3-dev xorg-dev.

Install Premake version 5. Run premake5 gmake, cd build/gmake, make.

Bindings

Python

Generate an atlas (simple API)

  1. Create an empty atlas with xatlas::Create.
  2. Add one or more meshes with xatlas::AddMesh.
  3. Call xatlas::Generate. Meshes are segmented into charts, which are parameterized and packed into an atlas.

The 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.

Cleanup with xatlas::Destroy.

Example code here.

Generate an atlas (tools/editor integration API)

Instead of calling xatlas::Generate, the following functions can be called in sequence:

  1. xatlas::ComputeCharts: meshes are segmented into charts and parameterized.
  2. xatlas::PackCharts: charts are packed into one or more atlases.

All of these functions take a progress callback. Return false to cancel.

You 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.

See the viewer for example code.

Pack multiple atlases into a single atlas

  1. Create an empty atlas with xatlas::Create.
  2. Add one or more meshes with xatlas::AddUvMesh.
  3. Call xatlas::PackCharts.

Example code here.

Technical information / related publications

Ignacio Castaño's blog post on thekla_atlas

P. Sander, J. Snyder, S. Gortler, and H. Hoppe. Texture Mapping Progressive Meshes

K. Hormann, B. Lévy, and A. Sheffer. Mesh Parameterization: Theory and Practice

P. Sander, Z. Wood, S. Gortler, J. Snyder, and H. Hoppe. Multi-Chart Geometry Images

D. Julius, V. Kraevoy, and A. Sheffer. D-Charts: Quasi-Developable Mesh Segmentation

B. Lévy, S. Petitjean, N. Ray, and J. Maillot. Least Squares Conformal Maps for Automatic Texture Atlas Generation

O. Sorkine, D. Cohen-Or, R. Goldenthal, and D. Lischinski. Bounded-distortion Piecewise Mesh Parameterization

Y. O’Donnell. Precomputed Global Illumination in Frostbite

Used by

ArmorPaint

Bakery - GPU Lightmapper

DXR Ambient Occlusion Baking - A demo of ambient occlusion map baking using DXR inline ray tracing.

Filament

Godot Engine

Graphite/Geogram

Lightmaps - An OpenGL sample demonstrating path traced lightmap baking on the CPU with Embree

redner

Skylicht Engine

toy / two

UNIGINE - video

Wicked Engine

Related projects

aobaker - Ambient occlusion baking. Uses thekla_atlas.

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

Microsoft's UVAtlas - isochart texture atlasing.

Ministry of Flat - Commercial automated UV unwrapper.

seamoptimizer - A C/C++ single-file library that minimizes the hard transition errors of disjoint edges in lightmaps.

simpleuv - Automatic UV Unwrapping Library for Dust3D.

Models used

Gazebo model by Teh_Bucket