3D Tile order of loading

1. A concise explanation of the problem you're experiencing.
Hi, I'm working with Cesium 3D Tiles to visualize very large datasets, and I was wondering if there is any way to alter the order/priority with which these tiles are rendered? I have a code sample that colors tiles based on order of loading using a Red -> Green -> Blue spectrum (earliest loaded are R, last loaded are B), but I cannot find a way to alter this order.

2. A minimal code example. If you've found a bug, this helps us reproduce and repair it.

tileset.tileLoad.addEventListener(function(tile) {
    tile.color = Cesium.Color.fromBytes(r, g, b, alpha);
    if (g < 255)
    {
      if (r > 1){
        r -= 255/50;
      }
      g += 255/50;
    }
    else{
      if (g > 1){
        g -= 255/50;
      }
      b += 255/50;
      
    }
});

3. Context. Why do you need to do this? We might know a better way to accomplish your goal.
My goal is to make it so that a tile is composed of features that are geographically close together, and then use the camera's view frustum to select those features using the tileVisible or tileLoad events. Currently individual tiles are spread out over a very large area, so I am interested in being able to manipulate this property.

4. The Cesium version you're using, your operating system and browser.
1.37 on Chrome.

Thanks!
Aditya

Tiles are loaded roughly by distance from the camera and there aren’t hooks in controlling which tiles are loaded and selected. While supporting more fine grained control is not out of the question, it would complicate the tileset traversal code.

For your use case it sounds like viewer request volumes might help. It prevents a tile from being loaded until the camera goes inside its request volume. If you create one of these for each “island” in the tileset you’ll have some more control over when tiles are rendered.

Let me know if that helps, and hopefully I understood your use case correctly.

Hi Sean, would I have to break the data up into separate tilesets for this to work? Here is a sample tile from my tileset.json. I added the "viewerRequestVolume" attribute and set it equal to the content bounding volume, but the tile still loads even if the camera is not inside the volume.

{
"boundingVolume" : {
        "box" : [ 3784176.496923555, 900757.9393873845, 5037746.45407594, 76.47501299157739, 0, 0, 0, 60.172466629650444, 0, 0, 0, 85.4690472735092 ]
        },
"refine" : "add",
"content" : {
        "viewerRequestVolume" : {
                "box" : [ 3784176.496923555, 900757.9393873845, 5037746.45407594, 76.47501299157739, 0, 0, 0, 60.172466629650444, 0, 0, 0, 85.4690472735092 ]
                },
        "boundingVolume" : {
                "box" : [ 3784176.496923555, 900757.9393873845, 5037746.45407594, 76.47501299157739, 0, 0, 0, 60.172466629650444, 0, 0, 0, 85.4690472735092 ]
                },
        "url" : "data/data3.b3dm"
        }
},

viewerRequestVolume is a property of the tile, not of the content. Try this:

{

“boundingVolume” : {

“box” : [ 3784176.496923555, 900757.9393873845, 5037746.45407594, 76.47501299157739, 0, 0, 0, 60.172466629650444, 0, 0, 0, 85.4690472735092 ]

},

“viewerRequestVolume” : {

“box” : [ 3784176.496923555, 900757.9393873845, 5037746.45407594, 76.47501299157739, 0, 0, 0, 60.172466629650444, 0, 0, 0, 85.4690472735092 ]

},

“refine” : “add”,

“content” : {

“boundingVolume” : {

“box” : [ 3784176.496923555, 900757.9393873845, 5037746.45407594, 76.47501299157739, 0, 0, 0, 60.172466629650444, 0, 0, 0, 85.4690472735092 ]

},

“url” : “data/data3.b3dm”

}

},

``