CesiumGS / cesium

An open-source JavaScript library for world-class 3D globes and maps :earth_americas:
https://cesium.com/cesiumjs/
Apache License 2.0
12.95k stars 3.49k forks source link

Oriented Bounding Box frustum check is too loose #4387

Closed lilleyse closed 7 years ago

lilleyse commented 8 years ago

The current OBB vs plane algorithm is an approximation that works best with more evenly-sized dimensions. As a result we sometimes see results like below, which cause tiles to be selected that aren't actually visible.

image

pjcozzi commented 7 years ago

To improve this:

pjcozzi commented 7 years ago

Above, note that when adding IQ's tests, all 6 planes in the orignial algorithm do not need to be checked. Just two corners are "created" and tested.

pjcozzi commented 7 years ago

Reminder to let @erich666 know our results.

pjcozzi commented 7 years ago

@austinEng are you able to reproduce the exact case shown in the screenshot above? I believe the camera is just west of the initial tileset in the Sandcastle example and looking straight down. Or was this another bug?

austinEng commented 7 years ago

I was not. @lilleyse said that he thinks this specific problem was already solved in another bugfix

lilleyse commented 7 years ago

The screenshot was taken before the box debug outlines were fixed https://github.com/AnalyticalGraphicsInc/cesium/pull/4845. Therefore our tilesets just don't have tight fitting bounding boxes, which the 3d-tiles-tools generator will address.

pjcozzi commented 7 years ago

OK, thanks for investigating.