Visual artifacts using CorridorGeometry


I have been trying to visualize the swath of satellites over time using CorridorGeometry. It works pretty well but I encountered visual artifacts at some points. I also tried with PolylineVolumeGeometry and had similar problems. I let you see by yourself on the screenshots. At first I thought it may be related to the positions used to draw the corridor so I added a green polyline using the same positions array and it looks perfect. I could use this method instead but I would need to know how to convert meters to pixels.

Here is how I generate the corridor and the polyline:

          new Cesium.GeometryInstance({
            id: k,
            geometry: new Cesium.CorridorGeometry({
              positions: posArray,
              width: this.crossTrackDistance * 2,
              ellipsoid: this.ellipsoid,
              vertexFormat: Cesium.EllipsoidSurfaceAppearance.VERTEX_FORMAT,
              cornerType: Cesium.CornerType.MITERED
            attributes: {
              color: new Cesium.ColorGeometryInstanceAttribute(
                r / 255,
                g / 255,
                b / 255,
              show: new Cesium.ShowGeometryInstanceAttribute(
                k === this.timeIntervals.length - 1 ? true : false
      const polylineInstance = new Cesium.GeometryInstance({
        geometry: new Cesium.PolylineGeometry({
          positions: posArray,
          width: 4,
          ellipsoid: this.ellipsoid
        attributes: {
          color: new Cesium.ColorGeometryInstanceAttribute(0, 1, 0, 1),
          show: new Cesium.ShowGeometryInstanceAttribute(true)

      const corridorPrimitive = new Cesium.Primitive({
        geometryInstances: corridorInstances,
        appearance: new Cesium.PerInstanceColorAppearance({
          flat: true

      const polylinePrimitive = new Cesium.Primitive({
        geometryInstances: [polylineInstance],
        appearance: new Cesium.PolylineColorAppearance()

Also, when I switch the scene to 2D mode, the frame rate drops from > 50 to 10 fps. Removing the corridors prevent this drop, so I guess this is related. Why ?

If you have any idea of what could cause this, please let me know.
Thanks !

here is a link to a sandcastle reproducing this: Cesium Sandcastle


Thank you for bringing this question to our community forum! I am impressed by your development process - it seems like you have done a really good job exploring all of the options available in our API. A few thoughts:

  1. I suggest that you write up an issue on GitHub that outlines the runtime performance and rendering issues that you are experiencing with CorridorGeometry and PolylineVolumeGeometry. Our team will review your issue and assess the next steps. My research indicates that this is a bug in our API - the code that you have shared with me looks perfect.
  2. In the meantime, I think it makes sense to begin thinking about temporary workarounds. Do you think that using a CZML or KML object might work here?

I am looking forward to hearing back from you and learning more about your application. Please reach out with any further questions or concerns!



Thank you for your help !

  1. I opened a new issue on GitHub where I provide three SandCastle examples. I hope this will help.

  2. I do not think this will work as I encountered the same problem using the Entity API and had the same problem. However, I might try adding a CZML datasource just in case. I’ll get back to you if I have any more information.

This very likely won’t help with your problem, but I’m curious why you’re creating geometry instances / primitives directly instead of using the Entity API, especially since it seems likely that you’d have time-variant data in your real application.

Also I’m not sure if you noticed this but the “fold” in the corridor is actually ducking under the globe:


Anyway, watching for a resolution.

1 Like

Hello James,

I first tried using the Entity API to update the positions of the corridor dynamically but I encoutered this visual problem. Also, I thought it would be best for performance reasons to switch to Primitives. I would like users to have the possibility to display the swaths of a constellation of satellites.

Yes, this looks very weird and I hoped someone would have an explanation for this behavior :sweat_smile:

@clementchdn thank you very much for creating another GitHub issue. I really appreciate that you added more details to the issue that you created.

@James_B interesting point - I hadn’t noticed the “fold” until now. It looks a little bit like a tectonic plate.

1 Like