Skip to content

Latest commit

 

History

History
185 lines (169 loc) · 6.92 KB

annex-h.adoc

File metadata and controls

185 lines (169 loc) · 6.92 KB

Annex H: I3S Scene Layer Profile - Mesh-pyramids (MP)

What this profile is for: This profile is implemented by the 3D Object and Integrated Mesh layer types.

Access Pattern

This section describes how a client is expected to load and handle resources from an Indexed 3D Scene Layer using the Mesh-pyramids profile. The general pattern consists of these phases:

  1. Handshake & capabilities negotiation: The client ensures that the service has the expected resources and that a client and a server have a common set of capabilities. Within this phase, the client utilizes the following resources:

    1. Retrieve SceneServiceInfo: General service information

    2. Retrieve 3dSceneLayer: Information on available layers, including symbology and encoding

  2. Index exploration: The client retrieves Node Index Documents and decides – based on lodSelection properties – whether it wants to download and render their attached resources. Within this phase, the client utilizes the following resource:

    1. NodeIndexDocument: Summary of the content of a single node of the index, references children, parent and neighbor nodes, indicating what can be found there

  3. Rendering: When a client has decided that it wants to render the content of a node, it retrieves the attached resources:

    1. SharedData: Material definitions, shared geometries for instancing

    2. GeometryData: Geometry attributes such as positions and indices

    3. TextureData: Images used as texture maps

    4. AttributeData: Attribute data of features used for attribute-based symbolization (as indicated by the DrawingInfo object in the 3dSceneLayer resource)

  4. Identify: Additional resources belonging to a node are accessed only if needed, e.g. for an Identify operation.

    1. AttributeData: If the AttributeData resources of the node have not already been fetched (in step 3 above) client application can request the desired attribute data.

A familiar access pattern based on a single tree data structure is proposed for view frustum culling, level-of-detail selection, and rendering. The following pseudo code illustrates the recommended pattern when navigating an index tree using Mesh Pyramids. Node traversal starts at the root node and recursively calls TraverseNodeTree(node):

TraverseNodeTree(node)
{
    if (node’s mbs is not visible) // see 1)
        // do nothing
    else if (node has no children or ScreenSize(mbs) < maxScreenThreshold) //see 2)
        // render the node // see 3)
    else
        for each child in children(node) // see 4)
            TraverseNodeTree(child);
}

Additional notes:

  1. view frustum culling:

    1. visibility test can include the ‘entirely inside the viewing frustum’ result which can be used to optimize away all further frustum culling tests on the children of the node

    2. this step can also optionally incorporate a cutoff distance threshold test if desired.

  2. level-of-detail selection:

    1. test used to decide how deep to recurse is based on mbs‘ projected size (diameter) on the screen vs the per node provided ‘maxScreenThreshold’.

  3. Rendering:

    1. “render the node” potentially includes some, or all, of the following steps:

      1. Requesting the corresponding geometry and texture data if not already requested

      2. (asynchronously) accessing the corresponding geometry and texture data and loading it into GPU memory if not already loaded

      3. Binding, if loaded, the geometry VBO

      4. Binding, if loaded, the texture

      5. Making a draw() call if, at least, the geometry is loaded

  4. optimized user experience:

    1. children should be sorted by the ascending distance from the observer…

Schema

The mesh pyramids profile makes use of all 7 main resource types and allows for a restricted set of properties. Note that the FeatureData resource is optional for this profile. Hence the 3dSceneLayer resource must contain a DefaultGeometrySchema.

SceneServiceInfo

No specific profile.

3dSceneLayer

Note that in this profile, the DefaultGeometrySchema is mandatory.

3dNodeIndexDocument

There is always exactly 1 geometry and texture resource per node.

===AttributeData Attribute data for all features in a node is stored and made available as discrete, per field resource called attribute. The number of attribute resources corresponds to the number of feature data fields that are chosen to be included along with the 3d Scene Layer cache. FeatureData The FeatureData is optional with this profile. FeatureData SharedResources SharedResources

  "id": 0,
  "version": "3d3c7b51-6336-4893-b484-ad118775bcce",
  "name": "Export2",
  "href": "./layers/0",
  "layerType": "IntegratedMesh",
  "ZFactor": 1.0,
  "spatialReference": {
    "wkid": 4326,
    "latestWkid": 4326
  },
  "alias": "Export2",
  "description": "Vricon 3D Surface Model",
  "copyrightText": "Limited in accordance with the accompanying Vricon EULA",
  "capabilities": [
    "View",
    "Query"
  ],
  "store": {
    "id": "e9ecfade-0d85-4dd7-abb5-a3b0a07b9fd7",
    "profile": "meshpyramids",
    "resourcePattern": [
      "3dNodeIndexDocument",
      "SharedResource",
      "Geometry",
      "Attributes"
    ],
    "rootNode": "./nodes/root",
    "version": "1.4",
    "extent": [
      -106.5054122583675,
      38.994677805489189,
      -103.99630101552692,
      39.996971340614706
    ],
    "indexCRS": "http://www.opengis.net/def/crs/EPSG/0/4326",
    "vertexCRS": "http://www.opengis.net/def/crs/EPSG/0/4326",
    "nidEncoding": "application/vnd.esri.i3s.json+gzip; version=1.4",
    "featureEncoding": "application/vnd.esri.i3s.json+gzip; version=1.4",
    "geometryEncoding": "application/octet-stream; version=1.4",
    "attributeEncoding": "application/octet-stream; version=1.4",
    "textureEncoding": [
      "image/jpeg",
      "image/vnd-ms.dds"
    ],
    "lodType": "MeshPyramid",
    "lodModel": "node-switching",
    "defaultGeometrySchema": {
      "geometryType": "triangles",
      "header": [
        {
          "property": "vertexCount",
          "type": "UInt32"
        },
        {
          "property": "featureCount",
          "type": "UInt32"
        }
      ],
      "topology": "PerAttributeArray",
      "ordering": [
        "position",
        "normal",
        "uv0",
        "color"
      ],
      "vertexAttributes": {
        "position": {
          "valueType": "Float32",
          "valuesPerElement": 3
        },
        "normal": {
          "valueType": "Float32",
          "valuesPerElement": 3
        },
        "uv0": {
          "valueType": "Float32",
          "valuesPerElement": 2
        },
        "color": {
          "valueType": "UInt8",
          "valuesPerElement": 4
        }
      },
      "featureAttributeOrder": [
        "id",
        "faceRange"
      ],
      "featureAttributes": {
        "id": {
          "valueType": "UInt64",
          "valuesPerElement": 1
        },
        "faceRange": {
          "valueType": "UInt32",
          "valuesPerElement": 2
        }
      }
    }
  }
}