View Full Version : [Award Winner] Using Illustrator For Smooooth Landforms & CLEAN Lines

11-09-2008, 11:24 AM
Using Illustrator For Smooooth Landforms & CLEAN Lines

I. Introduction

Hello all! Ascension brought up that you all might be in need of some Illustrator tutorials. Now, I've never exactly written something like this, but I've been playing with Illustrator for a couple years now, and I figure I might have some experience to impart on what is a rather daunting program if it's your first time using it. Now, I am fairly sure that many of these techniques can be translated to other vector programs, I just don't use other vector programs, so your guess is as good as mine.

Programs used for this tutorial were Illustrator 12, Photoshop 9 & Fractal Terrains Pro (YMMV).

I am going to go through the steps in taking a simple randomly generated landform from Fractal Terrains Pro to something like this:


II. Optimizing Your Source Image

Before we even get to Illustrator, we need to tweak our source image a bit.

If you are using Fractal Terrains Pro for your source image, we need to change the default lighting settings - with the map showing Altitude, Go Map -> Lighting and Color and uncheck blended and shaded for both land and water (don't worry about my coloring scheme here, I'm running a custom one, so yours won't look exactly the same, but the important thing here is that we just have raw pixels without embellishments. Now export (or print screen), and take this newly generated landform into your raster graphics editor of choice (Photoshop, GIMP, &c.).

Now that we have our basic landform here in our graphics editor, we need to paint all the land black and all the water white, leaving us with an image that is just black and white. Now that our source image has been optimized for Illustrator, save as a .png.

http://i87.photobucket.com/albums/k126/Plexust/th_ill-map-raw.png Full-view (http://i87.photobucket.com/albums/k126/Plexust/ill-map-raw.png)

III. Using Live Trace to Get Those Smooth Landforms

We'll be using these tools out of Illustrator's toolbox:


Open your .png source image in Illustrator. Next go Object -> Live Trace -> Tracing Options. You will be presented with this screen:


Live trace is a powerful tool to convert raster images to vector, and it's utility goes far beyond converting black/white images to smooth landforms, but that's beyond the scope of this tutorial.

Mode: Black and White - This option will generate a simple black and white vector of the source image. Ideal for our purposes here.

Threshold: Defines at what level of grey the divide between black and white is interpreted. Default is 128 or 50% grey, and is fine for our purposes here.

Blur: Our source image is heavily pixelated and without some sort of blur prior to vectorization, there will be a lot of jagged little areas. I used a blur of 1 px, but other values may yield better results for you.

Fills/Strokes: As we are converting solid shapes and not lines, select fills.

Path Fitting: This value determines the level of fidelity that the vector will have to the finished image, the lower the number, the more exact. A level of 0 px would have the finished product remain pixelated, just vectorized pixels. I used a level of 1 px, but, again, other values may yield better results for you. It's not an exact science.

Minimum Area: This value determines how many pixels will comprise the smallest element in the tracing. I used 25 px here (a 5x5 px island is the smallest possible element conserved from the source). Smaller values will retain more detail, but certain strokes I intend to apply to the finished artwork (most notably an inside stroke of 5px - more on that later), behave poorly when they are applied to something smaller than the square of its size.

Be sure to check Preview as you are playing with the values; it will show you what your landforms will look like before you apply the trace. Once you are satisfied with the landforms, press Trace.

http://i87.photobucket.com/albums/k126/Plexust/th_ill-tut-traceresult.png Full-view (http://i87.photobucket.com/albums/k126/Plexust/ill-tut-traceresult.png)

Now, you can save this image right now and export to your favorite raster editor, or you can continue to play around in Illustrator. I'm going to stay in Illustrator and show you guys how to apply some simple strokes.

IV. The Power of Illustrator and Clean Lines

Select your tracing result. Now, up top, in the tracing bar, click Expand. With the tracing still selected, go Object -> Ungroup. Deselect, and, using the Direct Selection Tool (white mouse pointer icon in tools, to the right of the black mouse pointer), select some water. Now go Select -> Same -> Fill Color and press Delete. This will leave you with a black landform shape.

http://i87.photobucket.com/albums/k126/Plexust/th_ill-tut-traceresult2.png Full-view (http://i87.photobucket.com/albums/k126/Plexust/ill-tut-traceresult2.png)

Now, make three copies of this layer containing your landform (for a total of four). The topmost layer is going to be your black outline, the middle your land color and inline and the bottommost your water outline.

With the topmost layer selected, go to the fill/stroke palette on your toolbar and click the Reverse icon in the left corner - so that there is no fill and the stroke is set to black. Now in the stroke bar, ensure that Weight is set to 1 px, the stroke is aligned to the Outside and you have Butt Cap & Round Join selected. Now you have your black outline.

http://i87.photobucket.com/albums/k126/Plexust/th_ill-tut-outline.png Full-view (http://i87.photobucket.com/albums/k126/Plexust/ill-tut-outline.png)

With the second layer selected, go to the fill/stroke palette on your toolbar and set the fill to something like #FFE384, and the stroke to something like #FFD457. Now in the stroke bar, ensure that Weight is set to 5 px, the stroke is aligned to the Inside and you have Butt Cap & Round Join selected. Now you have your colored landform and nice little inside stroke.

http://i87.photobucket.com/albums/k126/Plexust/th_ill-tut-fill.png Full-view (http://i87.photobucket.com/albums/k126/Plexust/ill-tut-fill.png)

With the third layer selected, go to the fill/stroke palette on your toolbar and set the fill to something like #FFE384, and the stroke to none.

With the bottom layer selected, go to the fill/stroke palette on your toolbar and set the fill to none, and the stroke to something like #A8C399. Now in the stroke bar, ensure that Weight is set to 14 px, the stroke is aligned to the Center and you have Butt Cap & Round Join selected. Now you have your water outline.

http://i87.photobucket.com/albums/k126/Plexust/th_ill-tut-water.png Full-view (http://i87.photobucket.com/albums/k126/Plexust/ill-tut-water.png)

Now the only thing left to do is set a background, so select the Rectangle Tool from the Toolbox, and drag to create a rectangle to serve as the background. Make sure it is placed below all other layers. Set the fill to the same as the fill in the middle layer and the stroke to none.

http://i87.photobucket.com/albums/k126/Plexust/th_ill-tut-final.png Full-view (http://i87.photobucket.com/albums/k126/Plexust/ill-tut-final.png)

Now save the image and export to your favorite raster editor for some post work, or just stare at those lovely smooth lines.

Attached is my Adobe Illustrator (.ai) file of the finished product:

11-09-2008, 11:25 AM
I'm quite sure I didn't make this as clear as possible - if anything is confusing here, let me know! :)

