Jump to content

parametric city generation


plastic
 Share

Recommended Posts

looking at this images i really wish i had something like this "city engine" for 3ds max:

 

http://www.centralpictures.com/cities/gallery/09_lowspiral.jpg

 

http://www.centralpictures.com/cities/gallery/02_zurich.jpg

 

http://www.centralpictures.com/cities/gallery/08_industrial.jpg

 

http://graphics.ethz.ch/Downloads/Publications/Papers/2001/p_Par01.pdf

 

unfortunately this is a closed system, not even sold as software...

i'd like to make a script for max doing something like this (but more simple of course)

i'm thinking of an "architectual" version of the great greeble plugin...

http://www.asro.kuleuven.ac.be/asro/English/HOME/SBs/3dcourse/gallery/gallery.phtml?var=greeble

 

anyone interested in such a thing, or any ideas how this could work, coding or workflow-wise?

Link to comment
Share on other sites

Originally posted by Marc Lorenz:

looking at this images i really wish i had something like this "city engine" for 3ds max:

unfortunately this is a closed system, not even sold as software...

i'd like to make a script for max doing something like this (but more simple of course)

anyone interested in such a thing, or any ideas how this could work, coding or workflow-wise?

I didn't read much of the 8 page document, but I did notice that the whole thing is based on an L-system. These are formulas, so why is so 'closed'? I had gotten some freeware L-system software to generate trees and plants, probably as early as 1990, and it still sits on my current hard-drive. What you show is a more advanced application, but perhaps you can contact the researchers for the math. They published this as a paper, after all.

 

Now, there is a poor-man's version of what you saw, if you are happy with a gridded city, or are willing to do some work in Photoshop. I got this idea from another CG artist...perhaps Eric Hanson:

 

The idea is to get a grayscale image to feed into either a heightfield generator or simply to use as a displacement map. You would make it so that black is the lowest elevation, maybe water, maybe street surfaces. One shade lighter becomes sidewalk, for example, depending on the vertical interval. White becomes your tallest point. You can see how this way of working is very easy to do and very logical. You are working in 3D in your mind and 2D in Photoshop.

 

Use a noise generator filter to create a field of squares of various shades of gray. You can do several of these on layers and combine them in various ways, you can modify shapes by selecting areas and doing other filters or fills, raise or lower 'neighborhoods' by lighten or darkening areas. You can add lighter shapes within any building footprint to make setback towers. It's all very logical. You have 256 levels to work in from the lowest to the highest point, so set up a scale in your mind (1 shade = .25 meter, for example, or 1 = one floor) but remember that no detail can be shown below that Z scale factor, so if your scale is 4 meters for a floor-to-floor, don't try to get curbs of .2 meters.

 

When you have a city plan that you like, you can even give it topography. Make a second grayscale image to represent the ground, and use it to 'lighten' the city image. However, note that you must have accounted for the extra shades in your city map. If you will have 20 levels for topography, you will need to subtract that number from your 256 level city map, so the tallest object will be 236. The limit comes from an 8 bit limit on most renderer maps and heightfield generators.

 

