Roads between virtual settlements (performant ideas?)

Hi Friends,

I have these settlements in VR (towers, horizontal line settlements, etc.) and I want to make roads between them, and I wonder if there is some kind of ‘normal approach’ to this? I’m sure it’s been done before. Is there a normal and performant approach?

I have an agent that is “creating” the settlements. Should I just ping its location every so often? And get that point and add it to a line and make that line “fat”? Thoughts/advice is welcome.

Hi saitogroup,

Sounds like a great opportunity to bring up my old friend, the classic CityGen paper! :smiley:

If you search around for “procedural city” or “procedural roads,” there’s actually quite a bit of literature on this topic. Unless something’s advanced significantly in the last few years, most papers will probably end up directing you toward L-systems, which might be tricky but give fantastic results. If you’re just trying to draw simple “here-to-there” roads that aren’t trying to resemble a real cityscape, you could probably also get away with just making line segments directly from here to there, potentially using something like midpoint displacement (used in lightning-creating techniques) to make the roads less uniform. It just depends on what you’re going for, really: lots of possible answers, and very few that are really “wrong.”

Hope this helps, and best of luck!


this is way cool, and I’m going to dig in

on a more mundane level, should I just use a “fat” line object? like what should I make the road out of?

Ribbons are probably your best bet for road geometry. That’s what we used for the old kart racer demo way back when.

1 Like

Could this be useful for your fat line?

How about some ai algorithm to identify the objects , possibly manually weighted with a physics imposter. Thinking something like the edges of a self organizing map. Or , something similar to facial feature mapping. Or maybe a 3d voronoi and some noise / smoothing for the paths. Or some flow field approach . I was thinking you have the map first and want to add roads later like in your pic.

But… Are u thinking to make the roads after the agent builds the settlement or while it’s doing it? I think if you want to do it while its working, the path finding algorithm will dictate . Does the entire simulation process need to be visually realistic ? Bc im thinking as the agent moves, if it builds and then deletes roads , thats not so realistic , but if just the end map is all that matters, you could just build/delete the road as it moves .

3rd approach i can think of would be to trace out the agents movement. Then when hes done, use his actual movement points to plot a line of best fit and have him build the road based on the line of best fit as the last step

This is so cool!

This paper is hilarious.

  1. Login • Instagram ← I put townscraper in vr
  2. ← look how crazy this is, I’m trying to see if you can export it as obj and pull into VR (also wondering if you can “glitch” the python code to make strange and beautiful mistakes)

but yes, going to keep thinking about this procedural road thing
I’m doing procedural city generation with agents and the only other people doing that are the minecraft settlement generation people:

  1. And this one genius person Kenichi Kabeya swarm urbanism on Vimeo

  2. Here, you’re the agent: Pin by El Kalinov on Central Elements & Computational Style | Procedural generation, Moonscape, Typing games lol.

Anyway, just grinding on this and trying to find a fun way to build procedural cities, ideally with agents.

1 Like

Thanks for sharing this link, I remember I spent a couple months in highschool trying to write a good town generator for Minecraft. It’s a super fun challenge :slight_smile: Thank you for the trip down memory lane!


the submissions for that contest are… insane. lol

1 Like

also adding this here for y’all: GENERATIVE CITIES | NFT

insane threejs procedural city generator

I thought you wanted some kind of realistic ai process.


also good

1 Like

not sure this fits your need, but here are some examples of a ribbon-based dynamically generated (and recycled) road :

When starting to fly, search the road around, it’s close from the initial camera position.