PDA

View Full Version : GIMP can make random world maps out of the box!



RobA
09-28-2007, 05:12 PM
Following up on the random coastlines in this post (http://www.cartographersguild.com/showthread.php?t=870) I was going to make a GIMP script-fu *macro) to generate these automatically. Low and behold, there already are three built in to the GIMP! distribution. All of them generate coloured maps, however, and are available from the main GIMP window Xtns->Patterns->Land (shown). Also shown are the settings I used for the generated images, only changing the seed.

Note that these create an image, nothing needs to be done first. I (creatively) used seeds 0, 1, and 2 respectively.

-Rob A>

Now to modify/extend this to draw outlines as well!

NeonKnight
09-28-2007, 05:33 PM
Looks cool! Wonder if there is a way to export that to Profantasy's Fractal Terrains and then to CC3?:?:

Torq
09-28-2007, 05:37 PM
Man. Who knew? Thats great for quick continental maps. Thanks for an excellent find.

Torq

RPMiller
09-28-2007, 05:52 PM
Looks cool! Wonder if there is a way to export that to Profantasy's Fractal Terrains and then to CC3?:?:
If you convert it to a gray scale you can use it in FT as a height map. ;)

ravells
09-28-2007, 05:52 PM
Wow! What a find!

Neon, I doubt that there's a way to export them into FT which uses height data to make its maps.

Ravs

RPMiller
09-28-2007, 05:55 PM
See my post that I posted at the same time as yours. ;)

RobA
09-28-2007, 06:28 PM
The script-fu actually leaves the greyscale heightfield as a layer under the coloured one. You could just use that :)

But if you've already got FT, it can do this sort of stuff right out of the box, no?

I don't have FT, but random HF generation is pretty basic, even Wilbur (http://www.ridgenet.net/~jslayton/software.html) does it (and much better than GIMP), and my understanding is that Wilbur was the start code fro a lot of FT.

-Rob A>

NeonKnight
09-28-2007, 06:33 PM
The script-fu actually leaves the greyscale heightfield as a layer under the coloured one. You could just use that :)

But if you've already got FT, it can do this sort of stuff right out of the box, no?

I don't have FT, but random HF generation is pretty basic, even Wilbur (http://www.ridgenet.net/~jslayton/software.html) does it (and much better than GIMP), and my understanding is that Wilbur was the start code fro a lot of FT.

-Rob A>

While FT can do this out of the box, the colors are more aligned to CC and not quite as pretty.

RPMiller
09-28-2007, 07:02 PM
The script-fu actually leaves the greyscale heightfield as a layer under the coloured one. You could just use that :)

But if you've already got FT, it can do this sort of stuff right out of the box, no?

I don't have FT, but random HF generation is pretty basic, even Wilbur (http://www.ridgenet.net/%7Ejslayton/software.html) does it (and much better than GIMP), and my understanding is that Wilbur was the start code fro a lot of FT.

-Rob A>

Yes, they were developed by the same person.


While FT can do this out of the box, the colors are more aligned to CC and not quite as pretty.

Don't forget with FT you can change the color palette and there is the Gaia view which uses more "typical globe coloring" but doesn't do much with climate.

ravells
09-28-2007, 07:13 PM
That's interesting. I've got FT and thought that although you can convert FT maps to grey scale height maps (which I import into Bryce to make 3d maps - very handy), you can't actually make an FT file out of height maps because it uses vector point data (I think) like the USGS use to make their maps.

Not sure it can be done, but I'd love to see if it can.

RPMiller
09-28-2007, 07:20 PM
Ok, I found the instructions:

To create the binary file:

For each contour level

Hide all layers but the contour level (or hide everything except the entities you want at a specific altitude level).
Save AS a PNG file (JPEG is probably a bad idea) Note of the size that you're making - write it down.
Next, start up a program like Photoshop or PSP.
Create a grayscale image the same size as the output image (that's why you wrote it down!)
For each output image (contour level) load it into something like Photoshop or PSP, convert to grayscale, preferably with the non-interesting areas black and the interesting ones as a dark gray (value 10 or so on a 0-255 scale)
Optionally: blur the image slightly.
Add the current contour interval to the growing image. Do this for each contour level.
Save the file as a 256-color Window bitmap (BMP) file.
Use Wilbur (included on the FT CD) to open the bitmap as a surface file (File->Open:8-bit BMP Surface)
Scale the altitudes to the desired level (Surface->Point Process->Scale:To Range)
Save the image as a Muse DTED file (a 16-bit binary format)
Alternatively - save a copy of your CC2 map under a different name. Delete all of the symbols, text & non-contour stuff. make the sea & rivers Black & recolor all of the contours in shades of gray - starting with #242 at the coastline & increasing up as the contours go up.
Some preplanning helps here. Separate the different contours by putting them on different layers.
Remember each contour will be a different altitude. Once the map is grayscaled, export as a BMP 24bit file (write down the dimensions). Also note - you will get better results if you are working with your world map & not a section of your world map. FT maps are based on a sphere! To load the binary file in FT:

Use File>>New:Binary File. Select the DTE file you created and set the Per-sample info to 2-byte, LSB First, Signed, Header Length=1024, Line Width to image width*2 (the image with times 2), Width and Height to the image width and height, and Map Edges to the locations on the globe where you want the map to be placed (use Min/Max to find these coordinates) That's it. Your map should be present in the FT display.

RobA
09-29-2007, 03:45 PM
The other big difference I noticed is that the FT map is a globe (2:1 ratio) and all "cuts" in the algorithm map to a globe. Using the GIMP noise algorithm (even seamless) would lead to pinching at the poles if mapped to a sphere. So it all depends on what you want to do with it.

-Rob A>

Airith
10-02-2007, 10:30 PM
great find, but what... well ok i'm still new to GIMP, so I have no idea at all as to what to ask, but I want to know what to do to get that water effect. I think it looks great. Anyone? xD

RobA
10-03-2007, 09:14 AM
great find, but what... well ok i'm still new to GIMP, so I have no idea at all as to what to ask, but I want to know what to do to get that water effect. I think it looks great. Anyone? xD

The water effect is generated by the script-fu (the whole map is).

The color is provided by the palette map used from greyscale noise function, and it is (I believe) lightly bump-mapped (parameters are in the script-fu).

-Rob A>

su_liam
10-24-2007, 09:00 PM
I've been playing around with this myself. I think the Clouds filter in Photoshop is based on a 1/f frequency synthesis algorithm. In my opinion, it makes some of the prettiest topology, but it has a big problem, even for local area maps. It tiles. This is great for doing a cloudy background on a webpage, but it's a mess for a planetmap, unless your planet is a torus.

RobA
10-24-2007, 10:54 PM
The best I can figure, both Photoshop and GIMP use a perlin noise function to render clouds. Gimp has a toggle to make it tileable or not, but I don't know about photoshop.

-Rob A>

AidyBaby
10-25-2007, 04:42 AM
Photoshop doesn't have the option to turn off tiling that I'm aware of. It's easily solved, however, either by rendering clouds in another document at a larger size than the map and cropping it to suit before dropping it into your map or by rendering the clouds layer and then cropping and transforming up to the full document size (that's what I do). Obvious, I know, but worth mentioning.

su_liam
10-25-2007, 02:54 PM
For planetary maps, I make a square image, then I run the Clouds filter with a white foreground and a black background. At about the halfway lines north and south I use smudge to break up the polar pinching. I then crop down till the image is twice as wide as it is high. Following that I use Flexify to move the poles down to the middle of the map. Then I use smudge and the healing brush to obliterate any remaining pinching to my satisfaction. Finally, I use Flexify to move the poles back where they belong.

Anymore, I mostly use lunarcell or planetgenesis to produce heightmaps. In any case, once I get a decent heightmap I import it into bryce as a terrain.

RPMiller
10-25-2007, 03:02 PM
For planetary maps, I make a square image, then I run the Clouds filter with a white foreground and a black background. At about the halfway lines north and south I use smudge to break up the polar pinching. I then crop down till the image is twice as wide as it is high. Following that I use Flexify to move the poles down to the middle of the map. Then I use smudge and the healing brush to obliterate any remaining pinching to my satisfaction. Finally, I use Flexify to move the poles back where they belong.

Anymore, I mostly use lunarcell or planetgenesis to produce heightmaps. In any case, once I get a decent heightmap I import it into bryce as a terrain.
Sounds like a great tutorial for you to make! ;) :D

RobA
10-25-2007, 03:12 PM
For planetary maps, ...

