I am in the process of creating a digital twin of a city and need UE to overlay information. Currently, I am using Cesium and OSM Buildings to create the standard 3d map of the city. I have been given a data table with coordinates that define degraded buildings within that city.
My intention is to spawn cylinders with a transparent material applied to distinguish those buildings.
My progress so far:
Created a cylinder actor with a translucent material (BP_CylinderActor).
Created the data table from the csv file (DT_DegradedBuildings).
Created the data structure defining the variables driven from the csv information (DS)_DegradedBuildings).
Created the Blueprint to get the latitude and longitude but I am struggling with the functions to spawn the cylinder to each set of coordinates (BP_CylinderSpawner).
My Blueprint so far:
Can you please advise on how to complete this? I am struggling to find the correct functions to populate the cylinders within the level based on the coordinates.
These are real coordinates based on World Coordinate System and sit within the same city, therefore this slight differentiation is logical. What I see is that the BP_CylinderSpawner is spawned in the location I positioned in the Editor. So I believe the issue may sit with Cesium and the Editor…
Thank you for your support so far! At least I am getting a better understanding of various things… Probably I need to transfer this to the Cesium forums…
Are the passed in coordinates in the correct scale compared to Unreal’s coordinate system?
Are you sure they aren’t scales by 10 or a 100? The delta between coordinates is minimal.
Try multiplying the outgoing value by 10 or a 100 and see if they snap into the correct places. Do they at least begin to resemble their expected pattern on the landscape.
Could it be a matter of the map’s static mesh import scale?
You can manually set the scale in the static mesh.
Some 3d programs export by default at a value of 0,1 scale.
If all imported elements were imported at a different scale then the passed in coordinates would require an offset.
The Map is driven by Cesium’s Google 3d Tiles and OSM Buildings overlay. Therefore two different sources work together within the Cesium addin and work smoothly.
I altered my cylinder dimensions within the actor to appear effectively (scaled by 50 in x & y and 100 in z).
I do not believe that Cesium should need rescaling… There aren’t any imported elements… Everything is created within Unreal Engine.
Further to this, I tried the following blueprint script this morning:
Can you please advise if this should work? I have added the static mesh cylinder within my BP_CylinderSpawner instead of creating a separate actor. I also added the make transform and add instance via Construction script.
I managed to resolve this, it was a combination of things, mostly related to how Cesium handles coordinates and the specific functions around it. I am posting the final Blueprint to raise awareness…