Page 1 of 3 123 LastLast
Results 1 to 10 of 24

Thread: Random Density Map GIMP Script

  1. #1

    Info Random Density Map GIMP Script

    As hinted here I have been working on a gimp script to draw with the active brush using a "density map" to determine the probability of painting.

    Attached is a zip. Just drop it in the gimp script directory.

    Here is where it registers in the menu:
    menu.png

    Do use it in the most basic way, create a probability density map.... a layer where back will have a 0% chance of drawing and white will have a 100% change of drawing:
    map1.png

    Create a new layer (it must be the same size) to draw on with the current brush.

    Here is the dialog:
    dialog.png

    and one result with a red Hexagonal 21 px brush, and set it at 100% Density, Spacing of 21 px, and no Jitter:
    1-nojitter.png

    (more examples following...)
    Attached Files Attached Files

  2. #2

    Post

    Using the same Density map, here are more results:

    Setting the density to 50% will make white only have a 50 chance of drawing. Here again with no jitter:
    2-nojitter_50percent.png

    And back at 100%, but with a jitter of 1. The jitter value is a scale of the spacing parameter, for randomly displacing the x&y directions, to get rid of the grid look:
    3-jitter.png

    The scrip draws left to right and top to bottom, to work with isometric image brushes, like the trees posted:
    4-trees.png

    And using the "invert" check will invert the map (black = 100% chance and white = 0% chance):
    5-trees_invert_map.png

    (cont...)

  3. #3

    Post

    The other option is less useful for mapping but might have some artistic uses...

    You can use a map with transparency, and it will use the alpha as the density map, and the colour as the colour to paint with.

    Here is such a density map:
    map2.png

    and the result, using the hex brush again:
    map2_result.png

    Enjoy!

    -Rob A>

  4. #4

  5. #5

    Praise

    Excellent and useful stuff.

    S. John Ross Ghalev
    Who Dat? Games Fonts Uresia

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

    Default

    The drool is running down my chin as I type. This is GREAT. I can't wait to try it out.

    Joe
    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.

  7. #7
    Guild Artisan su_liam's Avatar
    Join Date
    Aug 2007
    Location
    Port Alberta, Regina(IRL: Eugene, OR)
    Posts
    798

    Default

    Cool. I'll have to try this. It looks like you might be able to use the alpha-and-color option to cause interesting variation in tree(or mountain or whatever) color. For instance, with trees, create a layer with a narrow variation of green shades. (Possibly use a greyscale fractal and gradient map with a narrow gradient(say dark green to light green)).

    Another idea I have is to make an initial color layer that varies only in hue and saturation, and apply a variation in value by multiplying with the shaded relief from an HF.

    Then you paint in your desired forest density in alpha.

    Might be a good way to add an interesting forest texture to a shaded relief map.

    I was initially thinking of using top-down trees for a realistic look, but I think this might work best all symbolical, with iso trees simply as a symbol saying, "forest here."


    If nothing else, this is making GIMP look like a more and more viable alternative to CC for "symbol"-type maps.
    Last edited by su_liam; 07-07-2008 at 01:46 PM.

  8. #8

    Default

    One limitation is that it doesn't respect active brush scaling, so all images are drawn at the original scale of the selected brush. Initially, I hoped to have an options to paint smaller versions based on the density map, but dynamic brush scaling isn't exposed in the scripting API (yet).

    -Rob A>

  9. #9
    Guild Artisan Facebook Connected
    Join Date
    May 2008
    Location
    Atlanta, Georgia, United States
    Posts
    928

    Post

    Oh my... this is very cool... an excellent tool!

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

    Post

    I agree. Great tool Rob, I'm going to try it as soon as possible.

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

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

Page 1 of 3 123 LastLast

Tags for this Thread

Posting Permissions

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