11-09-2008, 12:10 PM
If you come up with a style you like in Illustrator, you can save it as a Graphic Style to be applied later to whatever you like. In this case, you'd need a set of styles--one for each layer, but once it's done you don't have to mess with finding the colors or setting the exact stroke weights you wanted--Illustrator will take care of all of it. Also, you could reduce the complexity of this object by using only three layers: Background/sea with a solid fill, coastal glow with the centered stroke, and the landmass, with two strokes and a fill. The black outer stroke and the gold inner stroke can both go on the same object.

To add a second stroke to an object, open the Appearance window: Window>Appearance

In the Appearance Window, use the drop-down menu (to the right of the "tab". It looks like a down-arrow and three horizontal lines), and choose "Add new stroke." You will see a second stroke appear beneath the existing stroke in the Appearance window. Select that stroke and you can change it just like the original one.

To save your double-stroked and filled style, go to Window>Graphic Styles. Make sure the object with the style you want to save is selected, and click on the "New Graphic Style" button at the bottom of the window. Now you can select other objects and simply click on your new style--the objects will immediately gain the strokes and fill you specified.

When you've got all the styles you want, you need to save them so you can recall them in later documents: Use the drop-down menu again and choose "Save Graphic Style Library..." Give it a file name, and you'll be able to recall it again at any time using that drop-down and "Open Graphic Style Library>User Defined>(file name)"

11-09-2008, 02:26 PM
Thank you very much TC. I'll have to get Fractal terrains now. I'll see if I can take some of this through Photoshop instead of FT.

11-09-2008, 02:38 PM
Yes, that is entirely possible. FT is not at all necessary. And you are quite welcome.

11-09-2008, 02:56 PM
Nice tutorial, TCBerry!

In case you weren't aware, the developer of Fractal Terrains, who also developed Wilbur (another Terrain generator, but free) is Joe Slayton, who is a member here at the Guild, nicknamed Waldronate.

Teach us more!


11-09-2008, 05:43 PM
A very nice tut indeed! Have some rep and everyone don't forget to rate the tutorial!

11-10-2008, 10:01 AM
Illustrator has some great tools for vector mapping... in fact its an industry standard for geographical mapping for many places in Canada. It uses a lot of the recommended methods for simplifying lines and such that should be used when trying to keep things as accurate as possible. A lot of times when working with ArcGIS and Autcad (especially autocad) if you import your work into illustrator, you end up with millions of nodes that makes display slow and the work look jagged... simplify can be used to get rid of the majority of those as well...

Avenza also has a plugin called MaPublisher for illustrator, allowing spactial projection and import of many different types of vector mapping.... its $1300 US at last look so i doubt it'd be useful for commercial or hobbyist fantasy mappers, but it shows you that illustrator is very useful

One of the reasons MaPublisher is great (and one thing to be very careful with when creating maps) is that it correctly scales your map and its contents, regaurdless of projection, and size. Its not as important in a fantasy map, but remember that scaling your map (unless you scale everything in proportion, including the scale bar) will result in losing the correct scale.

Steel General
11-10-2008, 11:41 AM
I haven't used Illustrator yet, but if I do I'll defintely come back to check this one out.

Good work!

11-14-2008, 09:24 AM
Congratulations on your first award, tcberry!!

11-14-2008, 05:17 PM
Ooo yeah, congrats and well earned for a much desired tut.

11-18-2008, 10:01 AM
Wilbur has an export to SVG feature that saves a little aggravation for the lazier among us. A little blur before export smooths things out to get more rounded landforms.

Wilbur also has a grayscale sea mask shader that will give you a black and white land/sea mask directly (you can do the same thing in FT by setting high and low land colors to white and high and low sea colors to black).

Wilbur 1.66 does seem to have a small problem with horizontal direction swaps on the SVG output, but I expect that to be sorted out soonish.