头图

depends on

3D Tiles 1.0

optional and required

If glTF is used as the tile content file, it must be present in both the extensionsUsed and extensionsRequired arrays, ie "required".

1 Introduction

image-20211125030956707.png

There is a tile in the above picture that references house.glb , and house.glb is a house, which can be directly referenced by the tiles of 3D Tiles. Here "content": "house.glb" is shorthand.

This extension allows 3D Tiles to use glTF 2.0 model files directly on tile files. Both gltf files and binary glb files in JSON format are supported.

Using this extension simplifies data production, mainly by taking advantage of the glTF toolchain. Most of the time, 1.0 tile data can be easily converted to glTF format.

Refer to Migration Guide .

2. Example JSON

The specific JSON schema is defined at the end of the text.

The runtime engine (usually CesiumJS) must determine compatibility issues before loading the tile content.

For example, some glTF model files use some glTF extensions, then these additional glTF extensions must be written in 3DTILES_content_gltf object in extensions of the Tileset.

Example:

{
  "asset": {
    "version": "1.0"
  },
  "extensionsUsed": ["3DTILES_content_gltf"],
  "extensionsRequired": ["3DTILES_content_gltf"],
  "extensions": {
    "3DTILES_content_gltf": {
      "extensionsUsed": ["EXT_mesh_gpu_instancing"],
      "extensionsRequired": ["EXT_mesh_gpu_instancing"]
    }
  },
  "geometricError": 240,
  "root": {
    "boundingVolume": {
      "region": [
        -1.3197209591796106,
        0.6988424218,
        -1.3196390408203893,
        0.6989055782,
        0,
        88
      ]
    },
    "geometricError": 0,
    "refine": "ADD",
    "content": {
      "uri": "trees.gltf"
    }
  }
}

It can be seen that the extensions attribute of 3DTILES_content_gltf object under it, and there are two extensionsUsed and 061ea13b100d09 arrays extensionsRequired

The meaning is similar. The extensionsUsed array indicates which extensions are used by extensionsRequired , and the 061ea13b100d31 array indicates that these extensions are required for normal use.

The above data shows that the content file trees.gltf EXT_mesh_gpu_instancing extension in the glTF specification, and this extension must be used.

Attach 3DTILES_content_gltf mode definition

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "tileset.3DTILES_content_gltf.schema.json",
  "title": "3DTILES_content_gltf extension",
  "type": "object",
  "description": "3D Tiles extension that allows a tileset to use glTF models directly as tile content.",
  "allOf": [
    {
      "$ref": "tilesetProperty.schema.json"
    }
  ],
  "properties": {
    "extensionsUsed": {
      "type": "array",
      "description": "An array of glTF extensions used by glTF content in the tileset.",
      "items": {
        "type": "string"
      },
      "minItems": 1
    },
    "extensionsRequired": {
      "type": "array",
      "description": "An array of glTF extensions required by glTF content in the tileset.",
      "items": {
        "type": "string"
      },
      "minItems": 1
    },
    "extensions": {},
    "extras": {}
  }
}

岭南灯火
83 声望65 粉丝

一介草民


引用和评论

0 条评论