py3dtilers icon indicating copy to clipboard operation
py3dtilers copied to clipboard

Limit the size of the tiles and their atlas

Open LorenzoMarnat opened this issue 2 years ago • 3 comments

To balance our tiles, we put an arbitrary number of features in each tiles (with a kd-tree). Since some features are way bigger than others (more triangles, heavier texture images, ...), the size of the different tiles and their atlas varies a lot. Some of the textures are way to big to be rendered correctly.

To have more balanced tiles, we should be able to limit the size of a tile depending on different parameters:

  • the number of triangles in a tile.
  • the geographic area/extent of a tile. This will ensure that all our tiles are the same length and that we have a balanced decomposition of space.
  • if the tiles are textured, we could balance the tiles with the size of their atlas. Since the textures are bigger in memory than the geometries, it would be usefull to set a maximum atlas size. Some work has been done to limit the size of the atlases #35.

LorenzoMarnat avatar Mar 04 '22 08:03 LorenzoMarnat

I don't know if this is the right issue to post that but someone in my company just implemented a packing algorithm that works well and avoids letting holes in texture atlases. The implementation is based on this project (and initial article / idea): https://github.com/solomon-b/greedypacker Sadly our implementation is in java so you cannot use it directly, but the above link is what we started from and should help.

jailln avatar May 19 '22 09:05 jailln

In my use cases (photogrammetry) I need to convert OBJ mesh into 3D tiles. Currently it is getting converted into a single tile. Would be great if we can decimate this feature into multiple features and created multiple tiles for it. This is how it works in OBj2Tiles project. It is using Fast Quadric Mesh Simplification algorithm for decimation.

andreiveselov avatar Dec 14 '23 15:12 andreiveselov

@andreiveselov is there a way to do same with [py3dtilers] ? I am stuck with same problem my obj file is of 300mbs and it only creates 1 tile for it. But in examples I can see they have conver texture_cube to multiple tiles. image

sau0409 avatar Mar 16 '24 08:03 sau0409