Terrain mesh to x3d


How difficult would it be to transform from the Terrain mesh obtained from the Terrain providers to an x3d object viewable with an x3dom viewer?



Hi Thomas,

I don’t know anything about x3d, but I suspect it wouldn’t be too hard. Terrain providers asynchronously provide TerrainData instances like HeightmapTerrainData and QuantizedMeshTerrainData. These types have a createMesh method that asynchronously returns a TerrainMesh, which is a simple holder for vertex and index data.


Thanks for the pointers Kevin. I guess I will have to do some triangle mesh conversion from the vertexes to generate the IndexedFaceSet. There must already be some equivalent function in Cesium to render all this? Let me check the sources again :wink:

BTW, found this great pdf http://cesiumjs.org/presentations/Rendering%20the%20Whole%20Wide%20World%20on%20the%20World%20Wide%20Web.pdf