Our application is processing CZML streams every second. One scenario has a CZML update containing many polygons, triangles to be specific - average 100 polygons. These polygons are updated on every update cycle. The polygons update; however, with each update, there is a blinking effect on those polygons. All 100 polygons have unique identifiers.
The problem is your are specifying in the CZML that your polygons are static, so Cesium treats them that way on the client and triangulates them asynchronously in a background worker. The correct solution is to specify that your polygons are time-dynamic in the CZML, easiest way would be to wrap them in a CMZL interval for the time that they apply.
And via the Entity API you would use TimeIntervalCollectionProperty instead of CallbackProperty (for intervals, still use Callback for changing every frame).
Thanks for the information. We decided to not go with a time-based approach some time ago to adapt with legacy services. If the CZML is wrapped in a time interval, I’m curious to know how Cesium mitigates the blinking under the hood - versus static polygons.
For static polygons, is Cesium performing a remove-and-redraw? Thus, causing the blinking.
Yes, the blinking is caused by a remove-redraw. Static geometry is drawn asynchronously using webworkers to avoid unnecessary lag in the application.
To avoid blinking with dynamic polygons, we draw them synchronously. Here is a code example of how to add a polygon synchronously:
var viewer = new Cesium.Viewer(‘cesiumContainer’);
var scene = viewer.scene;
Our data provider was modified to wrap the CZML entities in a time interval - very similar to the “Intervals, Availability” demo on sandcastle. This mitigated the blinking; however, the problem when that is hooked in is the huge decrease in fps. With time-dynamic data, fps is bogged down to 1-3fps without roughly 100 time-dynamic polygon czml.
Was wondering if there should be any settings with the CzmlDataSource.DataSourceClock that needs to be configured or sychronized with Viewer.clock? The CzmlDataSource is initialized with ~30 day time interval - x days in the past, and y days in the future from the current time (below).
The browser is receiving czml updates every second and an polygon entity is available for the entire scenario time interval; each polygon position is wrapped in a time interval that can change each second. Is there a performance cap that Cesium can support as far as how many time-dynamic entities can be supported?