Skip to content

Vector data... in glTF? #825

Description

@lilleyse

Updated 2026-05-29 by @donmccurdy.

Introduction

“Vector Tiles” refers to upcoming support in the 3D Tiles standard for points, lines and polygons. Data types and associated styling will be comparable to GeoJSON or Mapbox Vector Tiles (MVT), but with a unique emphasis on 3D-first approaches to coordinates, tiling, and rendering techniques. Geometry and metadata are encoded in glTF 2.0 assets and extensions, referenced as “tiles” within a 3D Tiles “tileset.”

Formally, the Vector Tiles specification consists of three new extensions: one (1) 3D Tiles extension, and two (2) glTF extensions. Some pre-existing glTF extensions are likely to be useful in Vector Tiles tilesets, as well, as listed below.

Specifications

3DTILES_content_gltf_vector (3D Tiles extension, ✨ NEW)

Included in the tileset.json file in a 3D Tiles 1.1 tileset, this extension identifies one or more glTF tile contents as “vector data”, and informs runtimes on how to interpret that content. This extension is required for vector support in 3D Tiles 1.1. In 3D Tiles 2.0, this extension succeeded by a nearly-identical glTF extension at some point (TBD) in the future.

  • Specification status: 🚧 Public Draft
  • CesiumJS status: 🧪 Technical Preview

KHR_mesh_primitive_restart (glTF extension, ✨ NEW)

Included in a glTF 2.0 asset, this extension includes no schema or other properties, simply allowing the glTF asset to use primitive restart indices for LINE_STRIP, LINE_LOOP, and other mesh primitive topologies. Primitive restart indices are required when encoding vector polyline and polygon data. When writing only vector point data, this extension can be omitted.

  • Specification status: 🚧 Public Draft
  • CesiumJS status: 🧪 Technical Preview

EXT_mesh_polygon (glTF extension, ✨ NEW)

Included in a glTF 2.0 asset, this extension provides metadata allowing polygons to be encoded with complete topology, avoiding the “bag of triangles” problem and a loss of topology. When encoding vector polygon tiles this extension must be included; otherwise, it can be omitted.

  • Specification status: 🚧 Public Draft
  • CesiumJS status: 🧪 Technical Preview

EXT_mesh_features (glTF extension)

Included in a glTF 2.0 asset, this extension provides unique IDS for source “features” within a mesh primitive. Because each mesh primitive is expected to encode many points, lines, or polygons, these unique IDs are important for identifying source features within the vertex stream, and associating them with properties/metadata (see below). This extension can be omitted from any Vector Tiles tileset that does not require properties/metadata.

  • Specification status: ✅ Complete
  • CesiumJS status: ✅ Complete

EXT_structural_metadata (glTF extension)

Included in a glTF 2.0 asset, this extension provides metadata associated with “features” in a scene. The features themselves, and the IDs by which they are identified, are defined by EXT_mesh_features (see above). This extension can be omitted from any Vector Tiles tileset that does not require properties/metadata.

  • Specification status: ✅ Complete
  • CesiumJS status: ✅ Complete

Technical Preview in Cesium ion, CesiumJS, and Cesium Native

After source data (GeoJSON) is tiled and converted to 3D Tiles (using Cesium ion, with tiling enabled), results can be loaded and viewed in CesiumJS (v1.142+) or Cesium Native, with more instructions below.

Image

Current scope and future work

  • Inputs: Source format for tilers must be a valid GeoJSON (.json or .geojson). Must contain points and/or lines; polygons are not supported for tiling yet but will be available soon.
  • Outputs: 3D Tiles in global tiling scheme using 3D Tiles implicit tiling
  • Simplification: Simplification is executed by targeting an average of N elements at a maximum per tile. Beyond this threshold, elements will be removed based on their relative sizes within the tile (random selection for points, length for lines)
  • Styling: Visual styles are applied to tilesets using the Cesium3DTileStyle API based on feature properties (EXT_structural_metadata), or may be specified explicitly for individual features using programmatic APIs described below.
  • Picking / interactivity: Picking is supported, and returns a Cesium3DTileFeature including associated Feature ID and properties (EXT_structural_metadata).
  • Draping / clamping to terrain: Not yet supported, but coming soon.
  • Performance: Streaming vector data with 3D Tiles — with appropriate tiling — allows CesiumJS to handle vector data at any scale by using varying level of detail. In addition to this streaming level-of-detail support, Cesium.js can performantly load, render, and dynamically update larger vector collections than was previously possible on-screen at one time.

Quickstart

0. Examples

  • Pending v1.142 release

1. Tiling

Upload GeoJSON to Cesium ion, and select "GeoJSON (tile as 3D Tiles)" as the data type.

2. Viewing

Example in CesiumJS:

const tileset = await Cesium.Cesium3DTileset.fromIonAssetId(4854512);
viewer.scene.primitives.add(tileset);
viewer.zoomTo(tileset);

Styling uses the existing Cesium3DTileStyle API:

const tileset = await Cesium.Cesium3DTileset.fromUrl(resourceToLoad);

tileset.style = new Cesium.Cesium3DTileStyle({
  color: "color('orange')",
  pointSize: 12,
  pointOutlineWidth: 2,
  pointOutlineColor: "color('cyan')",
  lineWidth: {
    conditions: [
      ['${roadType} === "HIGHWAY"', 6],
      ['${roadType} === "AVENUE"', 4],
      ['${roadType} === "STREET"', 2],
      ["true", 1],
    ],
  },
});

viewer.scene.primitives.add(tileset);

Style expressions may be literal/constant values affecting the entire tileset, or property-based expressions.

History

Original description, created September 2025 and last updated February 2026

This is an idea I've been playing around with for a while. Can we use glTF for vector data? Specifically, large amounts of 3D cartesian vector data. Here are some initial ideas.

Points

[!NOTE]

Lines

Polygons

[!NOTE]

  • How to encode edges for polygons with holes?

Styling

  • Styling features would happen client side. Some examples:
    • Points: labels, anchor lines, etc
    • Lines: mitering, line width, dashed patterns, etc
    • Polygons: outline, fill pattern, etc
  • Styling would also define layering, ordering, and draping behavior
  • 3D Tiles Declarative Styling files could be provided alongside a tileset.json

Compression

Demo

Here's a demo of some vector data (provided by Maxar) converted from GeoJSON to 3D Tiles - includes line and polygon features and runtime styling. No new extensions and running in stock CesiumJS.

glTF files are using the following extensions:

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions