Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

1370461 Posts in 64470 Topics- by 56532 Members - Latest Member: Aevv01

December 15, 2019, 09:23:40 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)Procedural generation of towns and cities
Pages: [1]
Print
Author Topic: Procedural generation of towns and cities  (Read 16094 times)
Alex May
...is probably drunk right now.
Level 10
*


hen hao wan


View Profile WWW
« on: June 07, 2008, 04:57:03 AM »

This is a repost of something I wrote on another (private) forum and I haven't had time to go through and tidy it up but here it is anyway.

I'm going to be generating the town for Deadrock procedurally, so I thought I'd look into how others are doing it and post up the links and stuff here. In summary, the King Of All Cosmos for city generation would be CityEngine, and the rest are OK.

First off, this fellow has written a fairly awesome paper researching various types of system in use by others.
http://www.gamesitb.com/proceduralcity.html
buildings http://www.gamesitb.com/automaticbuildings.html
paper http://www.gamesitb.com/SurveyProcedural.pdf
site http://www.citygen.net
video http://video.google.com/videoplay?docid=8338801375473466577

Introversion are generating cities for Subversion procedurally.
http://forums.introversion.co.uk/introversion/viewtopic.php?t=586
http://forums.introversion.co.uk/introversion/viewtopic.php?t=733 - good bullets here

some guys using combination of voronoi and hand-drawing
http://pubs.cs.uct.ac.za/archive/00000333/01/research_paper.pdf

the agent-based sim from the research paper
http://ccl.northwestern.edu/cities/papers/midgraph.cities.pdf

generating floor plans - this is good for me as i need to model insides of buildings as well
http://wwwx.cs.unc.edu/~eve/papers/EVEAuthored/2006-I3D-Martin.pdf

some presentation, seems less advanced than most of the other stuff here
http://www.cs.ru.ac.za/research/g03m1642/Presentation/Final%20Presentation.ppt

Real-time procedural generation of pseudo-infinite cities (also from the paper)
http://www.infinitylab.com.au/research/graphite2003.pdf

CityEngine, also described in the above paper. Very impressive
http://www.vision.ee.ethz.ch/~pmueller/wiki/CityEngine/Front
paper: http://www.vision.ee.ethz.ch/~pmueller/documents/procedural_modeling_of_cities__siggraph2001.pdf
Also seems to be the work on which Subversion's city stuff is based

The 'Decensor' engine builds cities:
http://www.binaryworlds.com/products.html

Gamr7 have a city generator:
http://digitalurban.blogspot.com/2007/11/automatic-city-builder-gamr7.html

Here's an open-source procedural city generator
http://pcity.sourceforge.net/



Meanwhile, I also looked at real-life cities.

Here's a map of Reno, Nevada with family income turned on. Lots of activities on that site to play with.

Radical Cartography can show you some very pleasant-looking maps of income

Here are population density maps for the state of Washington: http://www.ecy.wa.gov/services/GIS/maps/county/popden/popden-co.htm

Population density in the US West.

Population density in Michigan.

Population density in Oregon in 1996.
Logged

george
Level 7
**



View Profile
« Reply #1 on: June 07, 2008, 09:19:25 AM »

I'm going to use my REPLY WITH NOTHING TO ADD card here to say this thread is A+++.
Logged
Alex May
...is probably drunk right now.
Level 10
*


hen hao wan


View Profile WWW
« Reply #2 on: June 03, 2009, 12:01:34 AM »

bump for a couple of things that have come up

http://butdoesitfloat.com/30686 (thanks corpus)
http://flowingdata.com/2009/05/14/pixel-city-computer-generated-city/

also CitiesXL is looking sweeter

http://www.citiesxl.com/

very cool

ok cool thanks
Logged

bateleur
Level 10
*****



View Profile
« Reply #3 on: June 03, 2009, 12:54:26 AM »

Maybe this thread should be linked from somewhere more findable? (Does it count as a tutorial?)
Logged

Alex May
...is probably drunk right now.
Level 10
*


hen hao wan


View Profile WWW
« Reply #4 on: June 03, 2009, 01:07:22 AM »

Nah it's just a bunch of links Smiley
Logged

ChevyRay
Guest
« Reply #5 on: June 03, 2009, 01:15:35 AM »

Aw man Shocked so much to read. Thanks Alex! I'll have to slowly start working my way through this, one-by-one.
Logged
Alex May
...is probably drunk right now.
Level 10
*


hen hao wan


View Profile WWW
« Reply #6 on: June 03, 2009, 01:21:26 AM »

