looks good.
Any way you can hollow out the center shapes automatically?
ie. create courtyards
Inspired by the mosaic city building stuff (torstan's tute here, e.g.), I made a script to do the same, but working with something that resembles Voronoi patterns. My understanding of the concept may be lacking, but I've found that radial gradients placed against eachother using lighten only will make for some nice straightish lines when you edge detect it.
To use, make a b/w map of your streets (streets black, house areas white), then make a selection of the areas you want to populate with houses and activate the plugin (under Filters|Map tools|Generate city)
I've attached an example where I've made a couple of different areas with different sized buildings and colors.
Comments and ideas are welcome. I've considered making a setting for increasing the distance between houses.
Edit: I added the setting for distance between houses.
Last edited by Alfar; 08-07-2009 at 08:58 AM.
looks good.
Any way you can hollow out the center shapes automatically?
ie. create courtyards
Dollhouse Syndrome = The temptation to turn a map into a picture, obscuring the goal of the image with the appeal of cute, or simply available, parts. Maps have clarity through simplification.
--- Sigurd
Moved to the actions forum.
Nice script (not that I know python). A suggestion is to use the enums provided rather than integers to make the code more readable. Like using FG-BG-RGB-MODE instead of 0.
-Rob A>
My tutorials: Using GIMP to Create an Artistic Regional Map ~ All My Tutorials
My GIMP Scripts: Rotating Brush ~ Gradient from Image ~ Mosaic Tile Helper ~ Random Density Map ~ Subterranean Map Prettier ~ Tapered Stroke Path ~ Random Rotate Floating Layer ~ Batch Image to Pattern ~ Better Seamless Tiles ~ Tile Shuffle ~ Scale Pattern ~ Grid of Guides ~ Fractalize path ~ Label Points
My Maps: Finished Maps ~ Challenge Entries ~ My Portfolio: www.cartocopia.com
OK - noticed a few oddities.
Instead of undo enable/disable, wrap the plugin code with gimp_image_undo_group_start and gimp_image_undo_group_end. THis will let you "undo" the plugin as one step, as it is now I can't undo the plugin.
You also leave a layer mask selected at the end. It is nicer to leave a layer selected.
An option to both merge visible and delete non-visible layers might be useful.
-Rob A>
My tutorials: Using GIMP to Create an Artistic Regional Map ~ All My Tutorials
My GIMP Scripts: Rotating Brush ~ Gradient from Image ~ Mosaic Tile Helper ~ Random Density Map ~ Subterranean Map Prettier ~ Tapered Stroke Path ~ Random Rotate Floating Layer ~ Batch Image to Pattern ~ Better Seamless Tiles ~ Tile Shuffle ~ Scale Pattern ~ Grid of Guides ~ Fractalize path ~ Label Points
My Maps: Finished Maps ~ Challenge Entries ~ My Portfolio: www.cartocopia.com
Looking good Alfar but too regular to my eye and that was the big problem I always came up against with the lazy man's style. But you've solved it for me with that context free script. What I love about it is that with a few tweaks you can create literally thousands of buildings which look simlar but not identical which really helps with a consistency of style.
You'll have to take me step by step thru this Ravs cuz I don't know the first thing about using CF...add that it to your tut maybe?
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
Sure, no worries. Alfar's done all the hard work, it's just changing the odd number here or there. Let me finish this city first and then I'll get on with the full tut. Alfar's the best one to explain the context free end of it though.
Yes, definately going to be an option. Do you want just one layer of houses, then?
I did use undo_group_start and undo_group_end, but I ran into trouble because I'm doing a huge number of gimp_edit_blend, and it just blows away memory on the undo info for some reason. I was going to ask you about that, actually.
I'll try and fix the selection at the end, and the two options you mention, sure thing.
I wonder if a house size jitter would help with the uniformity... will have to look into that. Maybe a placement jitter as well? Hmmm...
Hmmm. I ran into a similar problem with my multifill script.
Is there a freeze/thaw call for undo?
Ultimately the solution I came up with was to copy the active layer then use the paste as new image pdb call, then disable the undo stack on the new image only when all the processing was done I did a copy paste back into the original image (that just has an undo group)
That might help?
-Rob A>
My tutorials: Using GIMP to Create an Artistic Regional Map ~ All My Tutorials
My GIMP Scripts: Rotating Brush ~ Gradient from Image ~ Mosaic Tile Helper ~ Random Density Map ~ Subterranean Map Prettier ~ Tapered Stroke Path ~ Random Rotate Floating Layer ~ Batch Image to Pattern ~ Better Seamless Tiles ~ Tile Shuffle ~ Scale Pattern ~ Grid of Guides ~ Fractalize path ~ Label Points
My Maps: Finished Maps ~ Challenge Entries ~ My Portfolio: www.cartocopia.com
Ah, yes... doing the stuff in a different image would probably do the trick. Will have to play with that. Thanks!