Create a heatmap similar to Mapbox

Hi all, I’d like to create a heatmap effect similar to Mapbox. Does Cesium currently have something similar? Or are there any suggestions on how to achieve a similar effect?

Hi @Xiaoguang,
We don’t have any built-in heatmap capability. However, one possibility is to publish a heatmap on a WMS or TMS server. Then, you can bring that heatmap into Cesium for Unreal by adding the appropriate raster overlay component to the Cesium3DTileset Actor.

I don’t have first-hand experience with it, but with a quick search I found this tutorial for creating a heatmap with Geoserver, which is a WMS server:

Or perhaps you could use gdal_rasterize to generate a heatmap in GeoTIFF format. Then, you can upload that GeoTIFF to Cesium ion, which will tile it and make it very easily accessible as a raster overlay.

The raster overlay doesn’t look good. I would like to implement clustering and discrete point display like Mapbox does.

Ok, let us know how you go with your implementation!

I have loaded the GeoJSON data and used Georeference to convert the coordinates to Unreal coordinates. I want to draw some debug lines first, but even when I set the debug spline’s Thickness to 10000, I still can’t see it from space altitude. I’m puzzled about this.

geojson:
https://docs.mapbox.com/mapbox-gl-js/assets/earthquakes.geojson

geo coord: X=-118.945 Y=34.214 Z=0.000
ue position: X=-49xxxx01.684 Y=-542xxxx37.102 Z=-970xxxx07.811

The Thickness I set was still too small. After setting it to 1000000.0, I can now see the debug splines. However, they are all pointing in one direction. How can I get the upward angle at each coordinate point?

If you’re trying to determine which direction is “up” at a particular point on the globe, you can use the GeodeticSurfaceNormal method on CesiumWgs84Ellipsoid. That takes a position expressed in Earth-Centered, Earth-Fixed (ECEF) coordinates and returns a direction also in ECEF coordinates. To convert ECEF positions and directions to and from Unreal world coordinates, use the various methods on the CesiumGeoreference Actor.