My ultimate goal is to try and generate a crowded victorian London slum. In the process this should blossom into a nice content-generation tool, useful for things other than virtual cities…
Tell me what ya think!
By the way, search Google for “CityEngine” - some folks have already done this, although I don’t like some parts of their implementation.
Put an # in fornt of the subtrate line, and got a console error for random ‘module’. Pretty new to me all of this - phyton especially. Very curious about city building script, and hope to get get working soon! Good luck to us all
Thanks for the kind replies! Sorry again about that silly “Substrate” mistake… At first I tried to build a generic L-system under the whole thing, but removed it eventually - somehow that leftover “import” never came up as an error…
At the moment, though, I am trying to rewrite the whole thing as an extended L-system again; this time using Prolog, though. The goal is to make it easier to integrate separate stages of workflow (e.g. street generator, house lot generator, architectural elements). Also, some algorithms can be reused in different stages (e.g. splitting up a block polygon into smaller lots, etc). Of course, Python has hooks to Prolog, so it should be easy to integrate this back into Blender.
I wish the current script showed something more than just simple lines… I’m sure more people would become interested then ;).
Thanks MyIs! Was detrmined to see the script in action, and now finally have. Recently installed Phython 24 and changed the path = don’t work in Blender. Now 23 re-instated & all back up and running. Hope you keep working at it Thanks…
your script is very nice indeed, although i find it hard to under stand how to control the final output. lets say i want just one main street with two smaller streets crossing it, then all the little streets between. is there a method to control that or is it a random system?
Nope, no control over individual roads, except for a few global variables like road widths and such. I definitely agree, though, that there should be a way to tweak the big roads before the rest of the city is done, or maybe clear out and manually recreate parts of the city…
Before that’s possible, I would have to finish the rest of the process - house lots and buildings - to at least have a proper beta version. Until then, it’s pretty much a useless toy …although I admit I already spent a lot of time just zooming in on the street map and tracing out routes, heh.
This is waaay cool. I love the random sort of streets this lays out, much more character than we are used to here in the states with out city blocks (Reminds me of the thief game too) One question: how do I get it to render? I see the geometry, but it dosn’t seem to have genarated valid faces for rendering, is there a way to have it generate quads so it can render or am I just missing something super simple here?
To fill the mesh, use SHIFT+F. If you want the buildings as well, first duplicate the mesh and delete the outer ring, press L on one of the vertices. Then SHIFT+F again et voila.
Ultimately, to have really useful results, one should probably tweak the output code to produce what they want. There are many possible output formats, so I couldn’t predict which one is the right one.