orangeadam3 / terra121

A Minecraft Terrain Generating Mod for Cubic Chunks 1.12.2. attempting to generate real terrain, biomes, and features on a 1:1 scale
MIT License
280 stars 42 forks source link

Road Issues : flat roads that are not flat in the mod #39

Open ELIAREy opened 4 years ago

ELIAREy commented 4 years ago

While travelling (virtually) through one of the valleys that spur from Lima, Peru, I saw that the roads that are supposed to slowly ascend through a very soft slope are going up and down virtual hills using the Terra 1 to 1 mod. This surprised me as even the same road seperated by a central barrier didn't have its lanes at the same altitude. Is this error due to the approximations of OSM data with altitude levels? It's very weird since these roads are supposed to look perfectly flat.

Here are the coordinates of the area concerned : -11.990241 -76.820035 But it extends through the whole valley (the "Carretera central" that comes from Lima). I wish you the best and hope you will be able to solve this issue with the help of other programmers around the world (me not included since I'm terrible at programming...). You will see a comparison below between the real world and what it looks like with the mod. image 2020-03-27_13 11 00 2020-03-27_13 11 27

taeko-chan commented 4 years ago

This is my understanding of it: The road is rendered after the terrain, so it's rendered on the hill, rather than having the correct, flat surface it should. This is because the heightmap doesn't account for the roads. It may be hard to solve without switching heightmaps to ones that have roads and buildings in them, and I don't know if OSM has that. I too am interested in finding a fix, so I'll definitely look into it. My current idea may be to survey the area parallel to the road like 10 blocks or so and if one side is lower than the other by a certain amount, then the road should be flattened down. As with anything there would be edge cases, but most of the time, I think that that rule would hold true.

orangeadam3 commented 4 years ago

So the roads do something like that already. You can see in the image the lanes themselves are flat across and dig into the mountian. The real issue is that the lanes are considered seperate roads. I'm not sure how (or if its worth the effort) to group them, there might be relevant relations on OSM, i'm not sure.

ELIAREy commented 4 years ago

This is my understanding of it: The road is rendered after the terrain, so it's rendered on the hill, rather than having the correct, flat surface it should. This is because the heightmap doesn't account for the roads. It may be hard to solve without switching heightmaps to ones that have roads and buildings in them, and I don't know if OSM has that. I too am interested in finding a fix, so I'll definitely look into it. My current idea may be to survey the area parallel to the road like 10 blocks or so and if one side is lower than the other by a certain amount, then the road should be flattened down. As with anything there would be edge cases, but most of the time, I think that that rule would hold true.

I see what you mean ; it makes sense. Hopefully OSM has this data. Otherwise your idea might do the trick, we'll have to see what the devs are going to do but it would be a nice correction. If someone has the means we could build an AI that could automatically detect anomalies and correct them.

ELIAREy commented 4 years ago

So the roads do something like that already. You can see in the image the lanes themselves are flat across and dig into the mountian. The real issue is that the lanes are considered seperate roads. I'm not sure how (or if its worth the effort) to group them, there might be relevant relations on OSM, i'm not sure.

It is not a problem that the lanes are considered seperate roads, since they kind of are (on OSM it's like that). And yes, the lanes are flat accross, but the real issue is that the roads go up and down hills that do not exist because they have been flattened so that the road goes up a constant, soft slope like in the image in Street View. In the virtual version we can clearly see that the roads do not go on a constant soft slope...

orangeadam3 commented 4 years ago

Thats going to be an issue with terrain dataset's resolution, 30m is already far more reliable than most public datasets. We are researching alternatives but if it changes it will be far down the line if at all. This dataset has it's problems but it is also free, hosted by a large company, and it comes with sea floor depths.

ELIAREy commented 4 years ago

Thats going to be an issue with terrain dataset's resolution, 30m is already far more reliable than most public datasets. We are researching alternatives but if it changes it will be far down the line if at all. This dataset has it's problems but it is also free, hosted by a large company, and it comes with sea floor depths.

I see, it's already amazing the results we have with all this data. I guess we can focus on more doable things for now like generating ice and snow on mountains and glaciers on top of the default stone. Good luck to you and all the other devs working on this gargantuan task!

taeko-chan commented 4 years ago

I see what you mean ; it makes sense. Hopefully OSM has this data. Otherwise your idea might do the trick, we'll have to see what the devs are going to do but it would be a nice correction. If someone has the means we could build an AI that could automatically detect anomalies and correct them.

that could be interesting to try out lol, although i'm not all too well versed in AI, but i have made some neural networks before. i'll try it out and let you guys know how it goes.

ELIAREy commented 4 years ago

I see what you mean ; it makes sense. Hopefully OSM has this data. Otherwise your idea might do the trick, we'll have to see what the devs are going to do but it would be a nice correction. If someone has the means we could build an AI that could automatically detect anomalies and correct them.

that could be interesting to try out lol, although i'm not all too well versed in AI, but i have made some neural networks before. i'll try it out and let you guys know how it goes.

Oh that's cool, neurals are extremely efficient and precise it would be a very good way to have at least a rough correction. I think AIs could be the future for everything concerning this impossibly huge project ; no human (or even a large group of very motivated humans) could build the entirety of earth's details in a 1:1 scale by "hand".

taeko-chan commented 4 years ago

i agree; my vision for what this mod could eventually be is a fully automatically generated real-life world, which would be completely unprecedented in minecraft. the only thing actually impossible/out of the question is auto building interiors lol