Skip to content

Latest commit

 

History

History
117 lines (83 loc) · 4.53 KB

File metadata and controls

117 lines (83 loc) · 4.53 KB

Composite

Warning
Composite was deprecated in 3D Tiles 1.1. See cmpt migration guide.

Overview

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.

Layout

Composite layout (dashes indicate optional fields):

layout
Figure 1. Data layout of a Composite tile

Padding

A tile’s byteLength shall be aligned to an 8-byte boundary. All tiles contained in a composite tile shall also be aligned to an 8-byte boundary.

Header

The 16-byte header section contains the following fields:

Table 1. Header fields for Composite tiles
Field name Data type Description

magic

4-byte ANSI string

"cmpt". This can be used to identify the content as a Composite tile.

version

uint32

The version of the Composite format. It is currently 1.

byteLength

uint32

The length of the entire Composite tile, including this header and each inner tile, in bytes.

tilesLength

uint32

The number of tiles in the Composite.

Inner tiles

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:

Table 2. Common header fields for tile formats
Field name Data type Description

magic

4-byte ANSI string

Indicates the tile format

version

uint32

1

byteLength

uint32

Length, in bytes, of the entire tile.

Refer to the specification for each tile format for more details.

File extension and media type

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.

Implementation examples

This section is informative