Routes and racing

Feature Request: Real Building Positions and Adjacent Roads in eRoutes

When riding an eRoute, being able to see adjacent roads (or roads that branch off from the current route) and buildings would be amazing. I think that would add significantly to the immersion, especially if you are riding in an area that you know in real life.

I know this is a big feature, but I have some ideas for how this would be possible.
Firstly, roads:
If I understand your system correctly, the terrain itself is generated from Mapterhorn LiDAR data. For calculating the actual route itself (and also biomes potentially?) you use OSM areas. That means you already have OSM roads next to the current one available. I believe the current implementation basically calculates height from Mapterhorn for the road aswell, so I think doing the same for side roads should be possible. Rendering potentially thousands of roads, however, might be GPU intensive, and preparing them at route 'preparation' time could increase loading time. Therefore, my idea is to try out how well it would work to do something along the lines of this:

  • BRouter routes your route. The route contains arbitrary points, not just OSM nodes
  • As BRouter routes save coordinates in FP32, they aren't always accurate. Matching to OSM nodes within 1m and discarding what doesn't fit seems to be sufficient tho according to my experiments.
  • Once you have the node, you can get connecting nodes. I'd recommend grabbing streets until 6 junctions or 150m traveled are fulfilled, whatever is earlier. That seemed to work okay in my tests.

Problem remains rendering roads that aren't visible, but I think that your renderer should automatically cull them if they're too far away. Implementing a sort of max render distance might be an optimization option tho, and then fading them in via opacity from 0 to 100% over a few meters to avoid that jarring popping-into-existence effect, e.g. when riding towards a mountain, and then into the mountain village.

For buildings, if I understand things correctly, right now you're basically placing building models to the side of the road randomly, depending on the environment, from a small pool of low-poly 3D models. Having real building positions and placements would be AMAZING for realism in RideCave, and would make everything feel a lot more real. I know this is difficult, which is why I built something to prove its possible: osm-buildingen (GitHub)

Here's a screenshot of my home city's center for example:
Ulm City Center

Houses are mostly generated from OpenStreetMap base layers, some have additional geometry. The church and some other models are more detailed, but these are already inside of OSM. All this needs is an export from OpenStreetMap that you can import directly into the viewer. There's also a studio where you can look at individual buildings, like the (now sadly second-)highest church in the world:
image

This can definitely be updated a bit more and has some problems, but what it already supports is:

  • Houses
  • Shops and such in the first level of townhouses
  • Garages and such belonging to a house
  • Multi-level buildings, like office buildings or skyscrapers
  • Different style sets (at the moment I have DE and US suburbian, each with a modern and old version)
  • OSM-integrated models for things like churches and such
  • Arches where a path passes through a building
  • A bunch of roof shapes and such

Technically, this works by getting all the data that it can from OSM and guessing for the rest, and then unrolling the facades and running Waveform Collapse to determine positioning of windows, doors, balconies and so on. I think this especially works well in villages:
image

I made the library to work as well as possible with RideCave. That means it's fast (taking about 700ms on one thread on my desktop to render the entire ulm inner city), written in three.js like RideCave itself, and has a low poly style. Also, it has a height value for generating buildings (one per building at the moment) so it can work with Mapterhorn tiles, and can be fed directly by OSM node data so RideCaves own OSM mapping service can be used with as little friction as possible. I'm sure there will be some things to change to get this anywhere close to ready still (like, I think buildings that overlap a road on one edge aren't solved well yet, making something like a colon row is far better than the tunnels this cuts for now, and curches should still get fancy windows and such), but I hope it's a solid starting point.

I'd really love to see this if possible, as I really think it'd add a lot :)
If you have any questions about any of this, I'm on the Discord server (@yandrik)

This is a super cool idea and what you have done yourself is incredibly interesting! Love to see this level of passion ๐Ÿ˜†

Your reply

Join the conversation

Sign in with your Ride Cave account to reply. Reading is open to everyone.