PDA

View Full Version : GIMP Script: Tile Shuffle



RobA
01-19-2009, 01:38 PM
Over in Woekan’s Dungeon Tiles in Adobe Photoshop Tutorial (http://forum.cartographersguild.com/showthread.php?t=3970) I mentioned doing this with gimp, and referenced a script I wrote to shuffle tiles.

When run, the script prompts for X and Y tile size. The default is 100 for both.

Here is a sample source:
9438

The result:
9439

If the width or height aren't evenly divisible by the tile size, then the strip of partial tiles on the right and/or the bottom are shuffled. If both aren't divisible the lower right part tile will not get moved. (This is shown in the previous example.)

Now where this comes in handy (for example) is if you have a nice rendered noise (like this level adjusted difference clouds with a grid to help show the effect):
9440

And after running the script:
9441

Just unzip the file into your gimp scripts directory. The script registers as Filter>Distorts>Tile Shuffle

-Rob A>

Steel General
01-19-2009, 01:44 PM
Great job RobA!

RobA
01-21-2009, 01:53 PM
Another good use for this tool is to make better use of random tile sets in GIMP. Here I show how to make such a set (http://forum.cartographersguild.com/showthread.php?t=3232) but there are lots for download over in the Dundjinni forums (http://www.dundjinni.com/forums/search.asp?KW=tile+set&SM=3&SI=PT&FM=8&OB=1), too.

Here I filled horizontal rows with the same tile:
9501

I then ran the tile shuffle:
9502
-Rob A>

jfrazierjr
01-21-2009, 02:14 PM
Hmmm.. i might have to play with Genetica Viewer and create a few tiles to see how random I can make them and still look halfway decent.