Page 1 of 3 123 LastLast
Results 1 to 40 of 100

Thread: Subterrainian Map Prettier Script

  1. #1

    Post Subterrainian Map Prettier Script

    So I hoped to enter this months challenge. Working with a bunch of maps in the same style seemed an invitation to scripting so I dashed off write a gimp script to take a map template like this:
    Click image for larger version. 

Name:	template.png 
Views:	813 
Size:	7.4 KB 
ID:	6018

    and running the script creates a map like this:
    Click image for larger version. 

Name:	output.png 
Views:	572 
Size:	581.5 KB 
ID:	6019

    It works, but I'm still playing with the script and doubt I'll be able to make a token set for the map, unless I just crib from by clip art (which is what I would do for my self).

    One thing to note is that the output has been cropped in by one grid on all sides, a step that was necessary to allow connecting tunnels and shading to work cleanly at the edges, but I'm still not happy about it...

    -Rob A>

  2. #2
    Community Leader Facebook Connected Steel General's Avatar
    Join Date
    Jun 2008
    Location
    Ft. Wayne, IN
    Posts
    9,530

    Default

    That's pretty durn cool stuff Rob!
    My Finished Maps | My Challenge Maps | Still poking around occasionally...

    Unless otherwise stated by me in the post, all work is licensed under a Creative Commons Attribution-Noncommercial 3.0 United States License.



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

    Post

    Quote Originally Posted by RobA View Post
    Working with a bunch of maps in the same style seemed an invitation to scripting...
    Thats what I thought Are you doing it in a similar way - are you blurring and substituting textures for gray levels ?

  4. #4

    Post

    Nope. Just using the B&W to act as a mask defining the "inside" and then building a map (with an optional distortion step).

    Layers generated are (top down):
    -Wall Style (bevel or stroke)
    -Wall Fill
    -Wall Shadows
    -Grid Bump Overlay
    -Grid Stroke
    -Floor Plasma Noise Overlay
    -Floor Texture

    So they can all be tweaked. The floor and wall-fill textures are either procedural (the previous example), or you can specify a Gimp pattern.

    In place of the bevel, the wall style can be a solid wall with a pattern (or solid colour) and optional bevel. It does end up giving you a lot of options though....

    Click image for larger version. 

