Open taeko-chan opened 4 years ago
I love this. Can't wait for it to be merged so I can start working on adding lane markings. Honestly it seems like a bad idea to add an additional option for "advanced roads." This seems like a feature that should be built in to the default road generation.
I love this. Can't wait for it to be merged so I can start working on adding lane markings. Honestly it seems like a bad idea to add an additional option for "advanced roads." This seems like a feature that should be built in to the default road generation.
I ended up writing a new populator that uses the Vec3d object to store coordinates, as I saw it more fitting. It also lets you do vector math easier. We could possibly just use VectorPathGenerator instead of RoadGenerator from now on, as it does the same thing RoadGenerator does + the tunnels/bridges and road surfaces.
what does it do? This pull request adds tunnels and bridges to Terra 1 to 1. It is done by getting the start and end points of an OSM way as well as the start and end heights, and calculating the height using: y = y1 + (c/d) * Δy1 where c is the distance along the tunnel, d is the length of the tunnel and y1 is the origin y.
As of current, all (famous last words) bugs have been fixed. Tunnels and bridges both generate correctly (outside of the edge cases listed below). The pavement is standard asphalt, although one photo has orange asphalt because it was taken before I changed it back.
Here are some photos of the results (more coming soon):
Near Airolo, Switzerland: Terra 1 to 1:
Real life:
Gubrist Tunnel, Switzerland Terra 1 to 1:
Real Life:
Lærdalstunnelen, Norway (World's longest tunnel): Terra 1 to 1:
Real Life:
view from inside mountain of Lærdalstunnelen:
Gotthard Pass (Ticino Side), Switzerland (no companion irl photo yet):
Keep in mind the orange parts are asphalt in the pull request.
what still needs to be done?
CHANGE LOG (major stuff):
i left the class itself in just in case, but the osm path generation is now done by VectorPathGenerator.
Also important: Because there hasn't been a grounding fix yet it may be best to wait until after that is fixed to avoid conflicts in OpenStreetMaps.java.
If you want to try out a complied version with tunnels and bridges, here it is (this version is a commit behind): https://drive.google.com/open?id=1YaFy01VRi-lPOT-ccfkaYenwbSE1eQcV
That pretty much summarizes it, if anyone has any suggestions around this basic feature set, go ahead and comment and I may implement them as well.