Sunteți pe pagina 1din 15

Inkscape Mapping Basics

Kevin Michael Smith

July 24, 2011

Before reading this tutorial, make sure you are familiar with the Basic, Shapes, and Advanced
tutorials that come with Inkscape under Help→Tutorials. This is not a typical follow-the-steps
tutorial but a quick introduction to some of the tools in Inkscape that a fantasy map maker would
find useful, and suggestions about how to use them. The reader should follow along and play with
each tool as they go.
Following the introductory sections are several quick “mini tutorials” that demonstrate how to ac-
complish some specific mapmaking tasks using the covered tools in greater detail.

1 Layers

Layers are essentially just Groups, but with some extra user interface wrapped around them. To
bring up the Layers pallet, go to Layer→Layers. . . or press Ctrl+Shift+L. This shows a tree
view of the current layers, several buttons to add, remove, or re-arrange layers, a drop down box to
control blending modes, and an opacity slider.
To select a layer as current, click on its name. Any new shapes or paths you draw will be in this
layer and Select All will apply to objects within this layer. If you select a shape, you will move to
its layer.
To rename a layer, select it, then click on its name again. You can now type a new name. To make
a layer invisible, click on the open eye ( ) beside its name and it will close ( ), click again to make
it visible again. Click on the padlock ( ) to lock ( ) a layer, so its contents can not be edited or
selected, and click again to unlock it.
The buttons underneath the tree view allow you to add, remove, or re-arrange layers. If you click
on Create New Layer, you will be prompted for a name and a position relative to the currently
selected layer. If you choose As sublayer of current, the new layer will be inside the current layer
like a group within a group. Anything you do to the superlayer will apply to any sublayers. It is
possible to include shapes in a superlayer, but it is usually best practice to only have sublayers or
objects, not both.
Remove simply deletes the current layer and its contents, and the up and down buttons let you move
the current layer up and down the stack of layers.

1
The blend mode controls how the layer is combined with lower levels. Normal simply places the
upper layer on top. Multiply can be thought of as treating light colours as transparent, Screen is
similar but treats dark colours as transparent, and Lighten and Darken use the lighter or darker of
the two layers respectively.
The opacity slider lets you make the entire layer more or less opaque just as the opacity slider in the
Fill and Stroke pallet does for an object.

1.1 Layers in Maps

A well designed stack of layers can make your mapmaking far easier. Maps have many different sets
of components that all overlap and you often need to work with one set without affecting another.
Locking and visibility help a great deal here.

2 Clones

A clone is an object that points to another and says “I’m like that.” If you have a lot of repetitions
of a symbol, cloning it rather than copying can help keep the size of your file down, and makes it
easy to change the symbol.
Cloning an object is just like duplicating. Press Alt+D instead of Ctrl+D and you will produce
a clone of your selection instead of a copy. You can clone a clone in which case the second clone
references the first clone, and any changes made to the first will affect the second.
If the template has an undefined fill or stroke, you can set these on the clone, but if they are set
on the template, they will be locked on the clone. For instance, if the template is a circle with an
undefined fill, and a black stroke, a green clone with a red stroke, will still have the black stroke of
the template, but the fill will be green.
It’s often a good idea to group your clone templates, and then clone the group, even if it’s just one
object. This way you can easily change it later by changing the contents of the group.
If you have a clone selected, you can jump to the template with Shift+D, turn the clone into a copy
with Shift+Alt+D (Unlink), or change the template to whatever you have in your clipboard with
Edit→Clone→Relink to Copied

2.1 Clones in Maps

Clones are great for point symbols like cities and towns, or other repeated symbols like trees, moun-
tains, etc.

3 Patterns

Patterns are an alternative to solid colours and gradients as fills and stroke paints. A pattern is an
image that gets repeated in a rectangular tiling to cover the space. For instance, you can fill a shape

2
(a) Transformations of a pattern (b) Built in patterns (c) A custom forest pattern

Figure 1: Examples of patterns

with stripes or a checkerboard.


