Dear fellow devs,
I am using terrain created on Cesium-Ion. Following the spec-sheet, there is a Metadata Extension available.
Has someone a workflow at hand to create the quantized-mesh with specific metadata like terrain types?
I am hoping to use the metadata through the CesiumEncodeMetadata component.
Dear fellow devs,
Check out Cesium Terrain Builder tool on GitHub, this will get you the QMesh, then a simple python reader/writer script can be made to read the binary terrain files using that spec sheet you provided. Add a method to the writer for adding the metadata. Python structs will be your friend for reading and writing binary stuff like that.
I think you might have more luck using a raster overlay, rather than trying to encode your metadata in the terrain mesh itself. For example, you can upload a GeoTIFF with your terrain type data to Cesium ion, and then access it from Cesium for Unreal by adding a CesiumIonRasterOverlayComponent to your Cesium3DTileset. By default the raster overlay colors will be drawn over the top of the terrain, but by using a custom material you can access the raw pixel values from the overlay and use them for whatever styling is appropriate. This is pretty similar to what you would get with the CesiumEncodedMetadata system.
@taymiser Thanks for your answer. This sounds like a lot of work. Basically I would have to create the whole workflow. On the other hand this could result in a tailored solution. I will look into this.
@Kevin_Ring Also, thank you very much. We tested the concept from the docs where a combination of C++ Classes and a Niagara System analyses the pixel values of the raster and creates a land type mask. This might work from a ground perspective, but we found out, that this solution with it’s capture and render target is not stable enough to work in large scale.
If I understand your answer, you would sugest a different route without custom classes over the material system. Could you point me in the direction of what you mean by ↓ ? It sounds to me, like it would be possible to access the raw pixel values from inside a material.
Right, raster overlays can be arbitrarily large (gigabytes? terabytes? no problem), and you can access the overlay texture value per pixel in a material. This tutorial explains how to define custom tileset materials:
@Kevin_Ring Okay thank’s, I will try this out next week.