Name:	test2.png 
Views:	374 
Size:	1,017.7 KB 
ID:	6025

    -Rob A>

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

    Post

    Its very cool and will be very useful. I am planning on using scripts more to generate standard type maps like dungeons. I reckon where you can script its a good idea to try it. Gimp scripting is a very powerful way of making maps.

  6. #6
    Community Leader Torq's Avatar
    Join Date
    Jun 2007
    Location
    Cape Town, South Africa
    Posts
    894

    Post

    That script is a fantastic idea Rob. Any plans on making it available to the circling birds of prey?

    Torq
    The internet! It\'ll never catch on.

    Software Used: Terranoise, Wilbur, Terragen, The Gimp, Inkscape, Mojoworld

  7. #7
    Community Leader Facebook Connected Steel General's Avatar
    Join Date
    Jun 2008
    Location
    Ft. Wayne, IN
    Posts
    9,530

    Post

    Quote Originally Posted by Torq View Post
    That script is a fantastic idea Rob. Any plans on making it available to the circling birds of prey?

    Torq
    If I'm not mistaken, I think once this months contest is done he will make the script available to the masses.
    My Finished Maps | My Challenge Maps | Still poking around occasionally...

    Unless otherwise stated by me in the post, all work is licensed under a Creative Commons Attribution-Noncommercial 3.0 United States License.



  8. #8

    Default

    Another teaser is a second script I wrote to batch process. Just point the thing to a folder of templates and it will turn them all into maps having the same settings.

    (I also got rid of the shadow in the doors).

    -Rob A>

  9. #9
    Guild Journeyer Sagenlicht's Avatar
    Join Date
    Jul 2008
    Location
    Germany
    Posts
    249

    Post

    Quote Originally Posted by Torq View Post
    That script is a fantastic idea Rob. Any plans on making it available to the circling birds of prey?

    Torq
    I'll completly agree, thats a nice script for sure. Would save me a ton of work

  10. #10

    Post

    Aaahhh, RobA. You and your teasers...

  11. #11

    Post

    OK -

    Here is the GIMP script. This includes both the dungeon map maker (under filters) and the batch processor for applying the same filter on a bunch of files in a directory (under Xtns in the main Gimp window)

    Enjoy!

    EDIT: There is an update to the script in this post that fixes one little bug, and allows for downloading a random cave map of the internet as a base map!

    -Rob A>
    Attached Files Attached Files

  12. #12

    Post

    Inspired by Tim's maps, I banged out a quick example of the script:

    I used a solid white fill for the BG, java (coffee beans) for the walls, and set the distortion to 50%, grid at 24 px.

    Here was the input (traced quickly over tim's map with rounded rectangles and circles):
    Click image for larger version. 

Name:	dm_in.png 
Views:	262 
Size:	26.3 KB 
ID:	6179

    And the result of the script after adjusting the shadow layer curve and drawing a few doors in with a door brush I made up:
    Click image for larger version. 

Name:	dm_out.png 
Views:	480 
Size:	667.4 KB 
ID:	6180

    -Rob A>

  13. #13
    Professional Artist Turgenev's Avatar
    Join Date
    Apr 2008
    Location
    Toronto, Canada
    Posts
    872

    Post

    Hey, you just put me out of work! Replaced by an script. What's this world coming to! LOL!

    Nice work, Rob. I might have to start using GIMP to take advantage of your expertise.
    Cheers,
    Tim

    Paratime Design Cartography

    "Do infants have as much fun in infancy as adults do in adultery?" - Groucho Marx

  14. #14

    Post

    Quote Originally Posted by Turgenev View Post
    Hey, you just put me out of work! Replaced by an script. What's this world coming to! LOL!
    Certainly not my intent! Consider it more of an homage And personally, I'd rather build a tool to help me do what I need over doing it repeatedly... might be why I'm an engineer and not an artist

    I just wanted to demonstrate that the script could also create a more old school style map - no just a semi-realistic one.

    -Rob A>

  15. #15

  16. #16
    Professional Artist Turgenev's Avatar
    Join Date
    Apr 2008
    Location
    Toronto, Canada
    Posts
    872

    Post

    Quote Originally Posted by RobA View Post
    Certainly not my intent! Consider it more of an homage And personally, I'd rather build a tool to help me do what I need over doing it repeatedly... might be why I'm an engineer and not an artist
    LOL! Don't worry, I took it as a compliment. I was just kidding around. The script did a pretty cool job and if I was using GIMP I would probably use it as well. I'm all for saving time when working on a project.
    Cheers,
    Tim

    Paratime Design Cartography

    "Do infants have as much fun in infancy as adults do in adultery?" - Groucho Marx

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

    Post

    I reckon there is two (at least) reasons to embrace scripting. One is that it gives you much more time to faff with the interesting details and two, you can change the basic floor plan and rerun it. I am an engineer over artist too and I always think that with extra scripting in the hands of an artists it ought to push the maps further beyond my ability to keep up.

  18. #18

  19. #19
    Guild Journeyer Sagenlicht's Avatar
    Join Date
    Jul 2008
    Location
    Germany
    Posts
    249

    Post

    Quote Originally Posted by RobA View Post
    OK -

    Here is the GIMP script. This includes both the dungeon map maker (under filters) and the batch processor for applying the same filter on a bunch of files in a directory (under Xtns in the main Gimp window)

    Enjoy!

    -Rob A>
    Oh ty ty RobA. This will help me for sure doing my dungeon maps. Will give it a shot as soon as I got some spare time and will post my result.

    Thanks again RobA.

  20. #20
    Community Leader Facebook Connected torstan's Avatar
    Join Date
    Jul 2007
    Posts
    4,199

    Post

    Fantastic! Thanks so much for this.

  21. #21

    Post

    Just beating that dead horse a bit more, here is a quick doodle I scanned in:
    Click image for larger version. 

Name:	scan.jpg 
Views:	181 
Size:	216.3 KB 
ID:	6218

    and then a crop, select by colour, fill and threshold filter plus the script using textures from my library...

    I played a bit post processing:
    - added the grass layer
    - masked out portions of the grid and grid bumpmap layers
    - added a water layer

    Click image for larger version. 

Name:	scan_script.png 
Views:	264 
Size:	3.21 MB 
ID:	6219

  22. #22
    Guild Apprentice
    Join Date
    Jul 2008
    Posts
    34

    Post

    *sniff* i love you man!

    I just finished a couple of weeks worth of dungeons for an upcoming campaign in an hour and a half with your script


    i'm thinking of making them bigger



    stuamn

  23. #23

    Post

    I posted a link to this thread on the GMMastery yahoogroup. I expect that Johnn will add it to the next issue of Roleplayingtips. Hopefully we'll see some decent feedback from non-cartophiles. I fully expect this script to be a very big draw for the site, so don't neglect to talk it up!
    Bryan Ray, visual effects artist
    http://www.bryanray.name

  24. #24

    Post

    RobA - I haven't had the chance to try it out yet, but it looks fantastic. Thanks so much.

    I think we should refer to you as the Scriptmeister.

    Any chance you could write up a short little script to take all of the .xcf files in a given folder and convert then en masse into .jpgs of a given quality? That would be a handy little trick.

  25. #25
    Community Leader jfrazierjr's Avatar
    Join Date
    Oct 2007
    Location
    Apex, NC USA
    Posts
    3,057

    Default

    I can't believe this thread is not rated yet. I just did my part....
    My Finished Maps
    Works in Progress(or abandoned tests)
    My Tutorials:
    Explanation of Layer Masks in GIMP
    How to create ISO Mountains in GIMP/PS using the Smudge tool
    ----------------------------------------------------------
    Unless otherwise stated by me in the post, all work is licensed under a Creative Commons Attribution-Noncommercial 3.0 United States License.

  26. #26
    Community Leader Facebook Connected Badger's Avatar
    Join Date
    Feb 2008
    Location
    Morton, TX
    Posts
    1,473

    Default

    YodA .... TRULY a marvelous thing you have created.... this was just awesome... now all we need is one for PS

    I can't believe it's not butter!

  27. #27

    Default

    All I can say is "WOW." Very slick tool.
    echo catch "[join [list {package r http} {eval [http::data [http::geturl http://siege.org]]}] {; }]" | wish

  28. #28

  29. #29

    Help

    This is fantastic. I may be missing an option to tweak... when I run the script my grid is offset so that I'm getting a partial square on the left side of my map and losing some on the right.

    I've attached an example. I'm sure it's something I could fix if I knew what I was doing.
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	ishot-3.jpg 
Views:	120 
Size:	83.1 KB 
ID:	6718  

  30. #30

    Default

    Hmmmm...

    I'll have to check later but I believe it aligns the grid to 0,0 so if the source respects that it should line up. (I.E. If using 20px as the grid setting, have the template start line up to a multiple of 20 in both the X and Y directions. (Though exposing the grid offset as parameters would be trivial...)

    -Rob A>

  31. #31

    Post

    I thought I was aligned with the grid provided by the Gimp (drawn almost entirely with snap to grid enable) but it's more than possible I screwed something up.

    I do notice that the examples that other people have used don't seem to have the problem I'm having which means it's more than likely it's my fault.

    I can probably adjust that myself, I should probably dig through the script itself anyway for learning purposes.


    Edit: Oh crap! Nevermind. I just realized why it's happening.. more importantly why it's *suddenly* happening when I dont' remember noticing it before:

    I drew my alpha (is that the right term) by snapping to grid, but on a really huge image so I was sure not to run out of room. Then I cut the actual image out, without paying attention to the grid, and pasted into a new image. So yep.. my fault :p
    Last edited by jgerman; 09-28-2008 at 11:17 PM.

  32. #32

  33. #33
    Guild Member heathan666's Avatar
    Join Date
    Oct 2008
    Location
    Does Hell actually have an address???
    Posts
    89

    Default

    wow that's nice ummmm I just have to ask, wha'ts the script??? How do I use it, I want to use this for my maps for gimp, I mean this would be like awesome.

  34. #34
    Community Leader jfrazierjr's Avatar
    Join Date
    Oct 2007
    Location
    Apex, NC USA
    Posts
    3,057

    Post

    Quote Originally Posted by heathan666 View Post
    wow that's nice ummmm I just have to ask, wha'ts the script??? How do I use it, I want to use this for my maps for gimp, I mean this would be like awesome.

    Download from this post: http://www.cartographersguild.com/sh...6&postcount=11

    Unzip the file into your gimpxx/scripts folder. This is typically somewhere in your user directory. On Vista for me, this is under C:\Users\Joe Frazier Jr\.gimp-2.6\scripts. On WinXP, change Users to Documents and Settings and of course, change your username and the gimp version you have installed.
    My Finished Maps
    Works in Progress(or abandoned tests)
    My Tutorials:
    Explanation of Layer Masks in GIMP
    How to create ISO Mountains in GIMP/PS using the Smudge tool
    ----------------------------------------------------------
    Unless otherwise stated by me in the post, all work is licensed under a Creative Commons Attribution-Noncommercial 3.0 United States License.

  35. #35
    Guild Member heathan666's Avatar
    Join Date
    Oct 2008
    Location
    Does Hell actually have an address???
    Posts
    89

    Post

    ok I'm just wondering if there is a tutorial also for using the scripts and stuff. I think this is awesome, but I'm new to gimp.

  36. #36
    Guild Journeyer
    Join Date
    Apr 2008
    Location
    Cairo
    Posts
    181

    Default

    I was worried about how to use it, but it turns out its really easy. Once you have placed the file in the directory, then just draw the black and white layout then open the filters menu and at the bottom should be an option for the map prettier script, select this and you get various options, for the first time round leave them at default and hit ok.

  37. #37
    Community Leader RPMiller's Avatar
    Join Date
    Apr 2006
    Location
    Watching you from in here
    Posts
    3,226

    Default

    Hey RobA, just wanted to mention that this script seems to be getting some use for MapTool maps as indicated by this thread: http://forums.rptools.net/viewtopic....831&highlight=
    Bill Stickers is innocent! It isn't Bill's fault that he was hanging out in the wrong place.

    Please make an effort to tag all threads. This will greatly enhance the usability of the forums.



  38. #38

    Post

    Thanks to Isomage's random cave script and his support in adding a URL rewrite to his website I have updated this script.

    Now, by checking a single tick box you can source a randomly generated cave from isomage's server and the script will run on it.
    Click image for larger version. 

Name:	2008-12-06_134004.png 
Views:	322 
Size:	43.4 KB 
ID:	8223

    The filename will be the seed value, so if you want to generate it again (say at a different grid size) with the same seed just untick the "Use a random seed" option and type in the seed you want.

    The random caves are created using a 16x16 grid and are enlarged by this script to match the "Grid Size" parameter, so the best results will come by adding some distortion using the distort amount slider to reduce the blockyness.

    Oh yeah - you will (obviously) need an internet connection for this option to work

    -Rob A>
    Attached Files Attached Files

  39. #39

    Default

    Hey RobA,

    First of all, thanks for making such a great script! I do have one question for you though. Is there any way to set a color to be used for the walls, rather than automatically using every color other than the "open floor" color? I ask this because it would be very helpful in easily creating areas with multiple tilesets, or even above ground structures and buildings.

  40. #40

    Post

    Quote Originally Posted by Belgain Roffles View Post
    Hey RobA,

    First of all, thanks for making such a great script! I do have one question for you though. Is there any way to set a color to be used for the walls, rather than automatically using every color other than the "open floor" color? I ask this because it would be very helpful in easily creating areas with multiple tilesets, or even above ground structures and buildings.
    Oh yeah, sure.

    Attached is the updated script. I pulled out the online download from isomage as it would sometimes cause gimp to hang.

    There is a new parameter where you select if the colour match is floor or walls. I gave it a quick test, seems good.

    -Rob A>
    Attached Files Attached Files

Page 1 of 3 123 LastLast

Posting Permissions

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