Local/Imported Map Data for Unity

Hello, first of all, thank you so much for the amazing work.

I have a question regarding importing or local hosting of map servers.

I am given some 3d map data that I am not able to share or upload to the internet. Is it possible for me to setup a server to stream the data to Unity or import it locally?

I already read this guide, but I am curious to know what exactly do I need to craft this tileset.json. Or am I going in the wrong direction?

Hi @Wong, welcome to the community!

That tileset.json is part of 3D Tiles, which is an open standard. However, creating a tileset from source data with a tool you develop yourself is a major undertaking!

If you can’t use Cesium ion because of an offline requirement, you might consider using licensing Cesium ion Self Hosted.

Hi, can I know exactly how Cesium Ion Self-Hosted works before I contact the sales?

What would you like to know? You can find the documentation for it here:
https://cesium.com/learn/ion/self-hosted/

Hi, apologize for the late reply and thank you for the quick response. Uhm, the data I have with me is cityGML. I am not allowed to upload the data to Cesium ION, hence I will probably need self-hosted. How exactly does it work? Does it convert from cityGML into 3dtiles and host a server to stream the 3dtiles to Unity?

We are also working on streaming cityGML data into Cesium. So far we were able to load CityGML-Files into an open source 3DCityDB (3DCityDB Database – Homepage), which is an extended PostGIS-DB. From here there are many ways to create a streaming server, but haven’t tested them yet. You could try the following:

Please let me know if one of these works for you.

Yes. It’s basically a version of Cesium ion that you can run on your own Kubernetes cluster. The data processing / tiling capabilities are the same as Cesium ion, so the best way to see if that will meet your needs is to try Cesium ion. If you can’t do that, you may be able to contact sales and arrange a trial of self-hosted.

Thank you very much, I will look into it when I have time!

I see, I think I have a better understanding now! Thank you very much, can I check if the cesium ion self-hosted is a one time payment or?

I believe it’s typically sold as a subscription. But you should definitely contact sales with questions like that, because it’s not really my area.

Hi Ereiswich,

I managed to import locally using py3dtilers as you suggested. Thank you very much!

Glad to read that! Could you please post the result as .PNG and a few steps how to reproduce?

Hi Ereiswich,

Here’s a quick overview of how I did it:

Instead of using the py3dtiler repo, I used this: GitHub - VCityTeam/py3dtilers-docker: Docker wrappings of the py3DTilers tool as it speeds up the process

  1. Check your city GML to find out the CRS used.
  2. Follow the instruction from " Usage example: running the citygml-tiler (with docker)" onwards. Change the SRID & HEIGHT_EPSG according to the CRS used in the CityGML. The instruction 1. has an error, “espg:3946”, instead of that, just type the number, eg. “3946”
  3. When you reached the 3rd instruction of the citygml tiler, you will need to add some parameters to this line “docker run --rm --network citydb-net -v $(pwd):/data -t vcity/py3dtilers citygml-tiler --db_config_path /data/Config.yml”

specifically, you’ll need:
-crs_in
-crs_out

You can read more here: py3dtilers/py3dtilers/Common at master · VCityTeam/py3dtilers · GitHub

Additional Note:
If you’re using CRS with Axes: Northing, Easting (N,E). You will need to adjust the code in the repo py3dtilers/py3dtilers/Common/tileset_creation.py at master · VCityTeam/py3dtilers · GitHub

line 80: transformer = Transformer.from_crs(user_args.crs_in, user_args.crs_out)
you need to add the parameter always_xy = True

Transformer.from_crs(user_args.crs_in, user_args.crs_out, always_xy=True)

Also, if you’re using Compound CRS, then you will need to make the compound CRS from the pyproj library and replace the “user_args.crs_in”

That should be it! Let me know if you have any question. I will answer them if I know.

1 Like

Thank you very much for sharing Wong! This should speed our tests considerably.