You can set a pattern fill in the Fill and Stroke pallet exactly the same way you would a solid
colour or gradient. Just pick the Pattern tab and select a pattern from the drop down box.
Once you have selected a pattern, you can adjust it with the Node tool. When the node tool is
active and you have a patterned object selected, three small handles will appear, usually at the top
left corner of the page. The X is the origin of the pattern: you can drag it to shift the pattern. The
square controls the size, and the circle controls the orientation: drag them to scale or rotate the
pattern respectively.
To create a pattern, draw some shapes and select them, then use Object→Pattern→Objects to
Pattern. This will create a pattern, and replace the objects with a rectangle with that patter as a
fill; it should appear identical. You will also be able to select the new pattern in Fill and Stroke.
This is simple, but doesn’t provide full access to the capabilities of patterns in SVG graphics; for
that, you need to use the XML Editor, which is beyond the scope of this tutorial.

4 Path Effects

Path effects are modifiers you can attach to a path which will turn it into another path. I’ll just be
looking at Pattern Along Path as it is the most applicable to mapping. Pattern Along Path takes a
path, and bends it along another path.
As an example, consider a scalloped forest edge pattern and a closed path representing a forest. If
you want to wrap the forest pattern around the edge of the forest, you can use a path effect to do
so, see subsection 10.2 for a detailed description.
To open the Path Effects Editor, use Path→Path Effect Editor. . . or Ctrl+Shift+7. With the
path you wish to apply the effect to selected, choose an effect from the drop down box and then click
Add. This will add it to the list of effects. Since what comes out of a path effect is another path,
you can apply path effects on top of each other, and hence the list. The new effect will be selected
in the list, and the parameters to control it will be underneath.
In the case of Pattern Along Path there are several options.

3
(a) A railway (b) Hachuring, using two patterns (c) Tapered rivers
in sequence

Figure 2: Examples of path effects

Pattern source This is another path to wrap along the first. Edit on-canvas allows you to
edit the current pattern as if with the Node tool. Copy path copies the current pattern
to the clipboard. Paste path uses a copy of the path currently in the clipboard. Link
path also uses the path in the clipboard, but links to the actual path that was copied so any
changes to that original, will be reflected in the pattern.
Pattern copies This controls how the pattern is spread over the path. Single only uses one copy,
Repeated uses as many as will fit. Either can be stretched to fit the exact length of the path,
and will leave a gap otherwise.
Width This controls the width of the pattern. Increasing it makes the pattern spread further from
the path, and reducing it pulls it in closer to the path.
Spacing This is the space between repetitions of the pattern.
Offset This “shifts” the pattern. Tangent offset is along the path while normal offset is perpendicular
to the path.
Pattern is vertical Normally a pattern is assumed to be horizontal, but if your pattern is drawn
vertically, you can set this option.
Fuse nearby ends If this is 0, each repetition will be a separate subpath. Increasing it will cause
those subpaths to be joined together when they are within the specified distance.

4.1 Path Effects in Maps

Pattern Along Path can be used a great many different ways. Using a + as a pattern will produce
a common representation of a railway. (Figure 2(a)) Using a vertical line and adding some spacing
will produce an effect like Hachuring for representing topography. (Figure 2(b)) Specialized symbols
like subduction zones and cold fronts can also be made this way,
Setting the Shape parameter of the Pencil and Pen tools applies a predefined Pattern Along
Curve effect quickly an easily. The triangular patterns make for a quick and easy tapered river.
(Figure 2(c))

4
(a) Rivers make by pinching (b) Circles displaced with tweak

Figure 3: Examples of tweaking

5 Spray

The Spray tool creates copies or clones of an object scattered around like droplets from an aerosol
can. Any objects selected while you spray are used as templates and are mixed together randomly.
When the spray tool is selected, the tool options bar will let you choose to spray clones ( ), copies
( ), or to automatically combine sprayed shapes using Union ( ). The other options let you
control how the spray is distributed, and let you add random variations to the copies.
You may want to use the Unclump tool in Align and Distribute or the Restack extension
(See subsection 8.2) after spraying to get a more orderly arrangement.

5.1 Spray in Maps

If you draw just a few trees, Spray can turn them into an entire forest.

