I have added two imagerylayers into the viewer. Then i coloured the terrain using elevation contour material that cesium provides.
Now the material is colored over the two imagery layers. I want to change the order of material layer. it should be in between the two imagery layers. is there any way we can acheive this?
@ajinRa020307
Thank you for the detailed post! One solution would be to use a cutoutRectangle
to cut out a section of the top imagery layer, to ensure that the bottom imagery layer is visible. This brings the bottom imagery layer to the surface. Here is a sandcastle demo that showcases this functionality:
You should be able to use this demo to get your implementation started.
What is your use case? It is not clear to me why you would add an imagery layer just to have it covered by another imagery layer. Finally, have you tried adding the imagery layers in a different order or updating their alpha
(transparency) value? Let me know if you have any other questions - I am looking forward to learning more!
-Sam
What is your use case?
I am adding height labels in the terrain(calculated in shaders) as a imageryprovider. This layer i need to be always on top of
material layer
Hi thanks for the suggestion, In the sandcastle example you are using two imagery providers. How to make it work with imageryproviders and globe material?
Because when i added globe material it will be shaded above all layers. iam not able to order it
@ajinRa020307
Thank you for the details. Have you considered adding the height labels using a CZML Billboard? In general, adding labels as an imagery provider is quite cumbersome.
CZML Billboards are highly customizable and might be a better tool for your application. Here is a sandcastle demo that showcases how CZML Billboards can be implemented.
Be sure to check out the spec as well for more details
To make my previous demo work with ImageryProvider
and globe materials, I would start by swapping out the assets that I imported. The core code should be quite similar.
-Sam