louis-e / arnis

Arnis - Generate cities from real life in Minecraft
GNU General Public License v3.0
432 stars 23 forks source link

City / State based export broken #37

Closed DanHues closed 3 weeks ago

DanHues commented 3 months ago

Hey, I attempted to run the city based export instead of the box based selection to have a larger region of Gainesville, Florida. The render took 121 minutes but exported a pretty empty region, and in specific parts its completely empty / cut off

PC Specs CPU: Ryzen 7 5800X Ram: 96GB DDR4 1599mhz GPU: RTX 3090

javaw_8a4P3ci1c3 cmd_4Kzl1B1hi8

amir16yp commented 3 months ago

I will try to reproduce this. try to run your command again with --debug, then tell me what the output of arnis-debug-map.png is. it should be generated after processing elements and before the generating pixels. also does this not occur if you do the same area with the bounding box?

louis-e commented 3 months ago

Hi there! Well, this is a known issue we had for a very long time with the city / state / country input. That's why I decided to set the bbox input as the standard option and to not longer actively support the other input arguments. I left it in just in case, but I can only recommend trying it with bbox - the README contains a guide for that. I will also push a huge refactoring tomorrow which improves the visuals and generation time massively, so stay tuned! :)

DanHues commented 3 months ago

Hi there! Well, this is a known issue we had for a very long time with the city / state / country input. That's why I decided to set the bbox input as the standard option and to not longer actively support the other input arguments. I left it in just in case, but I can only recommend trying it with bbox - the README contains a guide for that. I will also push a huge refactoring tomorrow which improves the visuals and generation time massively, so stay tuned! :)

Thanks for the quick response! I was able to get a decently sized export of the downtown Gainesville area. But, I'm working on creating a series for shortform content platforms based around the idea of building my hometown in Minecraft. without that command is there a way to do selections that are bigger than the Openstreetmaps 50k limit?

Also, wanted to say this project is amazing! Its super seamless, im excited to see the future development of this for sure! The box based export came out mostly solid

javaw_CDh68POCn3

but, on my export some of the buildings are missing

Untitled Untitled2

Thanks again, seriously amazing work!

DanHues commented 3 months ago

Heres a debug png for a box selection of downtown Gainesville Florida arnis-debug-map

The entire city is going to take a few hours so I will respond with that later lmao

amir16yp commented 3 months ago

Hi there! Well, this is a known issue we had for a very long time with the city / state / country input. That's why I decided to set the bbox input as the standard option and to not longer actively support the other input arguments. I left it in just in case, but I can only recommend trying it with bbox - the README contains a guide for that. I will also push a huge refactoring tomorrow which improves the visuals and generation time massively, so stay tuned! :)

Thanks for the quick response! I was able to get a decently sized export of the downtown Gainesville area. But, I'm working on creating a series for shortform content platforms based around the idea of building my hometown in Minecraft. without that command is there a way to do selections that are bigger than the Openstreetmaps 50k limit?

Also, wanted to say this project is amazing! Its super seamless, im excited to see the future development of this for sure! The box based export came out mostly solid

javaw_CDh68POCn3

but, on my export some of the buildings are missing

Untitled Untitled2

Thanks again, seriously amazing work!

i just a noticed pattern, almost all the buildings that are missing here are not exactly rectangles nor round, and all but one have a hole in them. might have something to do with it

DanHues commented 3 months ago

Interesting, the debug png for this iteration of the city command generated this, I'm gonna keep the command running to see if anything changes with the world itself arnis-debug-map

amir16yp commented 3 months ago

i recommend using the automap feature with the journeymap mod. then you could view the map and teleport anywhere. you might have spawned in an empty space, and the distance to the actual city is quite large, so you might at first think the map didnt generate properly

DanHues commented 3 months ago

i recommend using the automap feature with the journeymap mod. then you could view the map and teleport anywhere. you might have spawned in an empty space, and the distance to the actual city is quite large, so you might at first think the map didnt generate properly

Hey so after teleporting around on singleplayer it was looking completely fine then comparing it to my server with the world imported, it looks like the data got corrupted when i imported the world into my build server.

DanHues commented 3 months ago

i recommend using the automap feature with the journeymap mod. then you could view the map and teleport anywhere. you might have spawned in an empty space, and the distance to the actual city is quite large, so you might at first think the map didnt generate properly

Alright i confirmed it, it was my Multi world plugin, after reexporting the world with the state command image hey look i can see my house from here!

Also on a note about the missing buildings, it looks like missing buildings occur when there are alot of layers on top of a specific zone.

for example, the library on UF's campus image in game its missing the entire building

on open street maps image

I noticed this issue around specific roads aswell. image

image

DanHues commented 3 months ago

btw, do you have a discord for this project? I'd love to join and follow this along its development

Also, since its in a similar vein i think yall might be interested in this https://www.patreon.com/AtmosphericBeatsMC/ This guy makes custom worlds using OpenStreetmaps data and geotiff to make city maps with heightmaps but the worlds are exported into a .world file for worldpainter and then exported using worldpainter as a baseplate.

louis-e commented 3 months ago

I guess I'm a bit late for the conversation here, but it's nice to see everyone helping out! :)

Just a few notes from my side:

is there a way to do selections that are bigger than the Openstreetmaps 50k limit?

I don't think so, I guess this depends on the used OSM API server. Maybe there is one without such an limit (https://wiki.openstreetmap.org/wiki/Overpass_API#Public_Overpass_API_instances). Maybe you can look into hosting your own modified API server, but that sounds a bit time consuming to set up ;) This is just my guess though, I'd have to do some more research on this. https://github.com/drolbr/Overpass-API

but, on my export some of the buildings are missing

Can you check if this problem still occurs with the last refactoring update I just merged?

i just a noticed pattern, almost all the buildings that are missing here are not exactly rectangles nor round, and all but one have a hole in them. might have something to do with it

Initial thought: This might be the floodfill algorithm having problems with finding an inner point in the object. See comment above; I updated the floodfill algorithm too in the recent refactoring update, so this might be fixed. Let me know if this is still an issue!

Also on a note about the missing buildings, it looks like missing buildings occur when there are alot of layers on top of a specific zone.

This might also have been true, but same as above; the processing pipeline is now way more precise, efficient and faster :)

DanHues commented 3 months ago

Can you check if this problem still occurs with the last refactoring update I just merged?

For sure! On the latest build the buildings are still missing javaw_BaDK2ZsGEi

louis-e commented 3 months ago

After reproducing the issue and inspecting the arnis-debug-processed_data.json, this is what I have observed so far:

Healthy element: image

Corrupted element: image

The missing buildings (corrupted elements) contain a reference to the node coordinates rather than actually containing the coordinates and are classified as a relation rather than a way data type. This is the way how we receive the data from the API, so the processing code just skips them. Will look into this!

louis-e commented 3 months ago

I investigated this further and wrote some dummy code, I'm going to implement the logic when I have time to extensively test it! image

louis-e commented 2 months ago

Please check if this issue is still occuring in the new release (Arnis v2.0.0)! https://github.com/louis-e/arnis/releases/tag/v2.0.0