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

Consider restoring texture repack example? #108

Open
trey0 opened this issue Sep 12, 2022 · 0 comments
Open

Consider restoring texture repack example? #108

trey0 opened this issue Sep 12, 2022 · 0 comments

Comments

@trey0
Copy link

trey0 commented Sep 12, 2022

Hi! Really glad you invested the time to build xatlas, it's a great contribution!

We saw that in earlier versions you included example_repack.cpp which goes beyond just generating optimized texture atlas coordinates and actually repacks an output texture atlas image. But it was only chance that we discovered it through this issue. The commit removing it said "Incomplete and not a good example of the intended use of the library".

But this code was just what we needed for our application! We have a large 3D model with an efficiently packed texture atlas but want to slice it up into a tiled representation (3D Tiles format). There are plenty of libraries that can slice the geometry, but it's much harder to find one that can repack the atlas for each tile to discard the unnecessary texture imagery from the rest of the model. Maybe from your perspective the interesting and challenging bit is the texture atlas coordinates, but remapping the texture imagery isn't trivial either and it's great that you showed how to do it.

We restored your repack example in our fork here with trivial updates so it works with your latest API. Just suggesting others might similarly find it useful. Thanks!

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

1 participant