My apologies in advance. This post has a lot of questions regarding the terrain 1.0 format located here. The documentation for the terrain file’s first bitmask leaves room for a lot of interpretation, and I’m just trying to understand what it means.
The heightmap 1.0 terrain format mentions that two bitmask values follow the heightmap data. One is for additional terrain files usage and the other is for water. If a bit is set, the corresponding “.terrain” file can be expected to be found on the server as well. If it is cleared, requesting the “.terrain” file will return a 404 error. This simple description, imo, glosses over several rather important details.
These bitmasks are located at byte offsets 8450 and 8451 (assuming zero-based array indices.) The first of these indicates what child tiles are present and is the basis for my confusion.
This first question may answer all the others… Is the bitmask for child tiles used?
The lower four bits describe four quadrants of data information and whether or not it is available. Is it correct to assume that if bit 2 (NW corner) is set for a tile at say, level 13, Cesium will also assume that that tile has more terrain data for level 14’s four quadrants?
If the bit is NOT set for the tile at level 13 in our hypothetical example, what happens when the map is zoomed into (i.e. level 14)? Is the level 13’s terrain data used to approximate more zoomed in areas, or is a request still made to retrieve the level 14’s terrain data regardless of the assumed 404 outcome? If a 404 outcome is returned what data, if any, is used to render the terrain for that failed retrieval? How does a returned 404 error code affect subsequent terrain tile requests? If subsequent terrain tiles for assumed 404 responses are requested, what is the benefit of having the bit(s) set other than “guaranteeing” that the next level will contain information for four tiles even if it, by human error, for example, does not? This particular scenario has me wondering why its important to have this particular bitmask in the first place.
And going the other way (zooming out), the bitmask seems to be completely irrelevant to anything. Is that the case?
Thanks!