Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve recompute charts algorithm to avoid creating too many charts #84

Open
Ben-Mack opened this issue Nov 4, 2020 · 2 comments
Open

Comments

@Ben-Mack
Copy link

Ben-Mack commented Nov 4, 2020

I've just started to use xatlas and I'm really amazed by its speed and quality.

However, I've found that recompute charts created too many unnecessary charts (to the point that it looks more like an error). The problem is more visible in high poly meshes.
Disable recompute charts will create self-overlapped charts so it's not an option.

The default viewer with XA_RECOMPUTE_CHARTS enabled (522 charts), these small charts gonna create lots of lightmap seams:
recompute-charts-on

XA_RECOMPUTE_CHARTS disabled looks great at first sight (55 charts):
recompute-charts-off
But actually there're many self-overlapped charts:
overlap-1
overlap-2
overlap-3

It would be great if xatlas's recompute charts algorithm could be improved somehow.
Decreasing number of charts gonna benefit in many aspect: avoid lightmap seams, improve UV coverage when packing with padding...

This is the teapot FBX file: teapot-hi.zip (just the default teapot in 3ds Max with 32 segments)

@jpcy
Copy link
Owner

jpcy commented Nov 14, 2020

High-poly models with a lot of curved geometry like that tend to give poor results. Try the same teapot model with fewer segments.

@Ben-Mack
Copy link
Author

Ben-Mack commented Dec 8, 2020

I've just discovered the post of thekla_atlas author mentioned https://github.com/microsoft/UVAtlas saying that their stretch-minimization parameterization is certainly better than our plain LSCM. Maybe it would give you some idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants