Performance difference between top-down and 45 degrees pitch with low maximumScreenSpaceError

Hi Cesium,

I have noticed a difference in performance for different pitches when the maximumScreenSpaceError is low (e.g. 1 or 4/3).

The top-down view has a lower frame rate than the 45 degrees view (10 to 15% difference). It also seems as if the tile loading is slower.

With the maximumScreenSpaceError set to 2 this does not happen (or it is not visible).

I am not sure if this behaviour is expected. Compared to 45 degrees, the camera footprint for top-down is smaller but you need higher level tiles.

The sandcastle below demonstrates the issue, use the dropdown to change the pitch. You need to use full screen 1920x1080) to see the effect.

Thanks, Willem

var viewer = new Cesium.Viewer(‘cesiumContainer’, {
timeline : false,
animation : false,
targetFrameRate: 21,
geocoder: false,
homeButton: true,
infoBox: false,
baseLayerPicker: false,
navigationHelpButton: false,
sceneModePicker: false,
scene3DOnly: true
});

var scene = viewer.scene;
var tileEventCount = 0;

scene.debugShowFramesPerSecond = true;
scene.globe.tileCacheSize = 8000;
scene.globe.maximumScreenSpaceError = 1.0; // 4/3 or 2.

scene.globe.tileLoadProgressEvent.addEventListener(function (event) {
if (event === 0) {
console.log(“all tiles loaded”);
tileEventCount = 0;
}
else {
tileEventCount++;
console.log(“tile-queue: " + event + " tileEventCount=” + tileEventCount);
}
});

var pinBuilder = new Cesium.PinBuilder();

var bluePin = viewer.entities.add({
name : ‘Blank blue pin’,
position : Cesium.Cartesian3.fromDegrees(7.28705666666667, 43.6935516666667),
billboard : {
image : pinBuilder.fromColor(Cesium.Color.ROYALBLUE, 48).toDataURL(),
verticalOrigin : Cesium.VerticalOrigin.BOTTOM
}
});

var options = [{
text : ‘Change Camera pitch’
},
{
text : ‘45 degrees’,
onselect : function() {
var heading = Cesium.Math.toRadians(0.0);
var pitch = Cesium.Math.toRadians(-45);
var promise = viewer.flyTo(bluePin, {
duration: 10,
offset: new Cesium.HeadingPitchRange(heading, pitch, 1000000)
});
}
},
{
text : ‘Top Down’,
onselect : function() {
var heading = Cesium.Math.toRadians(0.0);
var pitch = Cesium.Math.toRadians(-90);
var promise = viewer.flyTo(bluePin, {
duration: 10,
offset: new Cesium.HeadingPitchRange(heading, pitch, 1000000)
});
}
}];

Sandcastle.addToolbarMenu(options);

``

Hi Willem,

For me, the frame rate stayed the same for both camera views. Maybe it’s related to your computer specs? What OS, browser and graphic card are you using?

Best,

Hannah

Hi Hannah,

Thank you for repeating the test.
My Win8.1 laptop has: i7-4510U @2GHz, 8GB RAM and a NVIDIA GeForce 840M. It performs quite well in general, but I noticed the drop in performance for this particular scenario (going from 45 degrees to top-down).
I ran the test with Chrome and IE11 (where the impact is much larger). Our final windows application uses a WPF Webcontrol (i.e. IE11).

We now use maximumScreenSpaceError=2 again because the increased visual quality for maximumScreenSpaceError=1 costs too much performance. I just found it strange that top-down needs more resources than 45 degrees.

Thanks, Willem

Hmm yeah, that is unexpected. I’ll ask around to see if anyone has an idea why that might be the case.

-Hannah

Hannah - please submit an issue and we’ll profile it.

Willem - we would expect the opposite performance characteristics as, for example, we have documented here: http://cesiumjs.org/2015/11/12/Fog/

Patrick

I’ve created an issue here for us to look into this: https://github.com/AnalyticalGraphicsInc/cesium/issues/4359

-Hannah