Orthographic Frustum in 3d Scene Mode

I'm having an issue with changing the frustum in 3D Mode. For some of the things we do, we want to have an Orthographic projection of the globe. As i understand it, I simply change the camera frustum and all should be well. Is this a bug, or am i missing something fundamental in changing the camera frustum and causing this render error? Thanks; code / error is below.

the following code throws the render error in the Cesium Sandcastle for reproducibility.

var widget = new Cesium.CesiumWidget('cesiumContainer');
var canvas = widget.scene.canvas;
var camera = widget.scene.camera;

var radius = 7000000;
var orthoFrustum = new Cesium.OrthographicFrustum();
orthoFrustum.right = radius * Math.PI;
orthoFrustum.left = -orthoFrustum.right;
orthoFrustum.top = orthoFrustum * (canvas.clientHeight / canvas.clientWidth);
orthoFrustum.bottom = - orthoFrustum.top;
orthoFrustum.near = 0.01 * radius;
orthoFrustum.far = 50 * radius;

camera.frustum = orthoFrustum;

I cannot get to the exact error on this machine but the trace is roughly as follows:

Error has occurred while rendering:
RangeError: Invalid array length; frustumCommands in
undateFrustums - > createPotentiallyVisibleSet - > render;


This is not something we have tried. What are your use cases? We can write an issue for it. Currently, parts of the code, like coordinate transforms in shaders, assume perspective division so this will require some core Cesium changes.


Hi Patrick,

Typically we use this type of view for undistorted area views on a globe. Such as a sensor footprint projections near the pole or near the equator. We have found that sometimes reviewers instantly look an othropraphic 2D map (which would be the other option for showing more area) and get stuck on the distortions between equal area shapes located at different latitude on the globe.

Perspective views are fine for this also, but they do clip the amount of area you can see based on an arbitrary height.

Thanks for the use cases. I submitted issue #2069. This is not something I expect us to address in the short-term, but if you are already working with someone at AGI, you could ping them to try to up the priority.


Hi Sean,

We just added an orthographic projection option accessible via a new widget in the upper right if you have the time to do some testing: #5021