Elevation Ramp material for geometry instances

107 views
Skip to first unread message

sank...@gmail.com

unread,
Sep 7, 2018, 8:07:08 AM9/7/18
to cesium-dev
How can i add elevation ramp material to a geometry instance in the given Code with different colors for different heights.

Gabby Getz

unread,
Sep 11, 2018, 10:08:01 AM9/11/18
to cesiu...@googlegroups.com
Hi there,

I assume you want an elevation ramp shading the terrain, correct? Try a Globe Material.

Thanks,
Gabby

On Fri, Sep 7, 2018 at 8:07 AM, <sank...@gmail.com> wrote:
How can i add elevation ramp material to a geometry instance in the given Code with different colors for different heights.

--
You received this message because you are subscribed to the Google Groups "cesium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cesium-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

sank...@gmail.com

unread,
Sep 12, 2018, 12:50:09 AM9/12/18
to cesium-dev
yes,i'm able to apply material to the globe,but i want to apply only for a polygon created instead of coloring entire globe.
 
terraincolor.PNG

Omar Shehata

unread,
Sep 12, 2018, 9:33:32 AM9/12/18
to cesium-dev
I think you might need to write your own shader to do that, where you'd pass the world position from the vertex shader, and use it in the fragment shader to set the color. There's some info/examples on the forum about using custom shaders with Cesium. Here's a good place to start: https://cesiumjs.org/tutorials/Geometry-and-Appearances/
Reply all
Reply to author
Forward
0 new messages