Switching materials within quantized mesh terrain

I have my own terrain server set up, using custom quantized meshes in very high resolution. Cesium can nicely render satellite imagery onto these meshes.

What I would like to do is turn off the imagery for certain polygons: for the start, streets should be plain grey. Quite probably, more such solid-colored materials will follow.

It is obviously possible to spawn a custom imagery server that would draw grey lines over the satellite images. I did not yet check on the legal side of this (the server would basically proxy Bing map data), but the problem is that drawing solid colors over JPEG bitmaps produces blur and blocky artifacts.

As far as I have found, there is no support for terrain materials in Cesium. (Water masking is kind of a step in this direction, but it is bitmap-based, anyway.) Is there perhaps a branch that could do this, or a project that solved this issue before?

Hello,

The terrain is completely independent from the imagery at this time, so other than the water masking, there isn’t a way to have the terrain influence how the imagery looks.

Just out of curiosity, what kind of project are you working on?

Best,

Hannah

I’d be very interested in hearing more info on your custom quantized mesh terrain. What source data did you use, and what tools did you use to convert and serve it?

2017-02-21 10:22 Hannah Pinkos wrote:

Just out of curiosity, what kind of project are you working on?

It's supposed to be an architectural visualization website for urban development. All this hassle -- detailed terrain, squeaky clean streets -- is only for viewers' pleasure, the application could basically work just with out-of-the-box Cesium.

2017-02-21 10:25 Mark Erikson wrote:

I'd be very interested in hearing more info on your custom quantized mesh
terrain. What source data did you use, and what tools did you use to
convert and serve it?

Mark, it was actually quite difficult to get the conversion to work. Currently, I use Python quantized-mesh-tile module along with Pyhull to triangulate my point cloud and Shapely to cut out the tiles. I want to try and use Numpy for most of the mechanics because it currently runs for half a day on mere 20 M points -- or maybe I'll have to change this toolset altogether. The webserver is Apache, AFAIK. Regarding the `tileset.json` file, I just copied one from the example repository and modified it to fit my data.

Adam

Yeah, I’ve used the Cesium-Terrain-Builder C++ utility to convert a dataset into heightmap format before. CTB doesn’t support Q-M format yet, but there’s an open issue regarding adding support, and I’ve thrown in a few links to other Q-M related tools I’ve seen. There was also someone who’s posted in here recently about a Node-based Q-M conversion util he’s been building. I’m curious to see what the Cesium folks are going to make possible for data conversion via this new Cesium.com site, but I’m also entirely in favor of the community building out tools to do it yourself as well.

I actually spent a couple weeks doing geodata conversion research in late 2015. Researched imagery and terrain source datasets, tools, and processes that would need to be run to generate stuff. That info is written up in an internal wiki, but I’ll see if I can maybe find a way to post some of it publicly.

I’m not sure if I’m totally understanding your question, but this sounds like it could be done by simply overlaying another imagery layer on top of the Bing Maps satellite imagery layer. This Sandcastle example shows how to add multiple imagery layers:
http://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=Imagery%20Layers.html&label=Showcases

2017-02-22 22:50 Kevin Ring wrote:

(...) this sounds like it could be done by simply overlaying another imagery layer on top of
the Bing Maps satellite imagery layer.

Thanks! Overlaying a single bitmap is surprisingly simple. I wanted to change whole polygons of the terrain mesh, so that there are clean boundaries, but this is way easier and nice enough.