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

quantized-mesh tiles has no “metadata” extension #107

Open zhangiser opened 2 years ago

zhangiser commented 2 years ago

Hi there,i meet a problem from this fork ahuarte47

I used this cmd in windows to produced terrain tiles

ctb-tile -o D:\dem\globe d:\dem\world-16bit.tif -f Mesh -s 10 -e 0

but when load by cesiumJS ,i found a problem,there is no “metadata” extension in 0/0/0.terrain and 0/1/0.terrrain.And the "metadata" is very important for cesiumJS to create quadtree,so it's absolutely need “metadata” extension in level0 and level10.We can see the code at https://github.com/CesiumGS/cesium/blob/7d7c5d06e712e71b7002f70100da8689080a3144/Source/Core/CesiumTerrainProvider.js#L308-L354 When i searched this problem at cesium community,i also found a similar post:https://community.cesium.com/t/terrain-loading-failed-in-ctb-production/14161

Cesium for Unreal and CeisumJS currently requires that tile availability be attached to quantized-mesh tiles using the “metadata” extension.

So what should i do To add the “metadata” ?

Thanks!

ahuarte47 commented 2 years ago

Hi,

Te option "-l" (or "--layer") will allow you to create the "layer.json" file with all information that describes the tileset. Please, see... https://github.com/tum-gis/cesium-terrain-builder-docker#create-cesium-layer-description-file

zhangiser commented 2 years ago

@ahuarte47 Thank for your reply.Yes,I has used -I option,and got a layer.json. But the CesiumJS not only need layer.json but also need metadata extension in 0/0/0.terrain and 0/1/0.terrain and every tile in level10 to init the availbility.We can trace the code at https://github.com/CesiumGS/cesium/blob/7d7c5d06e712e71b7002f70100da8689080a3144/Source/Core/CesiumTerrainProvider.js#L308-L354.

This rule can be find by Cesium World Terrain which provide by Cesium ion.

Best,zhangiser

zhangiser commented 2 years ago

@ahuarte47 May i know if you will publish a new version recently?

ahuarte47 commented 2 years ago

Hi @zhangiser I am so sorry, I am not maintaining this repo. If you can implement it, please share it with us to update the codebase.

zhangiser commented 2 years ago

@ahuarte47 LOL ,What a pity! I wish i can,but i can't,i'm not a C++ programmer.