geo-data / cesium-terrain-builder

A C++ library and associated command line tools designed to create terrain tiles for use in the Cesium JavaScript library
Other
706 stars 338 forks source link

How to understand the meaning of water mask 256 * 256 #80

Open libofei2004 opened 5 years ago

libofei2004 commented 5 years ago

The description of water mask in heightmap-1.0 terrain format is as follows: "The child bit mask is followed by the water mask. The water mask is either 1 byte, in the case that the tile is all land or all water, or it is 256 256 1 = 65536 bytes if the tile has a mix of land and water. Each mask value is 0 for land and 255 for water. Values between 0 and 255 are allowed as well (but not currently present in the data) in order to support anti-aliasing of the coastline." How to understand " it is 256 256 1 = 65536 bytes", The tiles of heightmap are 65x65 vertices and overlap their neighbors at their edges. how can i set 256 * 256 water bytes in a 65x65 tile?