sidebar features
sidebar content

Go Back   Blender Artists Forums > General Forums > Python & Plugins

Reply
 
Thread Tools
piiichan's Avatar
piiichan piiichan is offline
Member
 
Join Date: Aug 2008
Location: New Caledonia
Posts: 35
Create 3D cities in a single click with Suicidator City Generator, a free Python script for Blender.
Website: Suicidator City Generator by Piiichan
After a request from Pascal Mueller, author of the commercial software CityEngine, explaining that this name is a trademark in Europe and in the US, Suicidator City Engine has been renamed to Suicidator City Generator.

Also don't miss Blended Cities (formerly Open City Engine), a similar project by Littleneo, and many other contributors.
Website: Blended Cities by Littleneo

--------------------------------------------------------------------------------------------------------------------
------------------------------------------------ Original post ------------------------------------------------
--------------------------------------------------------------------------------------------------------------------
I am working on a script that generates cities procedurally for my next personal movie called "Suicidator", the story of a loser hero.

I plan to make the script available for those of you who might find it useful. It is still a work in progress, but the results are promising

I'd like to collect a few comments, feedbacks or requests from you guys before I release a beta version of the script (soon)

Here is a screenshot



You can also find two demo videos here and here.

Thank you

Last edited by piiichan; 18-Dec-09 at 09:17.
#1   Old 09-Nov-08, 09:26   
Reply With Quote


Sol Blue's Avatar
Sol Blue Sol Blue is offline
Member
 
Join Date: Aug 2007
Location: USA
Posts: 89
This looks interesting. Are the buildings pre-made objects, or are they procedurally generated as well?
#2   Old 17-Nov-08, 02:56   
Reply With Quote
Ace Dragon Ace Dragon is offline
Banned Member
 
Join Date: Feb 2006
Location: Wichita Kansas
Posts: 12,952
This may be something quite good to include with Blender 2.5. It already looks heaps better than the ancient city block generator which didn't do much more then make rectangle buildings in a grid.
#3   Old 17-Nov-08, 03:10   
Reply With Quote
UglyMike's Avatar
UglyMike UglyMike is offline
Member
 
Join Date: Mar 2002
Location: Brussels
Posts: 516
Haven't been able to look at the results yet (no access to youtube), but another _noob also was looking into this and pointed to a MEL script that does citybuilding rather well. Here the link to another_nnob's tread:
http://blenderartists.org/forum/showthread.php?t=141033

I for one would love something like this (I love all those scripts that add a lot of complexity 'automagically' like BigNumberToolkit, Discombulator, L-Systems etc)
............................................
I don\'t need no steenkin\' sig
#4   Old 17-Nov-08, 07:42   
Reply With Quote
piiichan's Avatar
piiichan piiichan is offline
Member
 
Join Date: Aug 2008
Location: New Caledonia
Posts: 35
I have been working (slowly) on the building generator.

Here is a screenshot with examples of buildings:
built instantly; 15,555 faces; 25 buildings


Buildings are nothing more than cubes stacked in different manners.

The main parameters are number of floors, base size (x,y), and number of iterations (repeat the process on the roof).

The city is then made by placing buildings of different heights according to a texture (population map), where white represents high buildings, and black represents short buildings or nothing at all.
#5   Old 18-Nov-08, 04:15   
Reply With Quote
Meta-Androcto's Avatar
Meta-Androcto Meta-Androcto is offline
Member
 
Join Date: Aug 2006
Location: australia
Posts: 2,356
hi piiichan,
that is stunning work.
I have left some links to useful information/scripts here:
http://blenderartists.org/forum/showthread.php?t=141116
Keep up the great work, we would love to see this script soon,
even a beta release.
Thanks again.
Brendon.
http://wiki.blender.org/index.php/Scripts/Catalog
#6   Old 18-Nov-08, 04:36   
Reply With Quote
afecelis's Avatar
afecelis afecelis is offline
Member
 
Join Date: Oct 2004
Location: Colombia
Posts: 552
Fantastic work Piichan!
I had also seen the Mel script for Maya and was feeling darn envious! Your script does indeed look promising

keep it up and keep us posted!

regards,
Alvaro
............................................

#7   Old 18-Nov-08, 04:42   
Reply With Quote
Sol Blue's Avatar
Sol Blue Sol Blue is offline
Member
 
Join Date: Aug 2007
Location: USA
Posts: 89
Ooooooh...that last render is making me drool...