6 Tweak

The Tweak tool consists of a number of modes that perform various adjustments on paths and
other objects by brushing over them. It only applies to the objects that are currently selected.
Holding shift usually performs the opposite tweak: Shrink becomes Grow.
The first few options move, rotate, or scale objects. The next few let you push and pull on paths as
if they were putty. The last few let you adjust style such as colour, opacity and blur.
Tweak can be quite demanding on your processor, and sometimes produces glitches. It takes some
playing with to really understand, but it is very powerful.

6.1 Tweak in Maps

Tweak great for rivers and for generally giving an organic look to your work. (Figure 3(a)) If you want
to adjust the width of a line like a river with the Shrink mode, you’ll need to use Path→Stroke

5
to Path on it first.
The modes for moving objects can be useful for adjusting the results of the Spray tool.

7 Clipping and Masking

Clipping and masking are similar to the Intersect operation, but instead of creating a new shape,
they alter which parts of a shape are visible. This is most noticeable in strokes around edges.
Intersect will produce a new edge, while clipping and masking will cut off edges.
Clipping applies to two objects, one is the object to be clipped, and the other is a shape to ’cut
out’. The clipped object will be visible inside the clipping path, and invisible elsewhere. The clipped
object will still all be there and is still editable in its entirety, and can even be a group.
Masking works similarly but can take just about anything as a mask. Where the mask is white, the
masked object shows through, and where it is black, the object doesn’t show through. Grey partly
obscures it.
To apply clipping or masking, place the clipping/masking object over the target, select both, and use
Object→Clip→Set or Object→Mask→Set. Select the object and pick Object→Clip→Release
or Object→Mask→Release to turn it off.

7.1 Clipping and Masking in Maps

Clipping is useful to restrict the features of your map to just the map extent. Clipping a layer is
possible and rather handy for map making, but requires the use of the XML Editor to set up.

8 Extensions

Extensions are Inkscape’s plugin system, although it comes with a large selection pre-installed. They
are actually separate programs which take an Inkscape file, process it, and produce a modified version
out which Inkscape then loads, although all this takes place in the background. Some of them run
Inkscape repeatedly as part of their operation. As such, they can be quite slow and memory hungry,
particularly when working on large sets of data. Extensions can also be a bit buggy and can cause
Inkscape to hang or crash while they run; it’s a good idea to save before running one.

8.1 Fractalize

The Fractalize extension (Extensions→Modify Path→Fractalize) takes the selected paths, di-
vides their segments in half, perturbs the midpoint, and repeats. This produces a crinkly fractal
shape. (Figure 4(a)) You can control how many subdivisions are made, and how much crinkle is
added at each step. For best results you should try to make the segments of your paths about the
same length.

6
(a) Fractalizing a polygon (b) Restacking sprayed clones

Figure 4: Examples of extensions

8.2 Restack

The Restack extension (Extensions→Arrange→Restack) takes the selected objects and re-orders
them depthwise based on their position on the page. By default it puts those that are lower on the
page in front which works well for maps. This is useful to get the disorderly results of the Spray tool
arranged front to back as if they were standing on a plane viewed from an angle. (Figure 4(b))

9 Advanced Tools

These are some tools worth looking into once you have grasped the basics. Even an introduction is
beyond the scope of this tutorial.

9.1 Filter Effects

Filter effects are complex transformations that can be applied while the image is being rasterized
for display. The blending modes for layers and the blur slider are examples of filter effects that have
been wrapped up and made easy to use. Complex overlapping effects can be very slow, producing
a high quality, high resolution final output image can take minutes or hours, even on comparatively
new computers.
Inkscape comes with a large menu of filter effects ready to go, and an editor for altering them or
creating your own.

9.2 XML Editor

The XML editor lets you directly edit the SVG data model behind your image. This allows you to
make changes which Inkscape’s user interface doesn’t currently allow. Applying a clipping path or
filter effect to a layer, adjusting the parameters of a pattern, or hiding a clone template in the “defs”
section are typical tasks. To use it properly, you will need an understanding of the SVG language.

7
Setting up a Layer Structure (subsection 10.3) includes a step by step description of one simple use
for the XML editor.

10 Quick Tricks

These are some quick, mini tutorials to put the above tools and techniques to use. Try to use them
as a learning exercise rather than something to simply be followed by rote. Vary them, mix and
match techniques and try to put your own spin on them.

10.1 A Tree Symbol

This inked style tree symbol uses path effects, path manipulation, and the Tweak tool (section 6).
A collection of them would be useful for building a forest using Spray (section 5) and Restack
(subsection 8.2).

• Choose the Pen tool, and set Shape to Triangle In.

• Click where you want the base of your tree, then, holding Ctrl, click again a little ways above
it. This will force the path to go straight up.

• Release Ctrl and add several more nodes to the path going generally upward.

• Press Enter to finish the path. It should now look like Figure 5(a).

• Open the Path Effect Editor with Path→Path Effect Editor

• Adjust the with of the pattern. It should now look like Figure 5(b).

• Add branches using the Pen tool and setting their width the same way to get Figure 5(c).

• Select the trunk and all the branches and use Path→Object to Path to turn the path effects
into normal paths.

• With them still selected, choose Path→Union to weld them into a single path.

• Choose the Pencil tool and draw in the foliage to get Figure 5(d).

• Adjust the stroke width of the foliage shape.

• Use Path→Stroke to Path to get Figure 5(e).

• Use Path→Break Apart. This will break the path into two parts, the inner part, and the
outer part.

• Select the inner part and make it white so you can see it.

• Shift the inner part slightly in the direction the light is coming from. Up and to the left or up
and to the right. It should now look like Figure 5(f).

8
• Select the inner and outer shapes and Path→Combine to put them back together. If the
result is all white, change it to black so you can see it.

• With the combined foliage shape selected, choose the Tweak tool, and use the Shrink
mode. Remember that holding space will make it grow rather than shrink.

• Adjust the width of the foliage shape to give it a natural, inked look. This will take some
practice and adjustment of the width and force parameters.

• When you are satisfied, break the shape apart and colour the inner portion white again.
Figure 5(g)

• Select the trunk shape, and use Tweak again to give it a similarly organic appearance.
Push and Shrink will be useful. Figure 5(h)

• Use pencil to add some details to the foliage. If they aren’t quite right at first, use Tweak.
Figure 5(i)

• Select the whole thing and scale to your desired size, then group it.

(a) (b) (c) (d) (e) (f)

(g) (h) (i)

Figure 5: Building a tree symbol

Repeat to make as many symbols as you need. You may find it easier to work on several trees at
once. For a more fully covered tree with no visible branches, just draw the trunk and the foliage.
Conversely, for a dead tree, draw the branches, but not the foliage.

9
10.2 A Scalloped Edge Forest

This simple example of the Pattern Along Path path effect (section 4) turns an ordinary shape into
a stylized forest with a scalloped edge.

• Choose the Ellipse tool, and draw a horizontal line of overlapping circles. (Figure 6(a))

• Combine them with Path→Union. (Figure 6(b))

• Draw a Rectangle over the line of circles. Leave the tops exposed and connected.(Figure 6(c))

• Select both and use Path→Difference to remove the covered area. (Figure 6(d))

• Use the Node tool to delete the flat bottom edge of the resulting shape, leaving it open.
(Figure 6(e))

• Copy the pattern to the clipboard.

• Draw a closed path using the Pen or Pencil tools. (Figure 6(f))

• Open the Path Effect Editor with Path→Path Effect Editor. . .

• Add a new Pattern Along Path effect.

• For pattern source, choose Paste Path. This will use the pattern copied to the clipboard.
(Figure 6(g))

• For pattern copies, choose Repeated, stretched. (Figure 6(h))

• If it looks like Figure 6(i) instead of Figure 6(h), use Path→Reverse. This will reverse the
direction of the path, which will make the pattern wrap around it the other way.

• To join up the repeated segments, increase the “Fuse nearby ends” threshold. (Figure 6(j))

