iTowns / itowns

A Three.js-based framework written in Javascript/WebGL for visualizing 3D geospatial data
http://www.itowns-project.org
Other
1.11k stars 303 forks source link

culling does not work in 3d tiles #347

Closed qdnguyen closed 3 years ago

qdnguyen commented 7 years ago

It seem that the culling does not work in 3d tiles, it check only bounding box of root and download all tiles.

autra commented 7 years ago

See https://github.com/iTowns/itowns2/commit/a311bf346df3b487d274b5ad3cc9aaf2f8749002 (and commit message)

autra commented 7 years ago

(I don't know why it has been disable though)

Jeremy-Gaillard commented 7 years ago

The culling that has been disabled is the automatic culling of Three. We already cull the tiles themselves in 3dtiles_processing, so it is redundant.

It seem that the culling does not work in 3d tiles, it check only bounding box of root and download all tiles.

Downloading != displaying. We may have a suboptimal downloading policy (i.e. we download all of a tile's children, not only the ones that are visible), but that doesn't mean the tiles are not culled for rendering. Are you sure the tiles aren't culled? Can you provide an example?

qdnguyen commented 7 years ago

the problem is not only frustum culling but also sse culling, it download all tiles in tileset.json even geometric error is set with very small value.

Jeremy-Gaillard commented 7 years ago

Ok, tested it, and it seems the geometricError value for the root node is ignored. For all the other nodes, it should be working fine.

qdnguyen commented 7 years ago

Downloading != displaying. We may have a suboptimal downloading policy (i.e. we download all of a tile's children, not only the ones that are visible)

3d tiles is created to contain city model? i do not think we can download all city before rendering? we must use frustum, sse to select tiles, LODs for loading and rendering.

Ok, tested it, and it seems the geometricError value for the root node is ignored. For all the other nodes, it should be working fine.

can you commit it please?

Jeremy-Gaillard commented 7 years ago

3d tiles is created to contain city model? i do not think we can download all city before rendering? we must use frustum, sse to select tiles for loading and rendering.

This is not what is done. We do not download all the city. When geometricError > SSE, we download all the children (NOT the grandchildren or any node after them) of the tile. This works fine if your tileset is properly built, i.e. if there are multiple levels in the scene graph described by the tileset.

can you commit it please?

I made my tests on the master. I'll look at the root node being ignored later, I have other bugs to fix in the meantime.

qdnguyen commented 7 years ago

When geometricError > SSE, we download all the children (NOT the grandchildren or any node after them) of the tile.

This may explain why all tiles are downloaded?

Almost city 3d-tiles demo in the cesium was built as a grille with one LOD, it means that we should use frustum to select the child, not just SSE.

I made my tests on the master. I'll look at the root node being ignored later, I have other bugs to fix in the meantime.

ok, please tell me when you commit it.

gchoqueux commented 4 years ago

@gmaillet this issue should be checked

gchoqueux commented 3 years ago

I verify, the culling works in 3d tiles.