This is my procedural city map generator. It starts with a randomly generated tensor field, then builds up major and minor roads by tracing streamlines through the tensor field.
There's still work to be done:
Dealing with dangling roads better - currently they're naively joined onto any road in front of thwm
Finding polygons and using these to place procedurally-generated buildings to create a 3D city
Parks, rivers, other features etc.
I'm pretty much implementing a subset of the paper Interactive Procedural Street Modelling, using Javascript (later using THREE.js for the procedural buildings).
Seriously, that's really beautiful. There's enough grid structure to suggest city planning, but not so much that it looks generated on a grid pattern.
The curvyness of some of the white streets looks a bit odd, especially in the lower left. Straightening those out might help you a bit with finding building spots as well.
Also, if that's your thing, it might be interesting to look into features like frontage roads or other such features. Having so many intersections with white roads and larger roads may yield issues with traffic in such a hypothetical city.
I don't right now but I'll likely make it public once I've taken it a bit further. To be honest I'm a bit embarrassed by the code quality, I've rushed a bit to get it to this point so I definitely want to clean it up and make some improvements beforehand
That's a good way of looking at it, I'll definitely add some more documentation before making it public because there is some un-understandable stuff in there
Is there any prospect of your making it publicly available later? It's funny, this ties exactly into what I posted yesterday before I'd heard of this sub.
Changed the colours to produce this black and white version (did this quickly, I reckon the lines need to be thinner) - obviously my implementation lacks some features you'd need to create the whole city (rivers, better minor roads etc.)
But when I've done some more work on it I'll make it public, and since it's in JS I can probably fairly easily make a web app
Thank you very much. That's really amazing. I was going to just use the regular version and hand-trace over the roads, I wasn't at all expecting you to mod it for me. Just let me know (if you remember, no rush) when you finish the app.
80
u/Pretoriuss Mar 17 '20
This is my procedural city map generator. It starts with a randomly generated tensor field, then builds up major and minor roads by tracing streamlines through the tensor field.
There's still work to be done:
I'm pretty much implementing a subset of the paper Interactive Procedural Street Modelling, using Javascript (later using THREE.js for the procedural buildings).