Results 1 to 10 of 26

Thread: Create a random town

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Community Leader Facebook Connected Ascension's Avatar
    Join Date
    Jun 2008
    Location
    St. Charles, Missouri, United States
    Posts
    8,392

    Post

    Thanks, Sig, but I owe a large amount of credit to Redrobes for getting my brain working with his city patterns (thanks Red).
    If the radiance of a thousand suns was to burst at once into the sky, that would be like the splendor of the Mighty One...I am become Death, the Shatterer of worlds.
    -J. Robert Oppenheimer (father of the atom bomb) alluding to The Bhagavad Gita (Chapter 11, Verse 32)


    My Maps ~ My Brushes ~ My Tutorials ~ My Challenge Maps

  2. #2
    Administrator Redrobes's Avatar
    Join Date
    Dec 2007
    Location
    England
    Posts
    7,201
    Blog Entries
    8

    Post

    Cool job Ascension - I will have a similar hack at it in a while. Cities are a lot of work right now and I for one welcome some ways to automate some parts of it. We did scripts for tiles a while back and they work well. Robs dungeon script is certainly well developed now and I reckon that chugs out dungeons to a standard thats quite hard to match by hand. Terrain has almost always been scripted usually off of some random starting point too so if we can get cities into that same league then were really cookin.

    I have always wanted a big app which makes great random terrain then fills it with virtual people which build houses get jobs, marry have kids which go on to get other jobs and so on building up the virtual world with a full list of buildings and people who live in them. A sort of genetic algo RPG world builder. Thats a bit of a way off at this point tho The bits of scripts and tools are like that metallic bits of The Terminator when hes all molten, coming together bit by bit. Maybe one day we will say "ah we can chug out terrain no problem and we can chug out cities no problem and dungeons too, we have character stat builder and all the monster stats and the scripts which run the rules to know who would likely win in battles so lets glue all of those parts together". Pipe dream I reckon but no harm in traveling on that road for a while huh ?

  3. #3
    Community Leader Facebook Connected Ascension's Avatar
    Join Date
    Jun 2008
    Location
    St. Charles, Missouri, United States
    Posts
    8,392

    Post

    That's exactly where I'd like to go, creating an entire fantasy world from the ground up just by pushing a few buttons, then combine it with Sigurd's find of that awesome German terrain renderer, then get something like the Sims to populate the place and I could have my own world/ant farm and with some powerful 3d apps I could walk among the people. Might need to get some of Pixar's computers or ILM's for that tho
    If the radiance of a thousand suns was to burst at once into the sky, that would be like the splendor of the Mighty One...I am become Death, the Shatterer of worlds.
    -J. Robert Oppenheimer (father of the atom bomb) alluding to The Bhagavad Gita (Chapter 11, Verse 32)


    My Maps ~ My Brushes ~ My Tutorials ~ My Challenge Maps

  4. #4

    Post GIMP Script...mostly

    I wrote up a quick GIMP script that does MOST of this automatically.

    Things I'd like to improve:
    • Beveling the rooftops. Right now, this just sets the rooftops to a set color.
    • Running the threshold to make the buildings interactively instead of setting values for them in the front end. If you guys know a way to do this, please let me know. This filter doesn't have the interactive/non-interactive flag.
    • Any other suggestions you guys might have. :-)


    The roads are generated using a Mosaic plug-in, and the somewhat roughened up by a displace map of random noise.

    Great tutorial!
    Attached Files Attached Files
    Last edited by sambrookjm; 02-02-2009 at 06:02 PM. Reason: Attachment
    I think I've had this Deja Vu before...

  5. #5

    Post

    Quote Originally Posted by sambrookjm View Post
    I wrote up a quick GIMP script that does MOST of this automatically.

    Things I'd like to improve:
    • Beveling the rooftops. Right now, this just sets the rooftops to a set color.
    • Running the threshold to make the buildings interactively instead of setting values for them in the front end. If you guys know a way to do this, please let me know. This filter doesn't have the interactive/non-interactive flag.
    • Any other suggestions you guys might have. :-)


    The roads are generated using a Mosaic plug-in, and the somewhat roughened up by a displace map of random noise.

    Great tutorial!

    Attached is a mod of your script. (funny to see how other code )

    This adds a bevel roof layer (overlay mode)

    I also changed the simple motion blur into a motion-blur/threshold alpha/gausian blur which (imoo) gives a better result. Also set the opacity down on this layer.

    Funny that the threshold doesn't have an interactive mode... should post this on the gimp devel list as it could be an oversight.

    I changed the road spacing and width to be /4 so the slider is in pixels.

    I also changed where it registers. I moved it to File>Create, which is were (afaik) they gimp devels are suggesting image creation scripts should register.

    -Rob A>
    Attached Files Attached Files

  6. #6

    Post Thanks

    Quote Originally Posted by RobA View Post
    Attached is a mod of your script. (funny to see how other code )
    Hopefully, it wasn't too difficult for you to follow! I'm still a relative neophyte when it comes to scripting this sort of stuff...

    Quote Originally Posted by RobA View Post
    This adds a bevel roof layer (overlay mode)

    I also changed the simple motion blur into a motion-blur/threshold alpha/gausian blur which (imoo) gives a better result. Also set the opacity down on this layer.
    Yeah, that does give a better result. Very nice technique.

    Quote Originally Posted by RobA View Post
    Funny that the threshold doesn't have an interactive mode... should post this on the gimp devel list as it could be an oversight.
    I was really surprised by that as well...but this is the first time I've used the threshold filter in a place where it would be useful to run it interactively.

    Quote Originally Posted by RobA View Post
    I changed the road spacing and width to be /4 so the slider is in pixels.
    *smack* Good catch. Those values were left over from when all of the layers were originally the full mage size. Then I realized that making them one-quarter size would make the script run much quicker and changed the script to do that...but forgot to change them back. I was just happy to get the darn thing working!

    Quote Originally Posted by RobA View Post
    I also changed where it registers. I moved it to File>Create, which is were (afaik) they gimp devels are suggesting image creation scripts should register.
    I'll remember that. Thanks for the tips and improvements!
    I think I've had this Deja Vu before...

  7. #7

    Info Two more script mods

    I made a couple of changes to your modded script after running it through a few more times.

    I used your threshold-alpha filter on the building level to remove all of the buldings that were underneath the roads. With the feathered selection you used for the roads, there ended up being too many shadows. Running the threshold-alpha filter with a value of 200 on the town layer got rid of the buildings under the roads, which eliminated any extra shadows. The method you used to generate the shadows is still in place, though.

    I also changed the script so that the random maps no longer have to be square. The maps can be anywhere from 300 to 3000 pixels in either dimension.

    Your additions were noted in the comments in the script. Credit is given where credit is due!!

    I attached a zip containing the new script, as well as a picture of what my run looked like with the default values. This was a great tutorial to code up, and now I know how to bevel stuff!
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	Default.jpg 
Views:	113 
Size:	261.2 KB 
ID:	9968  
    Attached Files Attached Files
    I think I've had this Deja Vu before...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •