Creating a Disk/Ring Shape

Hello, I was wondering if there is any way to create a disk shape. I know you can create a circle but I want the middle to not be filled.

My end goal is to create something as shown here: http://imgur.com/a/qk9Qc but with even more layers and I don't want the colors overlapping and it also needs to be transparent. I figured creating a bunch of entities that are rings would be the easiest way. If anyone can think of a better way please let me know!

Another thing to add, this is for 2D only

Hi there,

Unfortunately we don’t yet have direct support for a ring shape. However, there are several options

  1. You can generate a polygon with a hole in it for the ring: http://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=Polygon.html&label=Geometries

  2. You can model the ring as a 3D model, convert it to a gltf using our conversion tool and import it.

  1. You can implement a custom geometry type (hardest option): https://github.com/AnalyticalGraphicsInc/cesium/wiki/Geometry-and-Appearances

Hope that helps,

  • Rachel

Ok, thanks for the help. Do you know if it is possible to set it so that when entities overlap their colors don't add? Ideally I'd like for the transparency to be the same everywhere whether entities are overlapping or not.

If you’re using a 3D model you can change the color blend mode as shown here: http://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=3D%20Models%20Coloring.html&label=Showcases

Unfortunately, other types of entities don’t currently support different color blend modes.

Hope that helps,

  • Rachel