For GIMP, and easier way to do this is to get the Felimage noise filter (http://fimg-gmplugins.sourceforge.net/docs.php).

It will produce many types of noise, and allow for planar, tileable, or spherical mappings, choice of gradient to use, tuning of more parameters than I understand, and saving of presets.

-Rob A>

RPMiller
10-25-2007, 04:26 PM
You know it occurs to me that some of the more modern map projections might be possible in PS and GIMP using some of the transforms... I may just give that a whirl at some point and if I succeed I'll create an action that can recreate the steps.

RobA
10-25-2007, 05:16 PM
You know it occurs to me that some of the more modern map projections might be possible in PS and GIMP using some of the transforms... I may just give that a whirl at some point and if I succeed I'll create an action that can recreate the steps.

I would think definitely doable in GIMP, because of the MathMap plugin. (http://www.complang.tuwien.ac.at/schani/mathmap/)

If you can write a math expression for the projection, mathmap can make it happen :)

-Rob A>
(P.S. Check out the flickr images tagged with mathmap (http://www.flickr.com/search/?q=mathmap) to see the things this can do...)

RPMiller
10-25-2007, 05:30 PM
It just so happens that I may actually be able to provide that expression. It might take a couple days though.

EDIT: After looking at the expressions, it looks like you are constrained to the size of your image and the result must match. They may not work as I was thinking of doing an Iso map which would require slicing the image.

Faide
10-25-2007, 07:31 PM
I just downloaded the Felimage plugin and it's very good. I've been struggling to get noise to do some things and this has sorted out a few problems really nicely.

I've attatched a forest pattern I made using Felimage in less than 2 minutes. It could quite easily be more effective and a better shade of green.

Cheers for that!

Karl

RobA
10-25-2007, 11:50 PM
I just downloaded the Felimage plugin and it's very good. I've been struggling to get noise to do some things and this has sorted out a few problems really nicely.

I've attatched a forest pattern I made using Felimage in less than 2 minutes. It could quite easily be more effective and a better shade of green.

Cheers for that!

Karl
Thanks for road testing it Karl! I know that there are many, many options, and it does take some playing to get results you want.

Could you save the preset, zip it up and attach? We might be able to peel this of and make a "Felimage presets" thread :)

-Rob A>

RobA
10-25-2007, 11:53 PM
EDIT: After looking at the expressions, it looks like you are constrained to the size of your image and the result must match.
The canvas size will match, so as long as the input is scalled up to hold the desired output, it should be fine. For example if you wanted to map a 400x400 square to a 2:1 rectangle, you could end up with a 400x200 rectangle having blank space above and below....

or am I missing something:?:

-Rob A>

MGCJerry
10-26-2007, 07:14 PM
While FT can do this out of the box, the colors are more aligned to CC and not quite as pretty.

If you go into the menus to "Map" -> "Show Gaia", you'll get a better view with better colors.

You can also get a useful heightmap out of FT by going to "Map" -> "Show other Shader" -> "Show Bump map". Export that at a VERY large size, and use it for an image heightmap. This image is a result of importing such a height map into a Carrara terrain object, and placing the camera to a good looking area.

http://www.mgcjerry.net/Carrara6/winter.jpg

Anyway, for images mapped to spheres, I strictly use the 2:1 ratio. Of course, I map a lot of images to 3d objects, so you're milage will vary based on what the resulting image is for.

Notsonoble
06-26-2009, 02:11 PM
For those running 2.6 it seems a lot of those scripts weren't sent with the binaries... here's the one I found... http://registry.gimp.org/node/8172

edit grr: this one actually creates a space view of a planet... I'll keep looking...

RobA
06-28-2009, 07:49 PM
In most cases any one that creates a new image has been moved to the File>Create menu instead of the old xtns menu.

This happened as a part of adding an empty image window on startup.

-Rob A>

Quillz
09-03-2009, 01:02 AM
Thanks for the notice about the shuffling of options in GIMP 2.6.

BrockyL
09-17-2009, 04:08 PM
I do not have this Xtras Menu nor the land option to make a map in such a way, but i am very interested in this height map script. This is right up my alley. Wellp Back To The Gimp Registry (which is how i found this forum ;) )

RobA
09-17-2009, 06:37 PM
I believe the old any image creation scripts from the XTNS menu have been moved under File>Create (going from memory...)

-Rob A>

StGeorge
10-02-2011, 04:04 PM
I believe the old any image creation scripts from the XTNS menu have been moved under File>Create (going from memory...)

-Rob A>Sorry to dig this thread up from the grave, but this is correct. It's File>Create>Patterns>Land

Or, if you desire a non 3d-ish map, Patterns>Flatland

Warder
12-13-2012, 09:22 PM
Following up on the random coastlines in this post (http://www.cartographersguild.com/showthread.php?t=870) I was going to make a GIMP script-fu *macro) to generate these automatically. Low and behold, there already are three built in to the GIMP! distribution. All of them generate coloured maps, however, and are available from the main GIMP window Xtns->Patterns->Land (shown). Also shown are the settings I used for the generated images, only changing the seed.

Note that these create an image, nothing needs to be done first. I (creatively) used seeds 0, 1, and 2 respectively.

-Rob A>

Now to modify/extend this to draw outlines as well!

I like the look of this idea, but I can't find it in the menus to even try it out. I'm still new to GIMP. My menu doesn't look like the one displayed. Do you know if they moved it into a submenu?
Thanks in advance
Mars

Korash
12-13-2012, 10:26 PM
Yuppers, in Gimp 2.8 it is under File>>Create>>Patterns. Posted below is an example at max detail and 2000x2000 px. This is the Flatland pattern
50516