-
Notifications
You must be signed in to change notification settings - Fork 486
Open
Description
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
- Use primitive
mode: 0(POINTS) - Use
EXT_mesh_featuresandEXT_structural_metadatato associate points with metadataFeature ID by Index+ property tables
- Styling is applied separately, e.g. with 3D Tiles Declarative Styling
- This would include label rendering, anchor lines, etc.
Note
- How does this relate to KHR_billboard?
Lines
- Use primitive
mode: 1(LINES),mode: 2(LINE_LOOP) ormode: 3(LINE_STRIP)- For the latter two, use
EXT_mesh_primitive_restartto batch multiple lines into a single primitive
- For the latter two, use
- Use
EXT_mesh_featuresandEXT_structural_metadatato associate lines with metadata.Feature ID by Vertex+ property tables.
- Styling is applied separately, e.g. with 3D Tiles Declarative Styling
- This would include mitering, line width, dashed patterns, etc.
Polygons
- Use primitive
mode: 4(TRIANGLES) - polygons are pre-triangulated for performance reasons - Use
EXT_mesh_featuresandEXT_structural_metadatato associate polygons with metadata.Feature ID by Vertex+ property tables.
- Indicate which edges form the outline
- Evaluate
EXT_mesh_primitive_edge_visibility
- Evaluate
- Styling is applied separately, e.g. with 3D Tiles Declarative Styling
- This would include outline, fill pattern, etc.
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
- From previous experiments, glTF + meshopt + gzip file size was on par with the legacy .vctr format + gzip
- Haven't compared against other formats like Mapbox Vector Tiles, MapLibre Tiles, or Geobuf
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:
Metadata
Metadata
Assignees
Labels
No labels
