The default material key is 0,1,2 and clipping. But I need more materials, how do I create materials and use the material key
Hi @a87645507,
Just to clarify, you’re trying to add more than three raster overlays to your tileset, is that correct?
If so, you’d have to create a copy of the CesiumDefaultTilesetShader
. If you look at the shader graph, you’ll see nodes that correspond to each raster overlay. For example, raster overlay 0 corresponds to:
overlayTranslationAndScale_0
overlayTexture_0
overlayTextureCoordinateIndex_0
So, make a copy of all the nodes used for a single raster overlay. Then change the index so that it increments. For example, your next rasteroverlay will be index 3, so you need to rename nodes to overlayTexture_3
.
Then, create a copy of CesiumDefaultTilesetMaterial
and set the shader to your modified shader copy. Put this material on the tileset, then assign the material key to your desired overlay.
I hope this helps! Let us know how it goes.
Thank you. I’ll try