Dynamic data visualization performance extremes

Hi Cesium Devs,

In a nutshell, I'm trying to visualize massive gridded geospatial data in the client as quickly as possible, but I'm a fairly new hand at WebGL and the particulars of high-performance Cesium.

Some data about the problem:
1. The overall project is a browser based viewer of a Python particle tracking model running on the server side
2. Primarily a 2D context. Big proponents of the Flat Earth here :slight_smile:
3. Data to be displayed can be assumed to be present in the browser. How to do this when the overall dataset begins to push 100MB+ is a separate problem.
4. http://mathforum.org/mathimages/imgUpload/DI_vecfield.jpg This sort of thing is the general goal. Arrows representing velocity vectors at different places in time and space.

Common N scale is on the order of 100k to 200k arrows, with a time-to-completion of around 100ms. That is, within 100ms, necessary data computations are made (interpolation, mainly), graphics elements are updated and the Scene re-rendered. Currently we're falling short of this goal. This 100ms goal is because the Python simulation on the server rarely exceeds 10 steps/sec

Now, our dream is to implement shaders for this sort of thing. However, it's also something beyond all of our experience at this point, and finding the man-hours to learn it hasn't been possible yet.

Currently, we are representing each arrow as a Billboard that is rotated to the correct orientation, and the image is one of 30 different pre-rendered magnitudes. Every time the data changes, each Billboard is updated with the new angle and texture based on the direction and magnitude.

I believe when this was first implemented, Cesium did not have the PolylineArrowMaterial. Would a new implementation using Polylines and this material bring performance gains? What would be the big pitfalls on using Polylines on this scale?

Best regards,
JAH

Quick update: After experimentation with all flavors of polylines and geometries, it seems that nothing is as fast as the texture update/rotate strategy by quite a margin. The engine still takes too long to update all the arrows, but it's on the order of ~200ms-300ms, which is an acceptable interim.

I suppose a shader is the last thing to explore...

Hi Jay,

Thanks for the update! Polylines and Billboards are both entities, so generally you’ll get similar performance. If you want some finer grain control, you could use Primitive Geometry Types, with PointPrimitives being far and away the best performance wise, but obviously limited from what you can display.

Sorry I don’t have anymore specific tips.

Thanks!

Gabby