Failing to import custom asset into Unity, error: This type of asset is not currently supported

Hello,
I am currently working on a project in which I aim to visualize the electoral results of the city of Madrid by coloring 3D buildings according to the most voted political party in each neighborhood. To achieve this, I have created a GeoJSON file that includes data on the boundaries of Madrid’s neighborhoods as well as the most voted party in each of them.

I uploaded this GeoJSON as an asset to Cesium ION (see image 1), and everything seemed to be in order. However, when attempting to import it into Unity as a Cesium 3D Tileset, I receive the following error message (image 2): “This type of asset is not currently supported.”

Does anyone have any suggestions on how to resolve this issue?
Thank you very much in advance.


@Dacoar Thank you for the question! Unfortunately, the answer is as the message says - GeoJSON assets are currently not supported in Cesium for Unity. We are in the beginning stages of adding GeoJSON support to Cesium Native and Cesium for Unreal, as you can see in CesiumGS/cesium-native#1154, CesiumGS/cesium-native#1163, and CesiumGS/cesium-unreal#1651. However, we don’t currently have a timeline of when these changes will make it in, nor any timeline on when we’ll add support for these to Unity. I would hope that it is sooner rather than later, but I can’t make any promises!

1 Like

I just want to add one note to what Ashley said above. It’s possible to visualize GeoJSON polygons today by getting an external tool to rasterize them for you. A common approach - which should work well here - is to configure something like Geoserver to rasterize your polygons and serve them as WMS. Then you can drape them over a tileset in Cesium for Unity using the Web Map Service Raster Overlay component.

Alternatively, if you don’t want an active server like Geoserver in the mix, you can use something like gdal_rasterize to rasterize your polygons to a GeoTIFF, and then upload that GeoTIFF to Cesium ion as Imagery. You can then drape the imagery asset that it creates over 3D Tiles using the Cesium Ion Raster Overlay component.

2 Likes

Hello!, Thank you for your quick anwsers,
I’ve decided to go with the second option because I need to use the project on different computers, and I’ve noticed that Geoserver is typically run on localhost. Therefore, if I create an .exe file to view the project on another computer, the layer would stop working.
I’ve already created the .tiff file and edited it in QGIS to display the different colors according to the neighborhood (Image 1). I exported it to Cesium ION, and indeed, I can now add the new asset. However, it appears completely black (image 2). Is there any solution to this?
Thanks for your response!

Hi @Dacoar,

I’m not sure what’s going on there, but my first guess is that perhaps you’ve created a GeoTIFF where the colors are expressed as floating point numbers or something else unusual? You should make sure your GeoTIFF uses simple 8-bit per channel RGBA pixels.

Also, not to discourage you from your current course, because I think it will work well for you… but Geoserver can certainly be run on the internet or on a LAN or whatever. It’s not limited to localhost.