iTowns / itowns

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

3D Tiles cache ? #1170

Open jailln opened 5 years ago

jailln commented 5 years ago

Cache does not seem enabled by default for 3D Tiles.

For instance, if you zoom in/out in this example (warning: temporary link) you can see from the network debugging tool that the tiles are re-requested.

Is there a way to enable cache for 3D Tiles ?

zarov commented 5 years ago

While it is not checked by iTowns, it should be checked in the browser cache. In your debugging tool, is the Disable cache option unchecked ?

Here is what I got

image

jailln commented 5 years ago

Yes you're right, my question was not well expressed.

While it is cached, it seems to be unloaded from iTowns' memory and hence requested again (from cache) and then parsed again ? If this is correct; is there an option to avoid unloading these tiles and to just not render them ?

zarov commented 5 years ago

I don't really know the 3dtiles part of iTowns, so I have no clue here. Maybe @jailln can help here ?

jailln commented 5 years ago

Haha that's actually me asking the question ;)

How does it work for other types of data ?

zarov commented 5 years ago

Damn sorry I got confused with another thread !

For most data in iTowns, apart from 3dtiles and pointclouds, it is set in the Cache in the DataSourceProvider. For 3dtiles, I think tweaking things here could be a solution.

jailln commented 5 years ago

Ok, thanks. I guess we should use the Cache object as well in 3D Tiles then.

A solution might also be to turn the loaded tiles contents visible or not using Threejs' Object3D.visible instead of unloading them after a fixed delay that is defined here.

gchoqueux commented 5 years ago

A solution might also be to turn the loaded tiles contents visible or not using Threejs' Object3D.visible instead of unloading them after a fixed delay that is defined here.

yes, and unloading children when theirs parent aren't visible.

mgermerie commented 1 year ago

The complete 3d-tiles support is planned in the short term road map. We are currently studying possibilities in terms of libraries to enhance support (as mentioned in https://github.com/iTowns/itowns/discussions/1917).