With Cesium for Unreal I am building a 3D city model which contains terrain, buildings and overlaid orthophotos as 3D tiles.
Now I would like to make the city appear “alive” and have coordinate lists (X, Y, Z → Longitude, Latitude, Height) for objects like trees. How can I import this coordinate list into Unreal and then place the same 3D object at each coordinate? I can get a 3D model of the object “tree” as a .FBX file., but have no acces to CESIUM Ion.
Many thanks in advance.
Can you describe your coordinate list in more detail? For example, what file type is it stored as? Do you only want to import this file once and simply save the coordinates? Or do you want to import this multiple times to register any updates? These factors would impact how it can be imported into Unreal Engine.
My coordinate list consists of the columns (lat, long, ellip. height, scale). The coordinates were converted using EPSG code 4326. The list is inserted as a datatable, for which a separate structure was created in Unreal. Is this possible with Cesium for Unreal?
Another error I noticed concerns the coordinates, because in the GIS program the WGS84 coordinates are correct and a test object with the same coordinates in Unreal is located 1 km elsewhere.
Does the scale parameter impacts the global coordinates of an object in Unreal?
You’ll probably want to use this sort of workflow from Blueprints.
In summary, you’ll need to:
- Get your coordinates from the data.
- Spawn an actor, ideally of a class that already contains the mesh you want.
- Add a globe anchor.
- Move the globe anchor to the desired coordinates.
For your second question, can you provide a more concrete example of the discrepancy you’re seeing? What is the program you’re using, and what coordinates are you trying to set the object at?
Thanks for this answer
The error with the coordinate differences could be solved with scale = 1 in the CesiumGeoreference. I used WGS84 coordinates out of QGIS.
The objects are now all aligned in the same direction. In my table, however, I still have the rotation around the z-axis as an additional column. So how can I correctly align each object according to this rotation angle directly when reading it in via the blueprint?
My next question concerns geometric primitives (point, line, polygon).
I can now insert points, but what about lines? I would like to use the terrain with the overlaid orthophoto to draw a thick coloured line along the surface. In other words, connect the points to form a city tour that is projected onto the terrain. How can this be realised?
→ @janine problem still exists