# Quantized mesh tileset loading priority and custom metadata file (layer.json)

**URL:** <https://community.cesium.com/t/quantized-mesh-tileset-loading-priority-and-custom-metadata-file-layer-json/37541>\
**Category:** Cesium for Unreal\
**Created:** [December 23, 2024, 5:39pm UTC](https://community.cesium.com/t/quantized-mesh-tileset-loading-priority-and-custom-metadata-file-layer-json/37541 "2024-12-23T17:39:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aankit\_K](https://avatars.discourse-cdn.com/v4/letter/a/b19c9b/32.png) [@Aankit\_K](https://community.cesium.com/u/Aankit_K)\
**Post date:** [December 23, 2024, 5:39pm UTC](https://community.cesium.com/t/quantized-mesh-tileset-loading-priority-and-custom-metadata-file-layer-json/37541/1 "2024-12-23T17:39:45Z")

</div>

Hi there @kevin_ring,

1. For loading in unreal engine which will be considered first? Availability information present in per .terrain file or from the layer.json.

2. I have dem data as shown in the image. If I put two element in array at zoom lvl 15 will it considered as valid metadata file or fail in parsing??? Main reason for doing is that I don’t want to make network request for tiles where I don’t have data.

This kind of JSON structure will consider like every zoom level has array of multiple rectangle in loading Unreal engine ?

# Example Shema

```json
{
  "tilejson": "2.1.0",
  "name": "Srinagar_DEM_30m",
  "description": "",
  "version": "1.1.0",
  "format": "quantized-mesh-1.0",
  "attribution": "",
  "schema": "tms",
  "extensions": ["octvertexnormals"],
  "tiles": ["{z}/{x}/{y}.terrain?v={version}"],
  "projection": "EPSG:4326",
  "bounds": [0.00, -90.00, 180.00, 90.00],
  "available": [
               {"0":[{"x_start":0,"x_end":1,"y_start":0,"y_end":0}],
				"1":[{"x_start":0,"x_end":3,"y_start":0,"y_end":1}],
				"2":[{"x_start":0,"x_end":7,"y_start":0,"y_end":3}],
				"3":[{"x_start":0,"x_end":15,"y_start":0,"y_end":7}],
				"4":[{"x_start":0,"x_end":31,"y_start":0,"y_end":15}],
				"5":[{"x_start":42,"x_end":53,"y_start":15,"y_end":26}],
				"6":[{"x_start":85,"x_end":106,"y_start":31,"y_end":53}],
				"7":[{"x_start":170,"x_end":213,"y_start":63,"y_end":106}],
				"8":[{"x_start":341,"x_end":426,"y_start":127,"y_end":213}],
				"9":[{"x_start":682,"x_end":853,"y_start":255,"y_end":426}],
				"10":[{"x_start":1365,"x_end":1706,"y_start":511,"y_end":853}],
				"11":[{"x_start":2730,"x_end":3413,"y_start":1023,"y_end":1706}],
				"12":[{"x_start":5461,"x_end":6826,"y_start":2047,"y_end":3413}],
				"13":[{"x_start":5469,"x_end":5469,"y_start":2047,"y_end":3413},
                      {"x_start":5472,"x_end":5472,"y_start":2047,"y_end":2051}]
				}
  ]
}

```

# DATA at particular zoom level

 ![image](https://global.discourse-cdn.com/cesium/original/3X/0/4/04c25eead06bab5b6baec86cd41dbe61a2229448.jpeg)

---

<div class="post-metadata">

**Author:** ![Kevin\_Ring](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/kevin_ring/32/2003_2.png) [@Kevin\_Ring](https://community.cesium.com/u/Kevin_Ring)\
**Post date:** [December 23, 2024, 10:27pm UTC](https://community.cesium.com/t/quantized-mesh-tileset-loading-priority-and-custom-metadata-file-layer-json/37541/2 "2024-12-23T22:27:15Z")

</div>

Hi @Aankit_K,

I believe Cesium for Unreal will use the union of availability in layer.json and in individual tiles.

The structure of your example looks incorrect. `available` is an array of arrays, not an array of objects. Each element in the outer array is an array of availability descriptors for that level in the tree. And an availability descriptor has properties `startX`, `startY`, `endX`, and `endY`.
