Warning
|
Composite was deprecated in 3D Tiles 1.1. See cmpt migration guide.
|
The Composite tile format enables concatenating tiles of different formats into one tile.
3D Tiles and the Composite tile allow flexibility for streaming heterogeneous datasets. For example, buildings and trees could be stored either in two separate Batched 3D Model and Instanced 3D Model tiles or, using a Composite tile, the tiles can be combined.
Supporting heterogeneous datasets with both inter-tile (separate tiles of different formats that are in the same tileset) and intra-tile (different tile formats that are in the same Composite tile) options allows conversion tools to make trade-offs between number of requests, optimal type-specific subdivision, and how visible/hidden layers are streamed.
A Composite tile is a binary blob in little endian.
The 16-byte header section contains the following fields:
Field name | Data type | Description |
---|---|---|
|
4-byte ANSI string |
|
|
|
The version of the Composite format. It is currently |
|
|
The length of the entire Composite tile, including this header and each inner tile, in bytes. |
|
|
The number of tiles in the Composite. |
Inner tile fields are stored tightly packed immediately following the header section. The following information describes general characteristics of all tile formats that a Composite tile reader might exploit to find the boundaries of the inner tiles:
-
Each tile starts with a 4-byte ANSI string,
magic
, that can be used to determine the tile format for further parsing. See tile format specifications for a list of possible formats. Composite tiles can contain Composite tiles. -
Each tile’s header contains a
uint32
byteLength
, which defines the length of the inner tile, including its header, in bytes. This can be used to traverse the inner tiles. -
For any tile format’s version 1, the first 12 bytes of all tiles is the following fields:
Field name | Data type | Description |
---|---|---|
|
4-byte ANSI string |
Indicates the tile format |
|
|
|
|
|
Length, in bytes, of the entire tile. |
Refer to the specification for each tile format for more details.
Composite tiles use the .cmpt
extension and application/octet-stream
media type.
An explicit file extension is optional. Valid implementations may ignore it and identify a content’s format by the magic
field in its header.
This section is informative
-
Python
packcmpt
tool in gltf2glb toolset contains code for combining one or more Batched 3D Model or Instanced 3D Model tiles into a single Composite tile file. -
Code for reading the header can be found in
Composite3DTileContent.js
in the CesiumJS implementation of 3D Tiles.