Not only does it look like a useful script, but the architectural style is a work of art in and of itself.

I can't wait to get my hands on the script and play around with it!
#8   Old 18-Nov-08, 06:19   
Reply With Quote
Karjanainen Karjanainen is offline
Member
 
Join Date: Jun 2007
Location: Finland, Oulu
Posts: 53
Awesome render the last one! I'd say the buildings need some kind of rooftop walls to prevent people from falling down, what I mean is this:



You see, the roofs aren't just cubes, they have about knee high walls to prevent people from falling.

Other than that, I love the design of the buildings :3 A true work of art!
#9   Old 18-Nov-08, 14:34   
Reply With Quote
another_noob's Avatar
another_noob another_noob is offline
Member
 
Join Date: Jan 2008
Posts: 437
Great work. I was just reading over some stuff on "shape grammar", fractals and linear algebra to try to do something similar. Really a lot of detail. Looks great.
#10   Old 18-Nov-08, 15:55   
Reply With Quote
Ace Dragon Ace Dragon is offline
Banned Member
 
Join Date: Feb 2006
Location: Wichita Kansas
Posts: 12,952
Will it have option auto-material-assigning as well.

So some walls get assigned material 1, roof - material 2, windows - material 3, decorative stuff - material 4, ect...

I said optional in case we wanted a single material for the whole building like if it's ice covered or something.
#11   Old 18-Nov-08, 18:25   
Reply With Quote
SHABA1 SHABA1 is offline
Member
 
Join Date: Mar 2002
Location: California
Posts: 1,437
Discombobulator does the same kind of thing. But it does not generate building details like you have shown in the screen shots here.

Now one question that I have always had about city generators. After you get the building meshes generated procedurally do you then have to go in and uv texture each individual building? That would seem really tedious if you had to do all of that individually.

Oh btw how about a link to the actual script
............................................
At some point in life you stop being the man you are and start being the man you always wanted to be. ------ Bruce Springsteen.

Last edited by SHABA1; 18-Nov-08 at 18:50.
#12   Old 18-Nov-08, 18:44   
Reply With Quote
another_noob's Avatar
another_noob another_noob is offline
Member
 
Join Date: Jan 2008
Posts: 437
Quote:
After you get the building meshes generated procedurally do you then have to go in and uv texture each individual building? That would seem really tedious if you had to do all of that individually.
Some could be done with the texture module, but you would have to do a lot of setup first. You would need to differentiate between say roof surfaces, walls, streets, etc. It is possible, but it would be a lot of work.
#13   Old 18-Nov-08, 18:52   
Reply With Quote
SnifiX SnifiX is offline
Member
 
Join Date: Mar 2008
Posts: 373
piichan, your work looks great, and it would be nice if you could tell more about the algorithms behind the script, and something about the main criterias when you started to design the city.

Do I have right when I see some fractal maps behind the first picture?
#14   Old 20-Nov-08, 10:18   
Reply With Quote
pildanovak's Avatar
pildanovak pildanovak is offline
Member
 
Join Date: May 2004
Posts: 958
well what I'd really love to see is support for streets and blocks which are not 90 degrees to each other. This would also mean houses which have not all sides 90 degrees to each other... Other beautiful thing would be import of real city plans (in vectors) and support for those. other thing - organic shapes in the l-system, so some towers would be simply special and sci-fi like...
otherwise, your results are already impressive and very nice.
............................................
http://www.blenderstorm.org/qapoll/i...a/211/image/2/
#15   Old 20-Nov-08, 13:14   
Reply With Quote
tampaBlendie tampaBlendie is offline
Member
 
Join Date: Jan 2008
Posts: 78
This looks freakin Awesome man! When do we get to see the code???
#16   Old 21-Nov-08, 00:31   
Reply With Quote
Atom's Avatar
Atom Atom is offline
Member
 
Join Date: Jan 2006
Location: Ohio
Posts: 4,263
Yeah, I like the render that looks like a painting, how do you do that?
............................................
Intel DUO T9300 @ 2.5Ghz, Windows XP 64, 3Gb RAM, nVidia 9500M GS

Blender 2.49.2, Python 2.64

2.49b Python Scripts:
Blendgraph Meshfoot

2.49b Scenes:
After Effects Stroke
Sea Tubes

Page Rip or Tear
Opening A Book
Single Page Turn
Glow
Emulating 3DSMax Super Spray



