CesiumGS / cesium-native

Apache License 2.0
432 stars 212 forks source link

Add "mip bias" as a tileset option #518

Open nithinp7 opened 2 years ago

nithinp7 commented 2 years ago

Tilesets often show a discrepancy between the stated geometric errors and apparent visual error when rendered. To deal with this, we have a per-tileset max SSE value that can be lowered to compensate for an underestimated geometric error, or increased to compensate for an overestimate. This can force the tileset to render in at the correct level of detail which balances visual quality and performance.

Recently we have noticed some tilesets seem to have discrepancies between the geometry detail and the texture detail. Often we see unnecessarily large textures (e.g., 1024x1024) on tiles with low geometric detail. Increasing the SSE on the other hand might correct the texture quality but force us to render much worse geometric detail.

To compensate for this discrepancy between geometric and texture detail, we could provide a "mip bias" option to throw away the first n highest detailed mips and start at the nth one. This option, along with the existing max SSE option, can help compensate for a range of offset-based errors that can happen either during tiling or during data collection / wrangling.

lilleyse commented 2 years ago

This is an interesting idea, but it's more a problem with the tileset generator, which should be producing more balanced tiles and take texture detail into account when computing geometric error.

So I would start there first instead -- and avoid workarounds in the engine.

This could also be a use case for decoupling geometry and texture LOD in 3D Tiles.