CesiumGS / 3d-tiles

Specification for streaming massive heterogeneous 3D geospatial datasets :earth_americas:
2.13k stars 469 forks source link

`3DTILES_implicit_tiling`: Clarify boundary subdivision algorithm #485

Closed ptrgags closed 3 years ago

ptrgags commented 3 years ago

@kring brought this up in Slack today, the spec currently says that:

A subdivision scheme recursively subdivides a volume by splitting it at the midpoint of some or all of the dimensions.

Which is conceptually true, but not a stable way to calculate it. @kring suggested an alternative:

IMO, the spec should instead state that tile bounds must be computed as follows:

  1. Divide the total bounds in, say, the X direction by the total number of tiles in the X direction at the desired level (2^level).
  2. Multiply that by the X coordinate to get the left side coordinate, and by X+1 to get the right side coordinate.

Essentially compute each bounding volume directly from the root. This is how it is implemented in CesiumJS (see https://github.com/CesiumGS/cesium/blob/main/Source/Scene/Implicit3DTileContent.js#L717).

javagl commented 3 years ago

This should be clarified via the Implementation Note that was added at https://github.com/CesiumGS/3d-tiles/tree/3d-tiles-next/extensions/3DTILES_implicit_tiling#subdivision-rules . If @kring and @ptrgags agree, this can probably be closed.

ptrgags commented 3 years ago

This was fixed in #492