#17   Old 21-Nov-08, 13:52   
Reply With Quote
piiichan's Avatar
piiichan piiichan is offline
Member
 
Join Date: Aug 2008
Location: New Caledonia
Posts: 35
The script is now released here.

The city is built based on a population map, which is a texture representing how populated (or rich) each area of the city is. On white pixels will stand higher buildings, and on black pixels, lower buildings. Below a gray level of 30%, no buildings will be created.
You can use any picture you like for the population map:
  • draw it yourself: you can control where high buildings will be
  • or use a procedural one: random placement of high and short buildings
Therefore you can greatly change the aspect of a city by modifying the parameters of the script, and also by changing the texture used for the population map.

The algorithm is simple: it iterates over the population map. For each pixel, it decides how many buildings are to be built for that pixel, their size and height, and their position. L-Systems are not used.
I designed the cities and buildings simply by observing pictures of real cities and buildings, and also by observing the results of another city engine by Mueller which I admire.

For now, buildings are simple cubes. Having detailed buildings such as those in the screenshot is possible, but not through the GUI yet. I am working on it for version 0.3.

The parameters are the following, from the bottom:


Pop map size
This is the size of the population map, and it directly affects the area covered by the city. It is the main way to increase visual complexity: simply generate a larger city.



Randomize pop map
Disable it if you use a custom population map.
If you are using a procedural texture, such as "stucci", you may want to keep the same type (eg stucci VS clouds) but change the layout. This is what this button is doing, by randomizing the texture offset.

Building height
If you want higher buildings, this is where you set it

Height difference
With this parameter, you can set whether short and tall buildings will have a great difference in height or not. This parameter may not always produce what you expect because it makes short buildings very short, and tall buildings very tall. So it may shorten most or all buildings to the minimum size if they do not reach a certain height before this parameter is applied.
You can increase the value of the "building height" parameter (above) to reduce this negative effect.




Buildings per pixel
For each pixel of the population map, there may be more than one single building. The shorter a building, the more subdivisions. Here you control the probability of a building to be subdivided into many smaller ones.



Building loc variation
When a building is positioned, its horizontal locationn is varied randomly inside the area of its respective population map pixel, to make the city look less "grid-like". However, if you want the buildings to be more aligned, then decrease the value of this parameter. 0 means all buildings are aligned exactly on the population map.




Min/max hori size factor
You can control how thick or thin buildings are with this parameter. The minimum horizontal size factor is in Blender units. The maximum horizontal size factor is how many times a building can be larger than the minimum size.




Concerning all your comments
  • I plan to have non-square buildings
  • I plan to have networks of streets
  • I plan to separate buildings faces into different materials (wall, roof)
  • I plan to include illuminations for night scenes
But these are only ideas. They may or may not be implemented in the future.

May you encounter any bug, please report them on this thread. Version 0.3 with more parameters and complete buildings should come soon. And most importantly, thank you all for your encouragements!

A demo video here

Last edited by piiichan; 22-Nov-08 at 13:30. Reason: Forgot to specify the link to the demo video
#18   Old 21-Nov-08, 15:48   
Reply With Quote
Ace Dragon Ace Dragon is offline
Banned Member
 
Join Date: Feb 2006
Location: Wichita Kansas
Posts: 12,952
Quote:
Originally Posted by Atom View Post
Yeah, I like the render that looks like a painting, how do you do that?
I think that's a painting and not a render, that image was in a post asking for a small feature.
#19   Old 21-Nov-08, 23:33   
Reply With Quote
IAmThisGuy IAmThisGuy is offline
Member
 
Join Date: Feb 2008
Location: Saskatchewan
Posts: 650
So could you use this to make low-poly buildings for games then? Or does it have to have that level of detail?
............................................
Saskatchewan. Easy to draw, hard to spell.
I live in a rectangle.
#20   Old 22-Nov-08, 00:04   
Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 18:41.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Logo and website design copyright © 2006 by froodee design bureau. All rights reserved.
Other Blender Sites
new icon Blender Homepage »
The official Blender homepage
new icon BlenderNation »
Fresh Blender News, Every Day
new icon Blenderart Magazine »
Blender articles, tutorials and images.
Blender Headlines
Featured Artwork
Short animation: Barrel by Phlopper
Woolly mammoth by sebastian_k
Photorealistic classic furniture by eMirage
Social BlenderArtists