CesiumGS / 3d-tiles

Specification for streaming massive heterogeneous 3D geospatial datasets :earth_americas:
2.1k stars 467 forks source link

3D-Tiles 1.1 voxel #770

Open cjhdsg opened 4 months ago

cjhdsg commented 4 months ago

We are experiencing an issue with 3D-Tiles 1.1 where we need to control the rendering so that voxels without data are not displayed.

Currently, our rendering includes many voxels that do not contain any useful data, which are unnecessary for the users and degrade the visualization quality. We would like to have a method or parameter setting to ensure that these empty voxels are not rendered.

As shown in figure, the bottom-right voxel does not contain any data. How to set that voxel not displayed? 缺一块体素 We used implicit tile and 3DTILES_content_voxels extension.

We hope for an answer and a solution in 3D Tiles data structure soon. Could you please give me a test dataset that can be loaded correctly? Thank you!

j9liu commented 4 months ago

Hey @cjhdsg,

If you pair the voxel data with a tileset metadata schema, you can specify a noData value to compare the empty voxels to. This example is taken from the extension README.

"schema": {
  "classes": {
    "voxel": {
      "properties": {
        "temperature": {
          "type": "SCALAR",
          "componentType": "FLOAT32",
          "noData": 999.9
        },
        "salinity": {
          "type": "SCALAR",
          "componentType": "UINT8",
          "normalized": true,
          "noData": 255
        }
      }
    }
  }
}

Then it would be a matter of comparing the values to this noData value. Hope this helps!

cjhdsg commented 4 months ago

Yes, I've added "noData" field, and wrote corresponding value in binary chunk. But it seemed not working. Here is my test dataset.

test-dataset.zip

javagl commented 4 months ago

Some aspects of that test data set are nor entirely clear, and I'd have to look at some aspects of the voxel extension specification and other test data here.

But the given tileset contains

    "implicitTiling" : {
      "subdivisionScheme" : "OCTREE",
      "subtreeLevels" : 1,
      "availableLevels" : 1,
      "subtrees" : {
        "uri" : "subtrees/{level}.{x}.{y}.{z}.subtree"
      }
    }

Defining availableLevels: 1 does not seem to make sense for the given data set. Can you provide an example data that works and is valid, and that shows the problem that you are encountering? (Once we have this data, we can have a closer look at how to sensibly hide/omit certain cells - but we should start with a data set that works...)

(We will then still have to carefully check whether any unexpected behavior that you are observing is related to https://github.com/CesiumGS/cesium/issues/12001 , which you brought up in https://community.cesium.com/t/3d-tiles-1-1-voxel/32239 ...)