I'm assuming CityEngine is projecting the WGS84 latitude and longitude values from the .osm file to another coordinate system.
Does anyone what coordinate system CityEngine is converting the latitude and longitude to? Also if you know the math or have the code to perform this transformation, I'd really appreciate you sharing it with me.
Let me give you some background on what I'm trying to do. I want to use CityEngine to generate a 3D model from an OSM file then I want to import that model into Unity, parse the OSM file myself (in Unity) and do a little bit of math to position the nodes from the OSM in the correct place on the model generated from CityEngine.
However in order for me to do that, I need to know about the projection CityEngine does so I can ensure the nodes are put in the correct space.
If you cannot share CityEngine's secret recipe with me, I can think of one other solution, but I'm not sure if its possible:
Writing an exporter for CityEngine to output the node data (see image) to a file, this way I could just load the node positions from file rather than projecting them myself.
Is it possible to export the data in the image above? If so can you give me some direction?
the marker reporting is in the CGA rule which creates the street geometries. In the example in the other thread I used the 'Modern Streets' example, which you can download.
The format to export is basically just a text list. E.g. you can write this into a text file. Since you're creating the text on your own, you can compose directly any other ascii file format. very flexible.
Thanks for all your help, I was able to generate the markers. I've exported the city as in FBX and imported it into Unity. I am now trying to spawn objects on the marker positions but the positions are off (see image below).
The exported model is indeed rotated, not sure why this is but I was able to place objects on the marker positions by writing a script in Unity which places the objects based on the marker's vertices.
Now I've got another question for you 🙂
I need a way to be able to only export the markers and the shape they are parented to. I realize my wording to describe what I want to might be a little confusing, so I have made some diagrams to try and explain:
The image below shows how the imported city appears in Unity. [ATTACH=CONFIG]26072[/ATTACH]
The image below shows what I am trying to get imported into Unity. [ATTACH=CONFIG]26073[/ATTACH]
Is this even possible? Please let me know if you have any thoughts.
EDIT: Forgot to mention, I had the thought of editing the rule file so that it only generates what I want, but I'm inexperienced with writing rule files and not sure if this is plausible.