Try playing with the options like width, spacing, and offset to see how the affect the pattern. Try
drawing other paths as patterns too. If you want to apply the effect to other shapes, copy the shape
with the effect, select the others, and then press Ctrl+7.

10.3 Setting up a Layer Structure

Keeping the components of your map separate and organized can be a big help. Setting up your
Layers (section 1) is a major part of keeping your map organized and will allow you to easily work
with one part of your map whithout interference from other parts.

• Open the layer palette with Layer→Layers. . . .

• You should have one layer already, and it should be selected. Click on it to rename it and enter
“Ink”.

10
(a) (b) (c)

(d) (e) (f)

(g) (h) (i)

(j)

Figure 6: Building forest symbol

11
Ink
Cartouche
Border
Map
Graticule
Text
Cities
Roads
Forests
Lakes
Rivers
Mountains
Coastline
Paper
Figure 7: A basic layer tree

• Set the layer’s blending mode to Multiply.

• Add a layer bellow it called “Paper”.

• Add three sublayers to “Ink” and call them, from bottom to top: “Map”, “Border”, “Car-
touche”.

• Select “Map” and add the following sublayers, again from bottom to top: “Coastline”, “Moun-
tains”, “Rivers”, “Lakes”, “Forests”,“Roads”, “Cities”, “Text”, “Graticule”.

• You should now have a Layer tree that looks like Figure 7.

Now, at this point you have a basic layer structure that should serve you fairly well for a range of
typical fantasy maps. You can vary from this basic layout to suit your needs.
The “Paper” layer can be used if you want to include a textured or shaped material that your map is
drawn on. For a simple example, draw a rectangle here, fill it with a light colour or a paper pattern,
and lock the layer.
The “Ink” layer and its sublayers represent the actual drawn components of the map. If you want to
replicate multiple media, such as ink and watercolour, you might need to create them as additional
layers.
The “Cartouche” layer holds the “cartouche” or “shield” which contains the map’s title, authorship,
copyright, legend, scale, and other information about it. These components may instead be placed
outside the map’s extent, or on multiple cartouches in which case you may want to use a different
name, or multiple layers.
The “Border” layer holds the border or “neatline” surrounding the map extent.
The “Map” layer represents the “extent” of the map and its sublayers hold the various features that
make up the map.

12
The “Graticule” layer holds the grid of meridians and parallels covering the map. You might put
rhumb lines or some other similar aid at this level.
The “Text” layer holds labels for map features.
The remaining layers hold the actual features that make up the map. You can re-arrange them, add
further sublayers, add or remove them, and otherwise adapt them to your needs.
Given that the “Map” layer and its sublayers are not meant to stretch outside the “Border” layer,
you might want to apply a Clipping Path (section 7) to them. This is possible, but unfortunately
there is no interface for it, and so must be done with the XML Editor (subsection 9.2).

• Draw a shape, it can be anything.

• Draw a rectangle (Or other shape) representing the area you want for your map’s extent.
(Figure 8(a))

• Select both and use Object→Clip→Set. (Figure 8(b))

• With the clipped object still selected, open the XML Editor.

• In the editor, select the clip-path attribute.

• At the bottom right there is a box that will contain a string that looks something like
url(#clipPath...). Copy it to the clipboard. (Figure 9)

• In the tree display on the left of the editor look for the entry that contains inkscape:label="Map".
This is the “Map” layer. Select it.

• The right half of the editor will change to show the attributes of the layer.

• Go the the two text boxes at the lower right. In the first, enter clip-path, and in the second
paste the value you copied. (Figure 10)

• Click on Set to create the new attribute. The layer now has a clipping path.

• Close the editor and then delete the object you created and clipped.

The clipping now applies to the “Map” layer and all of its sublayers without having to be applied
individually to each object. Future versions of Inkscape may provide an easier way to do this.1

1
A feature request has been submitted to the Inkscape bug tracker here: https://bugs.launchpad.net/
inkscape/+bug/172123

13
(a) (b)

Figure 8: Creating the clipping path

Figure 9: The clipping path in the XML Editor

14
Figure 10: Pasting the clipping path onto the layer

15

S-ar putea să vă placă și