The following is a list of samples for different glTF extensions that are supported by Cesium. Each directory contains a dedicated .gltf
file that contains the actual glTF asset. Additionally, each directory also contains a simple tileset.json
file that is a 3D Tiles tileset which just contains the respective glTF asset as its only content. These tilesets can be viewed in CesiumJS, by hosting the base directory of this repository on a local server.
The EXT_mesh_features
extension is a glTF 2.0 extension that allows identifying geometry or subcomponents of geometry in glTF 2.0 assets as individual 'features', by associating them with a feature ID.
The sandcastle code for viewing the EXT_mesh_features
samples is shown in glTF-Mesh-Features-Samples-Sandcastle.js
Sample | Screenshot |
---|---|
FeatureIdAttribute Uses an attribute of a mesh primitive to assign feature IDs to vertices |
|
FeatureIdTexture Uses a feature ID texture to assign feature IDs to texels on the surface of the geometry |
The EXT_structural_metadata
extension is a glTF 2.0 extension that allows storing structured metadata in glTF 2.0 assets in the form of property tables. Together with the EXT_mesh_features
extension, the metadata can be looked up in these tables, using the feature IDs.
The sandcastle code for viewing the EXT_structural_metadata
samples is shown in glTF-Structural-Metadata-Samples-Sandcastle.js
Sample | Screenshot |
---|---|
FeatureIdAttributeAndPropertyTable Vertices that are associated with properties that are stored in a property table |
|
FeatureIdTextureAndPropertyTable Texels that are associated with properties that are stored in a property table |
|
MultipleFeatureIdsAndProperties Multiple feature ID sets that are associated with metadata containing multiple properties |
|
SharedPropertyTable Two mesh primitives that define feature IDs, where both refer to the same property table |
|
MultipleClasses A mesh primitive that contains two feature IDs that are used for looking up the values for two different metadata classes |
|
ComplexTypes Features that contain properties with more complex types |
|
SimplePropertyTexture Properties that are stored in a texture |
|
PropertyAttributesPointCloud Properties that are stored in vertex attributes, contained in a 3D Tiles tileset that contains statistics for the metadata values. |
Sample | Screenshot |
---|---|
GpuInstancesMetadata An example that uses EXT_mesh_gpu_instancing to create GPU instances that are associated with feature IDs, which are used for looking up metadata in a property table |
|
BoxPrimitiveOutline An example that uses the CESIUM_primitive_outline extension to enable outline rendering for the edges of a unit cube. |