Man, to think this thread nearly a year old and I still haven't made a town generator.
Logged

ChevyRay
Guest
« Reply #7 on: June 03, 2009, 01:27:08 AM »

Whoa I didn't even realize it was old. I'd never seen this.
Logged
Sam
Level 3
***



View Profile WWW
« Reply #8 on: June 03, 2009, 05:12:05 AM »

Wow, what a lovely collection of links!  I was searching around for just this kind of stuff, but wasn't able to find much of anything.

I made a very simple building/floorplan generator yesterday for a top-down shooter.  I still need to make a few tweaks to allow it to make more interestingly shaped buildings, and have it place the buildings in sensible relations to one-another.  The game will focus on combat, and just needs a few small buildings sparsely placed to give some interesting cover to move around so my simple solution should be sufficient.

I'll give a quick run-down of my method, as I enjoy doing that sort of thing.

Each building is based on an internal grid of "nodes", with the only possible positions of walls being along the lines that connect those nodes.  This prevents the creation of passages that are too thin to move down, and generally keeps things easier.

My engine is tile-based so my construction of buildings is done through "painting" tiles to be certain materials.  The engine will then render that map of materials as a pretty background image that the player sees, and use the materials map itself for pathfinding and stuff.  I've not made that renderer yet, so the screenshot below is just showing the materials grid (and a player sprite ripped from Counterstrike - classy!)

I start by drawing a rectangle, with "wall" material as the border and "interior" material as the fill.

I then stick a random number of doors (at least 1, and more likely to be higher for larger buildings) on those outside walls.  Doors always lie between two nodes on the grid, so there's never a chance of an interior wall poking into a door.  They're created by simply painting "interior" material over the walls, but leaving one tile on each side as a door frame (this makes the doors look nice if there ends up being a wall right next to it.)

To make the interior walls, I randomly pick a grid node inside the building which is currently painted as "interior".  I then move randomly around between the nodes, leaving a line of "wall" in my wake, only stopping when I reach a node that's already painted as "wall".  This process makes it impossible to end up with an interior wall that blocks off a doorway, but also prevents the creation of interior walls that are disconnected from other walls.  It is possible for a single wall to loop around and touch itself and so make an inexcessible area of the building, but it should never be able to block door access.

The density of internal walls can be altered by varying how many times the above process of wandering around drawing walls is repeated.  Repeating it more will result in a maze-like building, with less repeats giving large open areas.

It's a simple method but I have simple needs, and it works!  I'm sure it has a fancy name in maze-making circles, but I thought it up yesterday and thought it was pretty neat.

Small buildings:


Large buildings:

(sorry for the hideous colours)
« Last Edit: June 03, 2009, 05:15:28 AM by Salt » Logged
JoeHonkie
Level 8
***


RIP Major Sebastian Bludd


View Profile WWW
« Reply #9 on: June 04, 2009, 06:16:38 AM »

Information overload!
Logged
Alex May
...is probably drunk right now.
Level 10
*


hen hao wan


View Profile WWW
« Reply #10 on: January 26, 2010, 01:42:18 AM »

Bump for cool inspirational vid

Logged

jotapeh
Level 10
*****


View Profile
« Reply #11 on: January 26, 2010, 07:30:22 AM »

Bump for cool inspirational vid



Um.. Wow. I think? That was crazy and kind of cool.
Logged
Cthulhu32
Level 6
*


Brawp


View Profile WWW
« Reply #12 on: January 26, 2010, 10:11:43 AM »

So something interesting you might consider is cities that are much older being built up around previous building. In Denver, for example, we have a lot of historic buildings that cannot be destroyed because they are considered "historical monuments" even though some of them are furniture stores and what not, and others are apartment complexes. So something I have not seen before in a dynamic city engine is the idea that cities mandate certain districts/buildings to be "non-destroyable" which gives certain cities that whole character type of thing.

This is inspiring me to make a city builder of some kind. Thanks for necromancing this Alex :D
Logged

Aoiichi
Level 0
*


View Profile
« Reply #13 on: January 26, 2010, 12:22:01 PM »

I think I've found what looks like a pretty interesting and cool video on the subject.





Procedurally-generated cities, building interiors and destructability, running on the crytek engine, from what I've heard.
Logged
nikki
Level 10
*****


View Profile
« Reply #14 on: January 26, 2010, 05:58:01 PM »

I had found this link http://ccl.northwestern.edu/cities/papers/midgraph.cities.pdf too a while ago, it's up there but i honestly think its the very best of them ...

Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic