Skip to content

f1shel/pyatlas

Repository files navigation

Deprecated: please use Open3d and refer to issue #1

pyatlas

A python wrapper of UVAtlasTool. Tested on Linux(Ubuntu22.04) and python 3.10.14.

Installation

pip install git+https://github.com/f1shel/pyatlas.git

Usage

from pyatlas import atlas
atlas(vertices, faces,
    maxCharts: int = 0,
    maxStretch: float = 0.16667,
    gutter: float = 2.0,
    width: int = 512,
    height: int = 512
)

Example

from pyatlas import atlas
import trimesh

mesh = trimesh.load("bunny.obj")
vmapping, indices, uvs = atlas(mesh.vertices, mesh.faces)

vertices[vmapping] # new_vertices (v, 3)
indices            # new_faces    (f, 3)
uvs                # texcoords    (v, 2)

About

python wrapper of microsoft UVAtlas

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages