Esri / i3s-spec

This repository hosts the specification for Scene Layers which are containers for arbitrarily large amounts of geographic data. The delivery and persistence model for Scene Layers, referred to as Indexed 3d Scene Layer (I3S) and Scene Layer Package (SLPK) respectively, are specified.
Other
318 stars 85 forks source link

Is there any deferences between `defaultGeometrySchema` & `geometryDefinition` ? #102

Closed onsummer closed 3 years ago

onsummer commented 3 years ago

They look similar, seem to be a description of binary geometric data's structure, but what the differences ?

I know that node.mesh.geometry.definition use geometryDefinition by referring geometryDefinition's index, but I'd like to know where defaultGeometrySchema is used.

eg. :

"defaultGeometrySchema": {
    "header": [
        {
            "property": "vertexCount",
            "type": "UInt32"
        },
        {
            "property": "featureCount",
            "type": "UInt32"
        }
    ],
    "topology": "PerAttributeArray",
    "ordering": [
        "position",
        "normal",
        "uv0",
        "color",
        "region"
    ],
    "vertexAttributes": {
        "position": {
            "valueType": "Float32",
            "valuesPerElement": 3
        },
        "normal": {
            "valueType": "Float32",
            "valuesPerElement": 3
        },
        "uv0": {
            "valueType": "Float32",
            "valuesPerElement": 2
        },
        "color": {
            "valueType": "UInt8",
            "valuesPerElement": 4
        },
        "region": {
            "valueType": "UInt16",
            "valuesPerElement": 4
        }
    },
    "featureAttributeOrder": [
        "id",
        "faceRange"
    ],
    "featureAttributes": {
        "id": {
            "valueType": "UInt64",
            "valuesPerElement": 1
        },
        "faceRange": {
            "valueType": "UInt32",
            "valuesPerElement": 2
        }
    }
}

A geometryDefinition object:

{
    "geometryBuffers": [
        {
            "offset": 8,
            "position": {
                "type": "Float32",
                "component": 3
            },
            "normal": {
                "type": "Float32",
                "component": 3
            },
            "uv0": {
                "type": "Float32",
                "component": 2
            },
            "color": {
                "type": "UInt8",
                "component": 4
            },
            "featureId": {
                "type": "UInt64",
                "component": 1,
                "binding": "per-feature"
            },
            "faceRange": {
                "type": "UInt32",
                "component": 2,
                "binding": "per-feature"
            }
        },
        {
            "compressedAttributes": {
                "encoding": "draco",
                "attributes": [
                    "position",
                    "uv0",
                    "color",
                    "feature-index"
                ]
            }
        }
    ]
}

tks.

rvargasESRI commented 3 years ago

@onsummer The defaultGeometrySchema is used for legacy purposes and backwards compatibility for I3S 1.6 and older. It is used in the uncompressed geometryBuffer.