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!
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!