Once complete, the map can be used to generate 3D polys in Bryce, for example (note also that Bryce needs a square map--don't ask me why--although you can re-size a rectangular map to a square, and then rescale the model back afterwards) or used as a displacement map. I don't have any software that used displacement, so I haven't tried it myself. I have used the Photoshop grayscale map to generate a terrain in Bryce and it works very well. I tried the same image in Rhino, but did not get results as good as Bryce.

 

Ernest Burden III

Link to comment
Share on other sites

Originally posted by Ernest Burden III:

When you have a city plan that you like, you can even give it topography. Make a second grayscale image to represent the ground, and use it to 'lighten' the city image...

Ernest Burden III

Actually, there is a minor problem with that step that must be addressed. If you apply a topography slope to the city by lightening the image, you will creat slopes in the buildings, which you don't want. Therefore there would need to be a procedure in Photoshop to lighten the building areas with the AVERAGE of the slope gray under them. I will have to think about the easiest way to do this and report back--if anyone is interested.

 

Ernest Burden III

Link to comment
Share on other sites

Hi Mark,

 

I've been experimenting on this topic too, although my goal was slightly different...

 

nisus_office.html

 

http://nisus.bizhosting.com/nisus_office.html

 

This model was made in less than five minutes by generating geometry due use of a script.

Looks like it's useful for generating your cities.

(I didn't add a rotation modifier yet, but rotate while moving can generate spirals alike...)

 

rgds

 

nisus

 

ps: tnx for the paper, gonna be my read during supper ;)

(I'll keep you informed)

 

[ August 28, 2002, 11:24 AM: Message edited by: nisus ]

Link to comment
Share on other sites

Originally posted by Marc Lorenz:

[...]

i'm thinking of an "architectual" version of the great greeble plugin...

http://www.asro.kuleuven.ac.be/asro/English/HOME/SBs/3dcourse/gallery/gallery.p html?var=greeble

Unfortunately, this page has been deleted on the new version of my page...

Those interested in the (simple) greeble results:

 

fun1

fun2

fun3

fun4

 

Just play with the plugin!

Link to comment
Share on other sites

Ernest Burden III:

the edge detection approaches are very interesting, but i will quickly face following limitations when trying to script such a thing:

1. speed limitations with mxs...

2. skill limitations with myself (sometimes i wish that i studied maths/informatic instead of architecture ;) )

 

maybe i have to give the max sdk another look...c++ shouldn't be that hard, but understanding the sdk is ;)

 

i found following interesting tutorial:

 

http://www.schloerb.com/tutorial/greeblecity_1.htm

 

it would be very easy to pack this into a script, this doesn't exactly look realistic, since its quite impossible to make roofs with greeble (only church-style pyramid roofs), but its a start.

Link to comment
Share on other sites

Originally posted by nisus:

Hi Ernest,

Using displacement mapping and the new (free!) symbiont shaders - boxnoise etc - could make your life easier on this...

As I mentioned, I do not at this time have any 3D software that has displacement mapping, so perhaps you would do me a favor and use this map to displace a surface and show the result. The map is not meant to be a perfect city environment, its just a set of shades for heights with a few roads, a quick Photoshop experiment.

 

citygen1.jpg

 

Ernest Burden III

Link to comment
Share on other sites

hi all,

 

Nice test on Ernests bitmap, I suggest someone use the boxnoise in the simbiont-shaders too...

(Srry Jeff... hum hum...!)

 

In the main time I've read the article too: it's great. It reminds me of a book I bought some time ago: Fractal City. Gonna look it up tonight if it got something of use...

It's nice that it refers to space syntax too, as I've joined the first space syntax symposium in London (still being an undergraduate at that time)

But hell, I don't know any program that can make cities like this yet... It would be extremely useful to have such a plugin... (Maybe Don van add this to worldbuilder? *hint* *hint*)

 

To quizzy... about that box plugin... I'm going to look at it again, because it doesn't work anymore (damn damn, too long ago since I scripted...)

As soon as I got it running, I'll post it (I'm my own boss, so I don't have to ask...) because if this can help the community out I'll be glad to help anyone ;)

 

rgds

 

nisus (

Link to comment
Share on other sites

Originally posted by Marc Lorenz:

here is my go...

Oh, MAN, that is fantastic! See, that's what I was talking about. Obviously, a better, higher resolution map would yield better results, but the concept works just fine.

 

So displacement mapping is the ticket for poor-mans city backgrounds.

 

Can map-displaced planes be converted to polygon geometry for further editing?

 

Ernest Burden III

Link to comment
Share on other sites

So displacement mapping is the ticket for poor-mans city backgrounds.
well, not exactly.

because the poor man can't affort the massive hardware that is needed to render this in reasonable time ;)

 

Can map-displaced planes be converted to polygon geometry for further editing?
not with the way i did it. i used renderer-displacement, which is pixel level rather than real faces. (saves a lot of memory, but not render speed)

when doing the same with poly-displacement it easily hits 2 million faces and 1GB memory.

with face trashing (optimize/multires modifier) the faces can be reduced, but at cost of edges quality.

displacement is a very 'unintelligent' brute-force process. thats why i'm not very enthusiastic about it.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...