Skip to content

3D Tiles Validator Roadmap #5

@pjcozzi

Description

@pjcozzi

Validator roadmap

Validates

This is a non-exhaustive list, please add all corner-cases as you come across them. Also update the spec/schema with cases that they do not cover.

Requirements

Architecture

  • Node.js library and command-line tool
  • Returns JSON object (Node.js) and readable output (command-line tool) with errors/warnings. Base off of the glTF Validator. Include JSON line numbers when possible.
  • Unit tests with outstanding code coverage
  • Reference doc (Node.js library) and usage doc (command-line tool)

tileset.json validation

  • General
    • Valid JSON Validator - readTileset #10
    • Validate the schema, e.g., required properties, min/max values, allowed datatypes/values, etc.
    • Port any bounding volume tests to Cesium
  • tile (including spatial coherence of the tree)
    • Going down the tree, a tile's geometricError must be <= to the parent tile's geometricError.
    • Likewise, root.geometricError must be <= the tileset's geometricError.
    • Going down the tree, a tile's boundingVolume must be inside/overlap its parent tile's boundingVolume (taking into account applying transforms).
      • The tile's content needs to be strictly inside the parent tile's boundingVolume. See Bounding volume spatial coherence.
        • This is a non-trivial and needs to take into account 3D Tiles transform and glTF node hierarchy (use gltf-pipeline). Get enough experience before tackling this one.
      • When a tile has no content (because it is just used for culling), its boundingVolume must be completely inside its parent tile's boundingVolume. Also update the spec with this.
  • tile.content
    • tile.content.boundingVolume, when defined, is completely inside tile.boundingVolume (use Cesium's functions)
    • tile.content.url points to a file that exists (and a tile/tileset that validates)
    • When tile.content.url is an external tileset, these rules must be followed.

Tile format validation

  • b3dm
    • Validate header Validator - validateB3dm header #9
    • Validate Batch Table is valid JSON and follows the schema (have a generic validation function for this).
      • Validate offset/length for all properties pointing to the binary body are in range
    • Validate glTF using glTF-Validator.
    • If the tile has a Batch Table, verify that the glTF has a technique parameter semantic _BATCHID.
    • Validate that glTF batchId attributes are in range, i.e., they exist in the Batch Table.
    • Validate batch table hierarchy
  • i3dm
    • Validate header. Validator - validate i3dm header #22
    • Validate Feature Table is valid JSON and follows the schema.
      • Validate BATCH_ID semantic, if defined, is in range (have a generic validation function for this).
      • If NORMAL_UP/NORMAL_RIGHT (or NORMAL_UP_OCT32P/NORMAL_RIGHT_OCT32P) are defined, verify that they are orthonormal.
      • Validate offset/length for all properties pointing to the binary body are in range
    • Validate Batch Table is valid JSON and follows the schema (have a generic validation function for this).
      • Validate offset/length for all properties pointing to the binary body are in range
    • Validate glTF using glTF-Validator.
  • pnts
    • Validate header. Validator - validate pnts header #24
    • Validate Feature Table is valid JSON and follows the schema.
      • Validate BATCH_ID semantic, if defined, is in range (have a generic validation function for this).
      • Validate RGBA/RGB/CONSTANT_RGBA are in range.
      • If NORMAL/NORMAL_OCT16P are defined, verify they are of unit length.
      • Validate offset/length for all properties pointing to the binary body are in range
    • Validate Batch Table is valid JSON and follows the schema (have a generic validation function for this).
      • Validate offset/length for all properties pointing to the binary body are in range
  • vctr
    • Validate header.
    • Validate Feature Table is valid JSON and follows the schema.
      • Validate BATCH_ID semantic, if defined, is in range (have a generic validation function for this).
      • TODO: finish this as the tile format stabilizes.
      • Validate offset/length for all properties pointing to the binary body are in range
    • Validate Batch Table is valid JSON and follows the schema (have a generic validation function for this).
      • Validate offset/length for all properties pointing to the binary body are in range
  • cmpt

Declarative styling validation

Do this last after the tileset.json and tile formats validation.

  • Valid JSON.
  • Validate the schema.
  • Validate each JavaScript expression (Cesium uses jsep).
    • Cesium does some runtime validation, but the validator needs to be more comprehensive. See Expression.js. The unit tests may also be useful, see ExpressionSpec.js.
    • Carefully read the styling spec and validate all rules related to type compatibility, function/constructor parameters, reg exps, etc.
  • When a tileset and style are validated at the same time, verify that the style references properties that exist in the batch table? Or they should should return undefined?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions