City Generation

Discussions about SOFTIMAGEs© Interactive Creative Environment©
Chris_TC
Posts: 411
Joined: 22 Mar 2010, 17:43

City Generation

Post by Chris_TC » 06 Jun 2011, 00:41

Can you generate a city with ICE? I don't know, but I figured I might give it a try.
Getting a very rough cityscape going wasn't as hard as I thought it would be. Fixing some artifacts and adding more functionality (e.g. texture maps to control the Manhattan-ness of the streets or the average height of buildings in districts) shouldn't be too hard.

As far as getting some actual building architecture in there, I don't know. After reading through some papers, it appears that the way to do it is via a "split grammar". Not sure whether this can be implemented in ICE. I guess I'll try. ICE is so much fun.

Image

User avatar
claudevervoort
Posts: 89
Joined: 16 Oct 2009, 02:56
Location: Montréal, QC, Canada
Contact:

Re: City Generation

Post by claudevervoort » 06 Jun 2011, 02:27

Hi Chris,

That's a great idea. I've myself also always been intrigued by city generation. However I wonder if that is not too much for ICE? To which point should something leaves the shore of ICE and go into regular code? I am not quite sure myself. In that case, should a new ICE node (plugin) be created that would execute the city-fication that you could use into a regular ICE Modelling tree rather than trying to do it all in ICE?

Anyway, post anything here if you make any leeway in that area,

Claude

Chris_TC
Posts: 411
Joined: 22 Mar 2010, 17:43

Re: City Generation

Post by Chris_TC » 06 Jun 2011, 11:21

I don't know how to write code. But everything I've done so far was perfect for ICE. The tree isn't that complicated, the creation process works module by module and is very visual, and the whole thing evaluates pretty quickly. Regular code would be at a disadvantage in my opinion.

The building generation could be more of an issue. It'll have to rely on a grammar, which is similar to an L system. It should be possible though. You'd create an array that you rewrite based on a rule set. Then you read out the array index by index and use a case node to decide how that entry should be translated into geometry.

User avatar
Rork
Posts: 1359
Joined: 09 Jul 2009, 08:59
Location: Close to The Hague, Netherlands
Contact:

Re: City Generation

Post by Rork » 06 Jun 2011, 11:47

reminds me of this:

http://www.paoloemilioselva.it/citygenerator.html

But with the ever expanding features of ICE, even more fun stuff is emerging. Good luck on developing this more :-bd


rob
SI UI tutorials: Toolbar http://goo.gl/iYOL0l | Custom Layout http://goo.gl/6iP5xQ | RenderManager View http://goo.gl/b4ZkjQ
So long, and thanks for all the Fish!!

RoN43
Posts: 18
Joined: 09 Nov 2009, 18:32

Re: City Generation

Post by RoN43 » 06 Jun 2011, 11:56

Nice. See cool opportunities of GhostTown for 3ds max videos on youtube!

User avatar
mattmos
Posts: 445
Joined: 02 Dec 2009, 16:59

Re: City Generation

Post by mattmos » 06 Jun 2011, 17:01

Looking great so far!

Chris_TC
Posts: 411
Joined: 22 Mar 2010, 17:43

Re: City Generation

Post by Chris_TC » 06 Jun 2011, 17:40

I don't want to bore you, but every time I make a successful baby step I'm happy. So I've successfully made a simple L system. The next step is to allow parameters and make the L system draw a polygon. And then finally it shall be used to make building shapes based on certain rules. This may be over my head, but I'll try anyway, haha.

Image
Image

Chris_TC
Posts: 411
Joined: 22 Mar 2010, 17:43

Re: City Generation

Post by Chris_TC » 06 Jun 2011, 19:18

My L system can now make polygons. This has been much more straightforward so far than I thought.

Image

User avatar
Daniel Brassard
Posts: 878
Joined: 18 Mar 2010, 23:38
Location: St. Thomas, Ontario
Contact:

Re: City Generation

Post by Daniel Brassard » 06 Jun 2011, 22:47

I like where this thread is going and the WIP posting for other to see the evolution of a tool is a bonus,

Good work Chris! :-bd
$ifndef "Softimage"
set "Softimage" "true"
$endif

User avatar
claudevervoort
Posts: 89
Joined: 16 Oct 2009, 02:56
Location: Montréal, QC, Canada
Contact:

Re: City Generation

Post by claudevervoort » 07 Jun 2011, 04:45

That's really cool. Looks like it can all be done in ICE indeed :)

Claude

Chris_TC
Posts: 411
Joined: 22 Mar 2010, 17:43

Re: City Generation

Post by Chris_TC » 07 Jun 2011, 21:28

I know it doesn't look like much, but it's been a lot of work. While one could obviously generate three flat polygons much more easily, what's happening in the background here should lay the foundation for grander things to come.

So far I have only implemented a single rule. This rule generates a ground floor, a section for intermediate floors and a top floor. Rules can tell the system to add geometry, make extrusions, translate or rotate geometry, instantiate geometry etc. They must be hand-wired, so the more rules you add the more complexity you can get.
By randomizing all parameters and adding probabilities for the rules, you can generate all sorts of procedural buildings. At least that's the theory.

In the image you see the first generation of rewriting. Every building starts off with a 0. This particular rule turns the 0 into 1,2,3 and specifies a few parameters (mainly the height of these floors). A next rule could split the ground floor into a bunch of window segments and a door. Another rule might split the intermediate floor section into <<a cornice, an intermediate floor section and another cornice>>. Or not. It's all about rewriting. You take a shape and replace it by other shapes until you end up with shapes (terminals) that don't have rewriting rules. When that happens, everything gets translated into geometry.
Image

danyargici
Posts: 56
Joined: 09 Nov 2009, 10:58

Re: City Generation

Post by danyargici » 09 Jun 2011, 15:12

I love where you're going with this! Keep it up! \m/

Chris_TC
Posts: 411
Joined: 22 Mar 2010, 17:43

Re: City Generation

Post by Chris_TC » 09 Jun 2011, 22:18

I'm slowly getting the hang of this. With five rules I'm starting to get a rough building shape going.
It has controls for floor heights, number of floors, number of windows, window size, door size and door placement. If I were to hook these parameters up to a bunch of randomizers, there could already be a bit of variation. Again, these are only 5 rules. Now imagine 50 rules.

Image
Image

User avatar
CiaranM
Posts: 87
Joined: 09 Jun 2009, 01:37
Location: London
Contact:

Re: City Generation

Post by CiaranM » 10 Jun 2011, 00:25

Looking good!

User avatar
Memag
Posts: 339
Joined: 09 Aug 2010, 01:37
Location: Tits

Re: City Generation

Post by Memag » 10 Jun 2011, 01:22

Great walk-through and work Chris!

Chris_TC
Posts: 411
Joined: 22 Mar 2010, 17:43

Re: City Generation

Post by Chris_TC » 10 Jun 2011, 20:05

No new rules today, but some important additions nonetheless.
The top of the building looks ridiculous because cornices are supposed to be applied to cornice sections, not the entire top floor, but whatever :D

My building now automatically creates facades for all edges of the footprint polygon (which can have a random shape and any number of edges) and makes sure that the facades join properly even when they are extruded (see image) with no gaps anywhere.

Also, I now have the ability to generate pre-modeled geometry with the ICE tree (thanks again to origin for the handy script). This way I can pre-define a certain number of elements, such as doors or balconies, which the system automatically creates. No need to link the tree to external geometry. The elements themselves of course are automatically scaled and rotated to fill the space they're intended for. In the example image, the cornice fills the entire top floor.
Image

Post Reply

Who is online

Users browsing this forum: No registered users and 41 guests