Sandcastle example with Batchtable?

Hello,

Trying to understand how to load a PointCloud in LAS format and have a batch table.

So I looked at this example that allows to get an ID and other info that I assume is from the Batch table.

Yet the tileset.json file does not have any reference to “rooms room8_a,room8_b,room8_c”

Where and how is this data found?

The example data that you are referring to is the BatchedWithBatchTable example. The tileset.json refers to the batchedWithBatchTable.b3dm as the tile content. This file is a Batched3DModel file.

The file contains some binary data, and part of this data is the “batch table”. The batch table itself also consists of two parts. The first part is actually a JSON string. (The second part can contain further binary data, but this is not used in this example). This JSON string now contains a bunch of arrays that contain the data that you can see in the GUI in the sandcastle.

Specifically, the Batch Table JSON string in this example is

{
  "id" : [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ],
  "Longitude" : [ -1.31968, -1.3196832683949145, -1.3196637662080655, -1.3196656317210846, -1.319679266890895, -1.319693717777418, -1.3196607462778132, -1.3196940116311096, -1.319683648959897, -1.3196959060375169 ],
  "Latitude" : [ 0.698874, 0.6988615321420496, 0.6988736012180136, 0.6988863062831799, 0.6988864387845588, 0.6988814788613282, 0.6988618972526105, 0.6988590050687061, 0.6988690935212543, 0.6988854945986224 ],
  "Height" : [ 6.155801922082901, 13.410263679921627, 6.1022464875131845, 6.742499912157655, 6.869888566434383, 10.701326800510287, 6.163868889212608, 12.224825594574213, 12.546202838420868, 7.632075032219291 ],
  "info" : [ {
    "name" : "building0",
    "year" : 0
  }, {
    "name" : "building1",
    "year" : 1
  }, {
    "name" : "building2",
    "year" : 2
  }, {
    "name" : "building3",
    "year" : 3
  }, {
    "name" : "building4",
    "year" : 4
  }, {
    "name" : "building5",
    "year" : 5
  }, {
    "name" : "building6",
    "year" : 6
  }, {
    "name" : "building7",
    "year" : 7
  }, {
    "name" : "building8",
    "year" : 8
  }, {
    "name" : "building9",
    "year" : 9
  } ],
  "rooms" : [ [ "room0_a", "room0_b", "room0_c" ], [ "room1_a", "room1_b", "room1_c" ], [ "room2_a", "room2_b", "room2_c" ], [ "room3_a", "room3_b", "room3_c" ], [ "room4_a", "room4_b", "room4_c" ], [ "room5_a", "room5_b", "room5_c" ], [ "room6_a", "room6_b", "room6_c" ], [ "room7_a", "room7_b", "room7_c" ], [ "room8_a", "room8_b", "room8_c" ], [ "room9_a", "room9_b", "room9_c" ] ]
}

You can read more about the different tile formats either in the specification that I linked to, or in the 3D Tiles reference card (starting at page 9).


An aside: When you want to create your own tilesets from LAS files, then you might consider using some of the functionalities of 3D Tiles Next, which allows, for example, to use glTF assets directly as the tile content (and also augment them with metadata, similar to the Batch Table approach).

Thanks for the feedback.

Is there a Sandcastle example that shows the functionalities of [3D Tiles Next] with metadata?(https://github.com/CesiumGS/3d-tiles/tree/main/next), which allows, for example, to use glTF assets directly as the tile content (and also augment them with metadata

3D Tiles Next samples are currently in the process of being created.

What’s there right now:

  • In the sandcastle, there is a tab in the “Gallery” at the bottom, with the tile “3D Tiles Next”. It contains some examples for 3D Tiles Next functionality. But this is rather “showing certain features”, and the underlying data/code are not always easily accessible.
  • There are some “3D Tiles Next” sample data sets at https://github.com/CesiumGS/3d-tiles-samples/tree/main/next (Update: These will be replaced with 3D Tiles 1.1 samples. The latest state of the “next” samples can be seen in this permalink ) The MultipleContents one shows a simple example with glTF assets (GLB files), but no metadata yet. Other examples show how to associate metadata with tiles, for example
  • There is an open PR Added basic EXT_mesh_features samples by javagl · Pull Request #40 · CesiumGS/3d-tiles-samples · GitHub which adds some examples that use the EXT_mesh_features glTF extension, that can be used to augment glTF assets themself with metadata. This is currently in the process of being finalized.

(An aside: Instructions about how to view the 3d-tiles-samples data in a local sandcastle will be added soon…)

Further examples for the 3d-tiles-samples repo are already in the pipeline (and this may include different configurations that involve point clouds, but the exact samples are not yet decided upon). If you have a specific idea about which further sample data sets could be helpful, we’re open for suggestions.

Hi Marco,

Thanks for the information.

Having an example that works with a subsampled pointcloud would be nice. The idea is that a LAS with GPS data could be subsampled and then for each of the say 100 points in the subsample meta data on each point could be exposed.

Hi @Marco13 any updated on any new 3D-tiles-samples since my inquire 2 months ago?

@Marco13 This link no longer works?

The “next” samples have been removed via this commit. The latest state of the repository where these samples had still been available is here: 3d-tiles-samples/next at 23a1b5edf781e1c1a43a8ccd34736422b4bf6568 · CesiumGS/3d-tiles-samples · GitHub .

The reason for the removal is that “3D Tiles Next” is about to be standardized as “3D Tiles 1.1”. This means that the functionalities that had been offered via the “Next” extensions will soon be part of the 3D Tiles core standard.

More specifically, regarding your original question, this means that glTF assets can be used directly as tile content in 3D Tiles 1.1, without having to declare the 3DTILES_content_gltf extension. You can just write content.glb instead of content.b3dm, and it will work automatically.

The samples are also in the process of being updated accordingly: The 3d-tiles-samples/1.1 directory already contains a few examples. One of them is the MetadataGranularities example that shows how to attach metadata to a tileset, tiles, groups, and content.

(The PR for samples with metadata in glTF assets is still open, but I will try to review/finalize this soon).