TMS tileset overlays
- calculate appropriate detail mapping to TMS level
- use bound size? Geometric error to pixel size?
- add helper to request, load, lock, and release textures in a data set
- when parsing a tileset request all textures, then draw to target geometry texture.
- use existing uvs if possible?
- use canvas texture to avoid need for webglrenderer?
- compose multiple textures together.
- release textures on tile dispose
- if image set data is more detailed than the geometry then split into 4 tiles.
- Reuse qmesh split logic but split on calculated bounding box axis
- dispose of virtual children when parent is disposed.
Reuse tile image data managers in image loader data sets. Use for qmesh, too?
tiles.registerPlugin( new ImageOverlayPlugin( {
overlays: [
new TMSOverlay( url ),
new XYZOverlay( url, options ),
],
} );
Remaining work:
Quality
- Split geometry for higher resolution data when last layer is reached.
- Calculate level for ellipsoid geometry based on available pixel density (?? - this means that tile size will impact detail loaded? Applies to planar projection, as well).
Later
Performance & Preload
- *Account for memory usage in LRUCache somehow?
- Tiles now have "n" more textures and therefore memory usage
- Can account for loaded texture data, as well?
- Can add a plugin callback for calculating size?
- *Integrate image tile downloads into the same download queue for tiles so they are prioritized with the rest of the downloads.
- Add "fake" tile shape for the sake of sorting? Use a proxy?
- Increase / tune download queue size in tiles renderer & plugin
- Right now the Cesium tile sets load much more quickly.
- Afford a more intelligent selection of tile mapping layer to tiles.
- Can compute some implicit geometric error for the tiles.
Quality
- Add option for fading images in after they've loaded
- Add option for not showing a new layer until all images are loaded
- Add a custom priority queue function to ensure most relevant tiles are loaded ASAP
- Load images for "visible", "in frustum" and "used" tiles first.
- Consider drawing lower-res versions of tiles if high-res versions aren't present to enable more dynamic updates? Ideally we could update child tiles when parent LoDs load but this is more complex.
- Handle planar projection
- How to handle auto-unwrapped tiles? Possibly keep extra information denoting the original range? (related to #1156)(Figure out how to handle planar projection of lat / lon)
- Add preload for tiles
Other
- Fix / understand Google Tiles root tiles issue (possibly due to latitude wrapping)
- At longitude wrap boundary the values jump from nearly - PI to nearly PI across a single triangle.
- Add support for cap geometry (lunar tile set, earth)
- Allow for mipmap generation option?
- Account for image overlay tiles in LRUCache memory estimation? How? They're shared? Store this separately per image source?
- Add support for load progress?
- Consider need for "needs render" or "needs update" events. Test with r3f?
Get textures working on Google Photorealistic Tiles & lunar data
The lunar data contains tiles that wrap over the poles of the globe resulting in some odd uvs and artifacts.
Google tiles contains a similar, though smaller, cap:
Perhaps this can be addressed by affording some kind of wrapping logic at the poles.
When rendering to the google earth data set we can suffer from some artifacts at UV seams:
- would be best to compose textures in post to avoid issues from uv retargeting
- or we can expand the uv bounds.
Planar Mapping
tiles.registerPlugin( new ImageOverlayPlugin( {
renderer,
overlays: [ new XYZPlugin( {
/* ... */
// Texture is projected along the Z axis - origin is the corner
// of the image. If not present frame is assumed to be ellipsoid.
frame: new Matrix4(),
} ),
} ) );
/* ... */
plugin.overlays[ 0 ].frame = new Matrix4();
plugin.needsUpdate = true;
// Regenerate all UVs, textures, ranges, etc on all overlays. Need to do so without disposing
// of all previously loaded textures if they're still needed. Can be smart and only update needed textures.
- Preload can only occur with regions and ellipsoid projection (skip if frame is provided)
- eventually can project bounds into the local frame.
- Initial implementation is removing the overlay and all images, regenerating uvs, then re initializing.
- eventually would be best to reuse any images that are needed. this may be one reason to allow for marking tiles but delaying the fetch?
~Another error occurred - rotate around, then switch to open street maps:~
Also ran into "INSUFFICIENT_RESOURCES" (loading a lot of tiles and then switching back and forth a few times can cause this):
Closing in favor of #1204, #1205, #1206