<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.wesnoth.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Max2008</id>
	<title>The Battle for Wesnoth Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.wesnoth.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Max2008"/>
	<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/Special:Contributions/Max2008"/>
	<updated>2026-05-06T03:44:33Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.16</generator>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=Smooth_shading_in_vector&amp;diff=54610</id>
		<title>Smooth shading in vector</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=Smooth_shading_in_vector&amp;diff=54610"/>
		<updated>2014-04-08T13:49:13Z</updated>

		<summary type="html">&lt;p&gt;Max2008: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;small&amp;gt;''Note: This tutorial was written for [http://www.inkscape.org Inkscape], but should be applicable for other vector drawing programs with similar functionality.''&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this tutorial we are going to learn few methods for making smooth shading in vector graphics. Shading is very important in bringing out the three-dimensional shape of objects, and combining Gaussian blur with clipping and masking brings much more power to accomplish it than mere gradients.&lt;br /&gt;
&lt;br /&gt;
The important part with blurring to keep in mind is that the colour transition function is different than in gradients. Gradients have a linear transition (between any two stops), while in blurred objects it is S-shaped. What the difference means in practice is that even if a gradient goes all the way down to full transparency/background colour, it will still produce a distinct egde (top left in the image below). The blurred object, on the other hand, will have truly fuzzy edge (top right). It also makes a difference whether an object that is both blurred and transformed is first blurred or transformed. Bottom left is a square that has first been blurred and then scaled vertically down 50%. Bottom left is the same square, but it is first scaled and then blurred.&lt;br /&gt;
&lt;br /&gt;
http://wesnoth.org/wiki-images/smooth-vector/tutorial7.png&lt;br /&gt;
&lt;br /&gt;
The order is different when an object is both blurred and clipped/masked. In that case the blurring is always done first, and for that reason you can use clipping/masking to create objects with some edges sharp and some blurred. If you want the object to be blurred after clipping/masking, you have to put it in a group, and clip/mask the group (in Inkscape, you can't group single object, so you have to create a dummy object, group it with the real object, CRTL-select the dummy and remove it). &lt;br /&gt;
&lt;br /&gt;
Let's start with a very simple example, a sphere. You probably already know how to do a shaded sphere with radial gradient, so here's another kind of method: First make a circle and fill it with the colour of the shadow side (1). Make a copy of it in the lighted side colour (lighter and more saturated version of the shadow colour), move it toward the light source (here up and to the left) and blur it (2). Make another copy of the original circle and use it as a clip path on the blurred circle. You'll see that the clipping cut off all the &amp;quot;leaking&amp;quot; blurriness, and the rest will make a nice smooth shading on the sphere. Let's make a shadow for the sphere too, while we're at it: First make a circle of the shadow colour and blur it (4) (it's most often a good idea to make the shadow as it looks from the above, and use transformations to bring it into right perspective). Real live shadows have the quirky property that their blurriness depends on the distance from the object casting them. The blur radius of gaussian blur filter is the same everywhere, but we can fake the effect with a mask. Make another circle, somewhat bigger than the shadow, white in fill colour and blur it, but less than you blurred the shadow (5). Use this as a mask on the shadow and you get nice variably blurred shape (6). With little scaling and rotating it looks good to go under the sphere (7).&lt;br /&gt;
&lt;br /&gt;
http://wesnoth.org/wiki-images/smooth-vector/tutorial5.png&lt;br /&gt;
&lt;br /&gt;
For a sphere you could have made a decent shading with radial gradient as well, but this approach works with other kind of shapes too. Sometimes you can also use the blurred path to make the shadow side, like in the image below.&lt;br /&gt;
&lt;br /&gt;
http://wesnoth.org/wiki-images/smooth-vector/tutorial6.png&lt;br /&gt;
&lt;br /&gt;
You can also use several blurred paths for shading, like below. The middle lightness (clipped) path was made by copying the original path, and the lightest one by making a linked offset (left). When both are blurred (with different blur radius) they result in a bit glossier surface than in the sphere example (middle). The technique works pretty well even for such odd shape, but it's not perfect. That's OK, there's nothing stopping you from editing the blurred paths, like has been done with the rightmost image (you will have to do &amp;quot;Path -&amp;gt; Object to Path&amp;quot; for the linked offset in order to node edit it). If you use a clone of the base path for clipping, you can still easily edit the base path after shading, because the clip path updates automatically.&lt;br /&gt;
&lt;br /&gt;
http://wesnoth.org/wiki-images/smooth-vector/tutorial11.png&lt;br /&gt;
&lt;br /&gt;
The above approach works best with smooth, organig shapes, but blurring can come handy when doing edgy shapes with flat shading. In the image below the edges are made smoother and more real life-like by a bit of blurring.&lt;br /&gt;
&lt;br /&gt;
http://wesnoth.org/wiki-images/smooth-vector/tutorial8.png&lt;br /&gt;
&lt;br /&gt;
Usually clipping/masking is uset to get rid of the &amp;quot;leaking&amp;quot; blurriness outside the path, but the &amp;quot;leaking&amp;quot; can also be used to one's advantage. In the image below there is a circle with a bigger one around it, a hole being cut in it's middle the size of the smaller circle. The bigger circle has been filled with a gradient (1). When the bigger circle is blurred, the blur will leak over the smaller one (2). When a copy of the small circle is used as a clip path on the bigger one, only the leak is left visible, creating a shading on the small circle (3). When a bigger blur radius is used, the shape changes from flat, button type one, to rounder one (4).  &lt;br /&gt;
&lt;br /&gt;
http://wesnoth.org/wiki-images/smooth-vector/tutorial9.png&lt;br /&gt;
&lt;br /&gt;
Here's one more variation of these techniques, to produce a flat, paint splash type shape. First make the base path (1). Make a copy of it in darker, less saturated colour and move toward the shadow side (1). use a copy of the base bath to cut off (&amp;quot;Path -&amp;gt; Difference&amp;quot;) parts of the shadow path and move back a bit (3). Blur the shadow path (4). Following the same procedure, create the highlight path (lighter more saturated, on the opposite side) (5). Clip both the blurred paths with a clone of the base path (6).&lt;br /&gt;
&lt;br /&gt;
http://wesnoth.org/wiki-images/smooth-vector/tutorial10.png&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
&lt;br /&gt;
Here's some links to similar tutorials:&lt;br /&gt;
* More [http://howto.nicubunu.ro/inkscape_blur_orbs_3d_text/ blur shading] from Nicu (her other tutorials are also worth checking out)&lt;br /&gt;
* Awesome [http://www.inkscape.org/screenshots/gallery/inkscape-0.45-3D-rope.png &amp;quot;interactive&amp;quot; 3-d rope], demonstrating the power of clones&lt;br /&gt;
* Fairly complex [http://troy-sobotka.blogspot.com/2007/11/inkscape-tutorial-1-chrome-effect.html &amp;quot;chrome&amp;quot; text effect], where the text can be changed and the effect updates&lt;br /&gt;
* [http://chrisdesign.wordpress.com/2008/02/14/simple-metal-orb-using-gradients/ Realistic metal shading] made with multi-stop gradients&lt;br /&gt;
&lt;br /&gt;
[[Category: Art Tutorials]]&lt;/div&gt;</summary>
		<author><name>Max2008</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=Z-order_tricks&amp;diff=54609</id>
		<title>Z-order tricks</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=Z-order_tricks&amp;diff=54609"/>
		<updated>2014-04-08T08:31:11Z</updated>

		<summary type="html">&lt;p&gt;Max2008: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;small&amp;gt;''Note: This tutorial was written for [http://www.inkscape.org Inkscape], but should be applicable for other vector drawing programs with similar functionality.''&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In a vector image, every object (path, rectangle, piece of text, etc) has a position in the x-y plane, but it also has a position in the depth dimension. If you think the objects as paper cut-outs, any time two of them overlap, one must be on top of the other. Similarily, each object in a vector image occupy a slot in the z-order, which dictates which object appears on top of which (the difference to paper cut-outs is that they retain their z-position even when they are not overlapping in x-y space). You can always rearrange the z-order of your objects, within certain limits. For example, when you group objects, they retain their relative z-order to each other, but no object outside the group can occupy a z-slot between the ingroup objects.&lt;br /&gt;
&lt;br /&gt;
You can use the z-ordering to you advantage, when you want areas of different colour to appear next to each other without a gap in between. As with paper cut-outs, the simplest way to do this is just to make one area to expand a bit under the other. This has the benefit that you can later adjust the positions of the paths without a gap appearing.&lt;br /&gt;
&lt;br /&gt;
This approach is not possible in all situations, however. One common situation is where you have objects with a circular z-order: Object A covering part of object B, which covers part of object C, which in turn covers part of object A. In a vector image, the z-order is always linear, and to achieve the appearance of circular z-order, we need some trickery, the tools for wich are found in the Path menu.&lt;br /&gt;
&lt;br /&gt;
In the image below we have an illustration of the problem. We want three ellipses of different colours stacked circularily as in top right, but with a linear z-order, the top left is best we can do. We can't put the red ellipse under the yellow one without putting it also below the green one, because that is on top of the yellow.&lt;br /&gt;
&lt;br /&gt;
http://wesnoth.org/wiki-images/z-tricks/burgshot13.png&lt;br /&gt;
&lt;br /&gt;
In order to achieve the desired effect, we need to cut off a piece out of the red ellipse that corresponds to the part that would be under the yellow one. To do this, you will first select the yellow ellipse, do &amp;quot;Edit -&amp;gt; Copy&amp;quot; and &amp;quot;Edit -&amp;gt; Paste in place.&amp;quot; This will result in a copy of the yellow ellipse in exactly the same place. Then select both the copy and the the red one, and do &amp;quot;Path -&amp;gt; Difference&amp;quot;, which will remove from the red ellipse the area overlapping the yellow one. In the bottom image is a copy of of the ellipses, with the red one moved outwards to show how it's shape is changed. This also demonstrates the drawback of the method: After you have matched the edges, you can't move the paths in relation to each other without breaking the alignement.&lt;br /&gt;
&lt;br /&gt;
There is another, a bit more complex way to do this operation, which will allow the paths to be edited or moved without breaking the alignment. First select the red path and make &amp;quot;Path -&amp;gt; Linked Offset&amp;quot;, creating a copy of that will change when the original is changed. Raise it to the top and change its fill colour to white. Do the same for the yellow path, but change its colour to black. Select both linked offsets and group them. Select both the group and the red path, and do &amp;quot;Object -&amp;gt; Mask -&amp;gt; Set.&amp;quot; After this operation the red path is masked with its own linked copy in white, combined a linked copy of the yellow path in black. The result is that the red path is always invisible where it overlaps the yellow one. You can edit the nodes of either path, and the mask is updated as well. You should note, however, that when a masked object is transformed (moved, scaled, etc.), the transformation is also applied to the mask, which is not desireable in our case. So if you want to do transformations on the red path, disable the mask first, do the transformation and reapply the mask (you can move it in node editing mode without this hassle, though, by simply selecting all the nodes).&lt;br /&gt;
&lt;br /&gt;
[http://tavmjong.free.fr/INKSCAPE/MANUAL/html/Paths-Combining.html Here]  is a summary of the path operations and how they work. They can be incredibly powerful once you learn how to use them creatively.&lt;br /&gt;
&lt;br /&gt;
Let's now look at one more, a bit trickier case. Sometimes you can have a circular z-order between ''two'' objects. A good example is Saturn and it's rings, coming from behind the planet and then going over it. We see it in the image below, bottom right is our goal, and top left are the original paths, created with the ellipse tool (now you should already know how to cut the &amp;quot;hole&amp;quot; in the blue one).&lt;br /&gt;
&lt;br /&gt;
http://wesnoth.org/wiki-images/z-tricks/burgshot5.png&lt;br /&gt;
&lt;br /&gt;
We know that we can use a copy of the red path to cut off the part of the blue one that should be eclipsed, but how do we do that without cutting off the part that is supposed to eclipse the red path? First make &amp;quot;Edit -&amp;gt; copy&amp;quot; and &amp;quot;Edit -&amp;gt; Paste in place&amp;quot; for the red path and select this copy and the blue path. But then, instead of the &amp;quot;Path -&amp;gt; Difference&amp;quot; do &amp;quot;Path -&amp;gt; Division&amp;quot;, which will cut the blue path into several paths along the red path's edge, but leave them all in place (top right). One of the parts corresponds to the section that should be covered by the red path (bottom left). Select this path and delete it. The remaining paths now make up the part that should be visible, but it is still divided into separate paths. Select them all and do &amp;quot;Path -&amp;gt; Union,&amp;quot; which will fuse them back into one path again.&lt;br /&gt;
&lt;br /&gt;
[[Category: Art Tutorials]]&lt;/div&gt;</summary>
		<author><name>Max2008</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=Vector_Inking&amp;diff=54608</id>
		<title>Vector Inking</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=Vector_Inking&amp;diff=54608"/>
		<updated>2014-04-08T08:30:29Z</updated>

		<summary type="html">&lt;p&gt;Max2008: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In art, the term &amp;quot;inking&amp;quot; refers to making a clearly defined lineart from a sketch. The term derives from the ink pens used for this purpose in dead-tree drawing, and the term has transitioned into digital art as well.&lt;br /&gt;
&lt;br /&gt;
Usually the inked lineart is wanted as solid and sharp-edged, and for this vector programs suit well. The added bonus of lineart in vector is that they are freely scalable to any size without loss of resolution. Vector linart can be combined with colouring and shading done in raster by rendering the lineart into raster in desired resolution.&lt;br /&gt;
&lt;br /&gt;
In this tutorial the free vector drawing program [http://www.inkscape.org Inkscape] is used, though many other programs have similar functionality. The tutorial also presumes the version 0.46, the latest stable one, for some specific tools. Basic knowledge of Inkscape's functionality and user interface is expected. Several alternative approaches will be discussed, some of them requiring a tablet, some not.&lt;br /&gt;
&lt;br /&gt;
For all methods you first need the sketch image imported into Inkscape. Put it in its own layer and set the [http://tavmjong.free.fr/INKSCAPE/MANUAL_v14Draft/html/Filters-Compositing.html#Filters-Blend blend mode] of the layer to &amp;quot;Multiply&amp;quot; and then lock the layer. This way, when you draw everything else on a layer under the sketch layer, the white parts of the sketch appear transparent and the lines are not covered by what you draw. Toggling the visibility of the sketch layer allows you to check how the drawing is coming along. &lt;br /&gt;
&lt;br /&gt;
== Calligraphy ==&lt;br /&gt;
&lt;br /&gt;
The most obvious and intuitive way to ink is by using the [http://tavmjong.free.fr/INKSCAPE/MANUAL_v14Draft/html/Paths-Creating.html#Paths-Calligraphy calligraphy tool]. Generally you'll want to set the thinning fixation to 0 so that the line width is determined by the tablet pressure alone. The &amp;quot;mass&amp;quot; property allows you to set the &amp;quot;inertia&amp;quot; of the pen, stabilising the stroke. The calligraphy tool produces paths with lots of nodes, but the node count can usually reduced greatly by simplifying the paths with CTRL-L (&amp;quot;Path -&amp;gt; Simplify&amp;quot;) without changing the shape too much (you can set the simplifying treshold in the preferences menu if it simplifies too strongly). As a general rule, you should always simplify paths produced with such tools as calligraphy and tracing, because the lower node count means smaller file and better UI responsiveness, but also makes tweaking by node editing much easier. You can simplify all the strokes at once simply by selecting them all and hitting CTRL-L, and the operation will be done for each path separately. If you intend to fuse the strokes together into one path with &amp;quot;Path -&amp;gt; Union&amp;quot;, you should do the simplifying ''first'' to avoid the rounding of the sharp corners in the stroke intersections.&lt;br /&gt;
&lt;br /&gt;
== Bezier tracing with the mouse ==&lt;br /&gt;
&lt;br /&gt;
The problem with calligraphy tool is that in practice it is only useful when used with a tablet (in theory you can change the line width with arrow keys while drawing with mouse, but this is very cumbersome). If you only have a mouse, you can trace the lines with the [http://tavmjong.free.fr/INKSCAPE/MANUAL_v14Draft/html/Paths-Creating.html#Paths-Bezier bezier tool], set the stroke width to the desired average for each line, do &amp;quot;[http://tavmjong.free.fr/INKSCAPE/MANUAL_v14Draft/html/Paths-Creating.html#Stroke-To-Path Path -&amp;gt; Stroke to Path]&amp;quot; and then tweak the line widths by node editing or the new [http://tavmjong.free.fr/INKSCAPE/MANUAL_v14Draft/html/Tweak.html Tweak tool].&lt;br /&gt;
&lt;br /&gt;
There are to ways to trace with the mouse, with the [http://tavmjong.free.fr/INKSCAPE/MANUAL_v14Draft/html/Paths-Creating.html#Paths-Freehand freehand tool], where you move the cursor along the line and nodes are created on the fly, or the bezier tool, where you set the nodes explicitly. If you have a tablet and a very steady hand, you can manage with the freehand tool, but otherwise the bezier is better. The good thing about the bezier tool is that you end up with relatively few nodes, which keeps the file size smaller and makes later editing of the paths easier. Beginners usually make the beziers by first making an approximating polygon, and then coming back to round the corners. This is most inefficient, a faster and equally easy (after a bit of practice) way is the &amp;quot;tangential sweep.&amp;quot; Follow the line and whenever there is a sharp corner, click on it without dragging. In between, click and drag tangentially to the line in few points along the curving line. You learn by practice where to place the sweep points. If there is a straight line between to corners, you don't need to put any nodes there.&lt;br /&gt;
&lt;br /&gt;
Once you have the paths in place and the &amp;quot;Stroke to Path&amp;quot; applied, you must tweak the line widths to give them a more lively look. Before you go for the tweak tool, there is a quick and dirty method worth trying. By selecting all the nodes on one side of the line (or inner/outer subpath of a closed line) and then moving them a bit it's possible to create line width variation for the whole line. The image below illustrates this, on both examples the selected nodes have been moved slightly upwards (to select the nodes on one side of the line, hover the mouse over a node in the middle of the would-be selection, press down Control and use the mouse wheel (or PgUp and PgDown) to increase/decrease the selection. To select all the nodes of a subpath, select one of them and press Ctrl-A). This method often doesn't make the line widths exactly like you want them, but often it's a handy way to do the bulk of the work, completed by little tweaking here and there.&lt;br /&gt;
&lt;br /&gt;
http://wesnoth.org/wiki-images/vector-ink/ink3.png&lt;br /&gt;
&lt;br /&gt;
The first thing you probably want to do with the tweak tool is to make the free ends of lines sharply tapering instead of round or square. The weak tool does this nicely, but it will also shorten the line a bit. You can lengthen the line back by node editing, or you can just anticipate this effect and always put the ends of the lines a bit further that what they are supposed to be when you are doing the tracing.&lt;br /&gt;
&lt;br /&gt;
One thing to know about the tweak tool is that it will operate on ''all'' the nodes of the path, not only the ones under the cursor, and if the path is complex, the tool may become poorly responsive. Simplifying the path will help, as will cutting the subpaths into separate paths (you can keep several paths editable by the tweak tool simultaneously by selecting them all). Also, if you intend to combine several strokes into one path by the Union path operation, you should do all the tweaking first.&lt;br /&gt;
&lt;br /&gt;
== Inkless inking ==&lt;br /&gt;
&lt;br /&gt;
If you have done digital inking before for images that are also coloured, you may have run into the problem that you are forced to trace much of the linework twice &amp;amp;mdash; once for the lines and second time for the colour flats. The new [http://tavmjong.free.fr/INKSCAPE/MANUAL_v14Draft/html/Bucket.html Paint bucket tool] of the 0.46 version of Inkscape will help a lot, but there is another way to skip the double work. You simply trace the colour flats and leave gaps in between them. With a dark background the gaps will look like lines.&lt;br /&gt;
&lt;br /&gt;
I know what you are thinking: If you have flats with gaps in between, don't you still need to trace the lines twice, once for each side of the gap? Not if you make a silhouette of the whole object first, then trace the flats, cut them off the silhouette with &amp;quot;[http://tavmjong.free.fr/INKSCAPE/MANUAL_v14Draft/html/Paths-Combining.html Path -&amp;gt; Division]&amp;quot; and in the end shrink all the flats with &amp;quot;[http://tavmjong.free.fr/INKSCAPE/MANUAL_v14Draft/html/Paths-Editing.html#Paths-Offsets Path -&amp;gt; Inset.]&amp;quot; The procedure is illustrated in the image below. On top left is a sketch of a pitcher. On top middle the outer edge has been traced with path set to dark grey. On top right a copy of the outline path has been created (light gray) and one of the flats has bee traced, filled with red. Notice that the outer edge has been traced already, so the red path needs to siply surround these lines. Both the red and the light grey paths are selected and &amp;quot;Path -&amp;gt; Division&amp;quot; is applied. This will cut the grey path into two pieces, following the red path's edge. &lt;br /&gt;
&lt;br /&gt;
On bottom left the tracing and division has been done to all the flats (the edges of the flats actually align perfectly, the lines you see are rendering artifacts). On bottom middle &amp;quot;Path -&amp;gt; Inset&amp;quot; has been applied to all the flats. The dark lines are the gaps between the flats, showing the dark outline path underneath. These gaps can be tweaked as any paths, but notice that the thinning operation will thicken them and the thickening will thin, since you are operating on the ''surrounding'' paths, not the gaps themselves! In the final picture the gaps have been tweaked to create width variation and to correct some flaws, the flats have been shaded with gradients and a shadow has been made from a copy of the outline path by skewing and blurring. &lt;br /&gt;
&lt;br /&gt;
http://wesnoth.org/wiki-images/vector-ink/ink22.png&lt;br /&gt;
&lt;br /&gt;
== Automatic tracing ==&lt;br /&gt;
&lt;br /&gt;
If you already have a raster version of your linart you can trace it into vector form automatically. If you have [http://potrace.sourceforge.net/ Potrace] installed on your system, you can use them directly from Inkscape (&amp;quot;[http://tavmjong.free.fr/INKSCAPE/MANUAL_v14Draft/html/Trace.html Path -&amp;gt; Trace Bitmap]&amp;quot;). Scanned drawings often need some preprocessing in a raster program for a better result, such as increasing contrast, removing spots, smudges and other defects, etc. You can also do the tracing in the raster program &amp;amp;mdash; for example in GIMP you can save paths, which are essentially bezier curves, in SVG format. Create the path by creating a selection, with the Magic wand or Select by Color tool, which contains all the pixels you consider to be within the lines, do &amp;quot;Select -&amp;gt; To Path&amp;quot; and after this, in the Paths dialog, choose &amp;quot;Export Path.&amp;quot; The result is a SVG file that you can open in Inkscape.&lt;br /&gt;
&lt;br /&gt;
As mentioned in the beginning, having lineart in vector format means that you can scale it up without loss of resolution. In the picture below the small image on top has been rendered from a path. The bottom right image is the same scaled up 300%. Even with cubic interpolation the pixellation of the original image is visible, and the edges have become fuzzy. The bottom left image has been scaled up as a path, and rendered after the scaling. It's edges are every bit as smooth and sharp as the original's.&lt;br /&gt;
&lt;br /&gt;
http://wesnoth.org/wiki-images/vector-ink/ink5.png&lt;br /&gt;
&lt;br /&gt;
Even rerendering in same scale often has an enhancing effect. In the picture below, the top left image has been drawn with a sharp-edged brush without anti-aliasing, resulting in ugly jagginess. The image left is the same, traced into vector and rerendered in same scale. The result is smooth and properly antialiased. The bottom left image has been drawn with a fuzzy brush and the result is also fuzzy. Rerendering has sharpened the image and also cleared some line unstability.&lt;br /&gt;
&lt;br /&gt;
http://wesnoth.org/wiki-images/vector-ink/ink7.png&lt;br /&gt;
&lt;br /&gt;
== Combining vector and raster ==&lt;br /&gt;
&lt;br /&gt;
While vector grapichs are good for lineart, many shading styles, especially more painting-oriented ones, work better in raster. Once you have the lineart in vector, you can render it in raster at the definition you are going to make the shading with and import it into the raster program as a layer. Inkscape even lets you save the files directly in GIMP's XCF format. Everything is rendered into raster and the layer structure of the Inkscape file is transferred into GIMP layers. On the other hand, you can also import SVG files into GIMP as paths and render them there by changing the path into a selection and bucket-filling it. This approach has the benefit that the lineart remains as a path in the GIMP file, and if you decide to scale the image up later, you can use the path to rerender the lineart and thus keep it sharp (the colour layers, not depending on sharp transitions between colours, handle scaling up much better than lineart).&lt;br /&gt;
&lt;br /&gt;
== The stroked skeleton ==&lt;br /&gt;
&lt;br /&gt;
One more interesting and potentially expressive way to do the inking is by first creating a &amp;quot;skeleton&amp;quot; of the linework and then applying a stroking on it by using the &amp;quot;Pattern along Path&amp;quot; [http://tavmjong.free.fr/INKSCAPE/MANUAL_v14Draft/html/Effects-GenerateFromPath.html#Effects-PatternAlongPath Effect] or [http://tavmjong.free.fr/INKSCAPE/MANUAL_v14Draft/html/Paths-LivePathEffects.html#Paths-LivePathEffects-PatternAlongPath Life Path Effect] (the same tool exist in both menus, with some minor differences). The skeleton consists of a set of paths (or subpaths) each indicating the shape and direction of one brushstroke. A path (or more complex object) is then used as a &amp;quot;brush&amp;quot; and applied to the skeleton paths. In the picture below the top (red) object is the skeleton and the rest are different renderings of it with different brushes (the brush used is next to each version). You can see how the shape of the brush results in very different looks: the middle left looks like it was drawn with a felt-tip pen, the middle right looks like a pencil sketch, bottom left was painted with a solid, wet brush and the bottom right with a coarse, dry one.&lt;br /&gt;
&lt;br /&gt;
http://wesnoth.org/wiki-images/vector-ink/ink1.png&lt;br /&gt;
&lt;br /&gt;
Automated tools like this rarely result in a perfect image, but with a little practice you should able to most of the work with it and complete the image by hand editing. Also, this method lets you easily make different versions of the same image for different purposes. Once you have the skeleton in place trying out different brushes in very easy (if you are using it from the LPE menu, any changes in the brush are updated in the rendered image immediately!) From the above image you can see that the strokes of different length can have a very different look, due to the stretching. One step to improve the method would be to divide the subpaths on the skeleton into groups by length (and possibly by role, that is whether they are part of the outlines or the shading) and use different brushes on them.&lt;br /&gt;
&lt;br /&gt;
== More automated methods ==&lt;br /&gt;
&lt;br /&gt;
If your linework is supposed to include aspects of shading, made by hatching or stippling, there are further tools to create them automatically by applying multiple copies of patterns or brushes in a controlled manner. Complex hatching can be created by the [http://tavmjong.free.fr/INKSCAPE/MANUAL_v14Draft/html/Paths-LivePathEffects.html#Paths-LivePathEffects-StitchSubPaths Stitch subpaths] LPE or the [http://tavmjong.free.fr/INKSCAPE/MANUAL_v14Draft/html/Effects-GenerateFromPath.html#Effects-Interpolate Interpolate Effect], further edited by the tweak tool. As a new feature in the 0.46 version, the calligraphy tool can be used with a [http://tavmjong.free.fr/INKSCAPE/MANUAL_v14Draft/html/Paths-Creating.html#Paths-Calligraphy-Hatchings guide path], meaking drawing parallel lines much easier. Also, the trace background feature can be use to make the hatching line thickness follow a preset shading pattern. For stippling, the [http://tavmjong.free.fr/INKSCAPE/MANUAL_v14Draft/html/Tiles.html Tile clones tool] with its [http://tavmjong.free.fr/INKSCAPE/MANUAL_v14Draft/html/Spheres-Dots.html trace background feature] may be the most useful.&lt;br /&gt;
&lt;br /&gt;
[[Category:Art Tutorials]]&lt;/div&gt;</summary>
		<author><name>Max2008</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=Variable-width_strokes&amp;diff=54607</id>
		<title>Variable-width strokes</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=Variable-width_strokes&amp;diff=54607"/>
		<updated>2014-04-08T08:28:40Z</updated>

		<summary type="html">&lt;p&gt;Max2008: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;small&amp;gt;''Note: This tutorial was written for [http://www.inkscape.org Inkscape], but should be applicable for other vector drawing programs with similar functionality.''&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In SVG the strokes are always constant in width. This is good for diagrams, but makes drawings look too formal and dull. Variable width outlines can be made with the calligraphy tool, but it requires a tablet and a relatively steady hand. The drawback of this kind of lines also is that if you decide to change the shape of the underlying colour flat, you have to redraw the outline.&lt;br /&gt;
&lt;br /&gt;
Howerer, with a little trickery it's possible to create variable width outline easily for a path of any shape that behaves like the normal strokes, that is, when you change the shape of the path, the shape of the outline is updated as well.&lt;br /&gt;
&lt;br /&gt;
The process is outlined in the image below:&lt;br /&gt;
&lt;br /&gt;
http://wesnoth.org/wiki-images/stroke-width/tutorial1.png&lt;br /&gt;
&lt;br /&gt;
# Create your path with any tool you like. Set the stroke fill to none&lt;br /&gt;
# From &amp;quot;Path -&amp;gt; Linked Offset&amp;quot; create a path whose size (and shape) is linked to the original path, ''but do not change its size''. Raise this path to the top, set its fill colour to none and the stroke colour to the desired value (here it is black with reduced opacity, so that it will always show as a darker shade of the flat colour). Set the stroke width to about the sum of thinnest and thickest lines you desire.&lt;br /&gt;
# Move the outline path slightly to the direction you want the thinnest parts of the outline to be (here it is moved left and up). The original path should stay completely within the outline path.&lt;br /&gt;
# Make a clone of the original path and use that as a clip path on the outline path. This will make invisible the parts of the outline path that lie outside the original path.&lt;br /&gt;
&lt;br /&gt;
Now you have an outline that will adjust to any changes in the size or shape of the original path, and whose thickness is determined by the path normal. You can use gradient fills for the line and line styles, like dotted line etc., but remember that only the inside half of the line is visible (normal strokes lie half outside and half inside of the path).&lt;br /&gt;
&lt;br /&gt;
The downside of this method is that the line thickness and shape are determined automatically and are not always exactly what you would want. To make the outline more editable, select it and first do &amp;quot;Path -&amp;gt; Object to Path&amp;quot; and then &amp;quot;Path -&amp;gt; Stroke to Path&amp;quot;. The inner egde of the outline path is now a subpath that you can edit as you whish, but the line isn't linked to the original path anymore, and so doesn't keep up with any of its major changes. It's still clipped by the clone of the original path, so it will adjust to small tweakings.&lt;br /&gt;
&lt;br /&gt;
[[Category: Art Tutorials]]&lt;/div&gt;</summary>
		<author><name>Max2008</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=Using_the_Levels_Adjustment&amp;diff=54606</id>
		<title>Using the Levels Adjustment</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=Using_the_Levels_Adjustment&amp;diff=54606"/>
		<updated>2014-04-08T08:28:13Z</updated>

		<summary type="html">&lt;p&gt;Max2008: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &amp;quot;Levels Adjustment&amp;quot; is divided into two modifications that it applies to an image - input and output.&lt;br /&gt;
&lt;br /&gt;
===Input:===&lt;br /&gt;
Input reinterprets what comes in - it is used to, for example, correct a pencil drawing that should have been black lines on white paper, but scanned in as dark grey lines on light grey paper.  The levels filter can stretch the luminosity (aka brightness) levels of this drawing into being black lines on white paper.&lt;br /&gt;
&lt;br /&gt;
The rightmost slider controls what color, from the source image, to treat as &amp;quot;jet black&amp;quot;.  If your pencil lines, which were supposed to be jet black, came out as only dark grey, then you can use this to put &amp;quot;where black starts&amp;quot; just above the darkness of the lines.  This makes the lines, and everything darker than they are, jet black.&lt;br /&gt;
&lt;br /&gt;
The leftmost slider does the exact same thing in reverse, it's used to make everything above a certain luminosity white.  This is used most commonly to chop off all the noise and texture of the paper and make it pure white.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The middle slider is a coefficient, or a &amp;quot;multiplier&amp;quot;, and this means it behaves very differently than the other two.  You can use the middle slider as a very crude alternative to the &amp;quot;curves adjustment&amp;quot; (and it is in fact good training for understanding what the heck the &amp;quot;curves adjustment&amp;quot; does, which isn't exactly intuitive).  Simply put, the middle slider bends all the in-between shades towards either the light or dark side of the drawing - anything above it gets made light, anything below it gets made dark, and the further these are from it, the greater the effect is.  Thus, if you drag it over to the far right, all of the lines will become rather dark, and if you drag it over to the far left, everything will become very light and washed out.&lt;br /&gt;
&lt;br /&gt;
This can be used to adjust the contrast of your lines - it can adjust how rapidly lines fade out.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Output:===&lt;br /&gt;
The output is simple - the two sliders set how dark the darkest dark is in the final picture, and how bright the brightest bright is.  If you leave them both at the ends, things will range from black to white.  If, for example the bottom slider were moved halfways up, nothing in the final picture would ever look brighter than 50% grey.&lt;br /&gt;
&lt;br /&gt;
Other than deliberately washing out pictures, this doesn't have a lot of uses for line art.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Example:===&lt;br /&gt;
In the following image, we used only the input adjustment.  The white of the paper was brightened to white, and the dark was darkened to black.  This isn't exactly the best demo image, since it was badly scanned in the first place, and because it was heavily JPG compressed before I got to it.&lt;br /&gt;
&lt;br /&gt;
http://wesnoth.org/wiki-images/levels/levels_214.png&lt;br /&gt;
&lt;br /&gt;
[[Category: Art Tutorials]]&lt;/div&gt;</summary>
		<author><name>Max2008</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=Smooth_shading_in_vector&amp;diff=54605</id>
		<title>Smooth shading in vector</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=Smooth_shading_in_vector&amp;diff=54605"/>
		<updated>2014-04-08T08:27:09Z</updated>

		<summary type="html">&lt;p&gt;Max2008: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;small&amp;gt;''Note: This tutorial was written for [http://www.inkscape.org Inkscape], but should be applicable for other vector drawing programs with similar functionality.''&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this tutorial we are going to learn few methods for making smooth shading in vector graphics. Shading is very important in bringing out the three-dimensional shape of objects, and combining Gaussian blur with clipping and masking brings much more power to accomplish it than mere gradients.&lt;br /&gt;
&lt;br /&gt;
The important part with blurring to keep in mind is that the colour transition function is different than in gradients. Gradients have a linear transition (between any two stops), while in blurred objects it is S-shaped. What the difference means in practice is that even if a gradient goes all the way down to full transparency/background colour, it will still produce a distinct egde (top left in the image below). The blurred object, on the other hand, will have truly fuzzy edge (top right). It also makes a difference whether an object that is both blurred and transformed is first blurred or transformed. Bottom left is a square that has first been blurred and then scaled vertically down 50%. Bottom left is the same square, but it is first scaled and then blurred.&lt;br /&gt;
&lt;br /&gt;
http://wesnoth.org/wiki-images/smooth-vector/tutorial7.png&lt;br /&gt;
&lt;br /&gt;
The order is different when an object is both blurred and clipped/masked. In that case the blurring is always done first, and for that reason you can use clipping/masking to create objects with some edges sharp and some blurred. If you want the object to be blurred after clipping/masking, you have to put it in a group, and clip/mask the group (in Inkscape, you can't group single object, so you have to create a dummy object, group it with the real object, CRTL-select the dummy and remove it). &lt;br /&gt;
&lt;br /&gt;
Let's start with a very simple example, a sphere. You probably already know how to do a shaded sphere with radial gradient, so here's another kind of method: First make a circle and fill it with the colour of the shadow side (1). Make a copy of it in the lighted side colour (lighter and more saturated version of the shadow colour), move it toward the light source (here up and to the left) and blur it (2). Make another copy of the original circle and use it as a clip path on the blurred circle. You'll see that the clipping cut off all the &amp;quot;leaking&amp;quot; blurriness, and the rest will make a nice smooth shading on the sphere. Let's make a shadow for the sphere too, while we're at it: First make a circle of the shadow colour and blur it (4) (it's most often a good idea to make the shadow as it looks from the above, and use transformations to bring it into right perspective). Real live shadows have the quirky property that their blurriness depends on the distance from the object casting them. The blur radius of gaussian blur filter is the same everywhere, but we can fake the effect with a mask. Make another circle, somewhat bigger than the shadow, white in fill colour and blur it, but less than you blurred the shadow (5). Use this as a mask on the shadow and you get nice variably blurred shape (6). With little scaling and rotating it looks good to go under the sphere (7).&lt;br /&gt;
&lt;br /&gt;
http://koti.welho.com/thonkasa/Roinaa/tutorial5.png&lt;br /&gt;
&lt;br /&gt;
For a sphere you could have made a decent shading with radial gradient as well, but this approach works with other kind of shapes too. Sometimes you can also use the blurred path to make the shadow side, like in the image below.&lt;br /&gt;
&lt;br /&gt;
http://wesnoth.org/wiki-images/smooth-vector/tutorial6.png&lt;br /&gt;
&lt;br /&gt;
You can also use several blurred paths for shading, like below. The middle lightness (clipped) path was made by copying the original path, and the lightest one by making a linked offset (left). When both are blurred (with different blur radius) they result in a bit glossier surface than in the sphere example (middle). The technique works pretty well even for such odd shape, but it's not perfect. That's OK, there's nothing stopping you from editing the blurred paths, like has been done with the rightmost image (you will have to do &amp;quot;Path -&amp;gt; Object to Path&amp;quot; for the linked offset in order to node edit it). If you use a clone of the base path for clipping, you can still easily edit the base path after shading, because the clip path updates automatically.&lt;br /&gt;
&lt;br /&gt;
http://wesnoth.org/wiki-images/smooth-vector/tutorial11.png&lt;br /&gt;
&lt;br /&gt;
The above approach works best with smooth, organig shapes, but blurring can come handy when doing edgy shapes with flat shading. In the image below the edges are made smoother and more real life-like by a bit of blurring.&lt;br /&gt;
&lt;br /&gt;
http://wesnoth.org/wiki-images/smooth-vector/tutorial8.png&lt;br /&gt;
&lt;br /&gt;
Usually clipping/masking is uset to get rid of the &amp;quot;leaking&amp;quot; blurriness outside the path, but the &amp;quot;leaking&amp;quot; can also be used to one's advantage. In the image below there is a circle with a bigger one around it, a hole being cut in it's middle the size of the smaller circle. The bigger circle has been filled with a gradient (1). When the bigger circle is blurred, the blur will leak over the smaller one (2). When a copy of the small circle is used as a clip path on the bigger one, only the leak is left visible, creating a shading on the small circle (3). When a bigger blur radius is used, the shape changes from flat, button type one, to rounder one (4).  &lt;br /&gt;
&lt;br /&gt;
http://wesnoth.org/wiki-images/smooth-vector/tutorial9.png&lt;br /&gt;
&lt;br /&gt;
Here's one more variation of these techniques, to produce a flat, paint splash type shape. First make the base path (1). Make a copy of it in darker, less saturated colour and move toward the shadow side (1). use a copy of the base bath to cut off (&amp;quot;Path -&amp;gt; Difference&amp;quot;) parts of the shadow path and move back a bit (3). Blur the shadow path (4). Following the same procedure, create the highlight path (lighter more saturated, on the opposite side) (5). Clip both the blurred paths with a clone of the base path (6).&lt;br /&gt;
&lt;br /&gt;
http://wesnoth.org/wiki-images/smooth-vector/tutorial10.png&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
&lt;br /&gt;
Here's some links to similar tutorials:&lt;br /&gt;
* More [http://howto.nicubunu.ro/inkscape_blur_orbs_3d_text/ blur shading] from Nicu (her other tutorials are also worth checking out)&lt;br /&gt;
* Awesome [http://www.inkscape.org/screenshots/gallery/inkscape-0.45-3D-rope.png &amp;quot;interactive&amp;quot; 3-d rope], demonstrating the power of clones&lt;br /&gt;
* Fairly complex [http://troy-sobotka.blogspot.com/2007/11/inkscape-tutorial-1-chrome-effect.html &amp;quot;chrome&amp;quot; text effect], where the text can be changed and the effect updates&lt;br /&gt;
* [http://chrisdesign.wordpress.com/2008/02/14/simple-metal-orb-using-gradients/ Realistic metal shading] made with multi-stop gradients&lt;br /&gt;
&lt;br /&gt;
[[Category: Art Tutorials]]&lt;/div&gt;</summary>
		<author><name>Max2008</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=Shaped_gradients_with_Gaussian_blur&amp;diff=54604</id>
		<title>Shaped gradients with Gaussian blur</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=Shaped_gradients_with_Gaussian_blur&amp;diff=54604"/>
		<updated>2014-04-08T08:23:40Z</updated>

		<summary type="html">&lt;p&gt;Max2008: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;small&amp;gt;''Note: This tutorial was written for [http://www.inkscape.org Inkscape], but should be applicable for other vector drawing programs with similar functionality.''&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The gradient tool in Inkscape is incredibly useful, but it has its limitations as well. For example, the radial gradient is limited to circular or oval in shape. To make gradients of other shapes, the Gaussian blur tool becomes handy. When you blur any object different in colour than its background, you are essentially creating a shaped gradient between those colours.&lt;br /&gt;
&lt;br /&gt;
To make a &amp;quot;radial&amp;quot; gradient of any shape, that is, a gradient that changes from the edge of the path toward the centre, first create the path and set its fill colour to what you want the outer colour to be. Then make &amp;quot;Path -&amp;gt; Linked Offset&amp;quot;, raise it to the top and set it to the inner colour (or usually somewhat more saturated one, to compensate the mixing when blurred). Use the node handle to make it smaller than the original path (1) and blur it to create the gradient (2). Because the inner path is linked to the outer one, any changes to the outer path will be updated in the shape of the inner one (though you may need to readjust the blur radius if you change the shape radically). To make multi-stop gradient, simply make several linked offsets of different colours and sizes (3). You will notice that the colour transition is smoother (rounder) than in normal gradients. If you need more linear gradient, you need to make several intermediary (in size and colour) linked offset paths.&lt;br /&gt;
&lt;br /&gt;
http://wesnoth.org/wiki-images/gradients-gaussian/tutorial2.png&lt;br /&gt;
&lt;br /&gt;
The same method is good for making any odd-shaped gradients. Just create a stepwise gradient with several paths and blur them to make the gradient smooth. In the image below there is a stepwise gradient created with the interpolate effect (this effect is especially handy for this, because it can interpolate the colour as well). In the lower image all but the outermost path have been blurred.&lt;br /&gt;
&lt;br /&gt;
http://wesnoth.org/wiki-images/gradients-gaussian/tutorial3.png&lt;br /&gt;
&lt;br /&gt;
One of the limitations of the gradient tool, when applied to strokes, is that if you want the gradient to change from the inner edge to the outer, you can only do this for oval-shaped paths. The blur, together with masking, can fix this problem as well. First create the base path, then make a linked offset path for it, raise it to the top and set its fill to none and the stroke to the outer colour (1). Create another linked offset, raise it to the top and set its fill to the inner colour, stroke to none and blur it enough to create the stroke gradient (2). Group this path with the one created in step 1. Create yet another linked offset path with no fill, and the same stroke width that the one in step 1, but with white colour (3) If you want to use a stroke style (dotted line etc.) set it for this path. Use the white stroked path as a mask for the group created earlier. Now you have a stroke with a gradient, and mostly it behaves like an ordinary stroke &amp;amp;mdash; edit the nodes of the base path, and the stroke changes with it. Even path operations work, as long as they produce only one path (if they produce several, the gradient stroke is only applied to the topmost one).&lt;br /&gt;
&lt;br /&gt;
http://wesnoth.org/wiki-images/gradients-gaussian/tutorial4.png&lt;br /&gt;
&lt;br /&gt;
[[Category: Art Tutorials]]&lt;/div&gt;</summary>
		<author><name>Max2008</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=Scanning_with_camera&amp;diff=54603</id>
		<title>Scanning with camera</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=Scanning_with_camera&amp;diff=54603"/>
		<updated>2014-04-08T08:22:50Z</updated>

		<summary type="html">&lt;p&gt;Max2008: /* Lighting */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;All art to be used in Battle for Wesnoth must be in digital form. Art made in real-life techniques must be transferred to digital format, and most often this is done with a scanner, but a digital camera can also be used. In this tutorial we go through the basics for getting good digital photos of paintings and drawings. &lt;br /&gt;
&lt;br /&gt;
The good reasons for using a digital camera instead of a scanner include:&lt;br /&gt;
&lt;br /&gt;
* You don't have a scanner. If you only intend to use the digitised image as a sketch to draw over, the quality requirements are much lower and often a photograph will do just fine. Even then, though, there's no reason why the quality should be any lower than what you can accomplish.&lt;br /&gt;
&lt;br /&gt;
* The surface properties, such as crumpy oil paint or metal finish don't work well on a scanner.&lt;br /&gt;
&lt;br /&gt;
* The image is too big to fit into the scanner. If the scanner lid is detachable, larger images can be scanned in pieces, but then you are left with the problem of fitting the pieces seamlessly together. With a camera you can shoot an image of any size with one shot.&lt;br /&gt;
&lt;br /&gt;
To get a good shot of a painting or drawing there are two factors to consider: how to set the image in front of the camera, and how to illuminate it.&lt;br /&gt;
&lt;br /&gt;
==Camera setup==&lt;br /&gt;
&lt;br /&gt;
To avoid perspective distortion on the shape of the image, the view angle of the camera should be perpendicular to the image and pointing at the centrepoint of it. Also, to avoid the &amp;quot;fisheye&amp;quot; distortion, where the edges of the image are bulging out, the camera needs to be placed far enough, at least at a distance of several times the width of the image. Usually this is so far that a horizontal setup (that is, the line of sight is horizontal, and the image vertical) is more convenient. Any vertical surface is good for suspending the image, but if you use fixed light sources, you need something moveable. A table turned on its side will do nicely, if you have nothing else.&lt;br /&gt;
&lt;br /&gt;
The camera needs to be fixed to get as sharp image as possibe, so use a tripod if you have one, or at least put the camera on a table, a box, or other stable surface. Zoom in enough so that the image fills most of the view, but it's generally best to do the final cropping on the computer. Set the camera on highest resolution and best image quality (least compression). Also, when digitising colour images, set the white balance to match the type of lighting you are using.&lt;br /&gt;
&lt;br /&gt;
Before starting with lighting, you need to remove any glass covering the image, the surface of the glass is way too reflective (even with the &amp;quot;non-reflecting&amp;quot; types).&lt;br /&gt;
&lt;br /&gt;
==Lighting==&lt;br /&gt;
&lt;br /&gt;
The first thing to do to set up the proper lighting is to turn off the flash. The worst way to light the image is to make the light come from the same direction where the camera is. While the view angle should be perpendicular to the image, the best lighting angle is roughly 45 degrees. The reason is, that you want only the diffuse reflection of the light to hit the camera.&lt;br /&gt;
&lt;br /&gt;
Another way to make the reflected light more diffuse is to make the incoming light diffuse. This can be accomplished by increasing the light-emitting surface of the light source. Thre are two ways to do this, the first is to pass the light through a diffuse filter. Anything translucent and milky will do such as a thin paper (baking paper), smoky glass or a muslin cloth. Photography shops sell special filter film for the purpose. Notice that the filter always reduces the light intensity. Another way is to use diffuse reflector, any matte white surface will do, but quite a lot of seemingly white materials actually absorb quite a lot of the light. Specifically good material for a diffuse filter is a plain sheet of polystyrene foam (styrofoam, styrox). It is both highly reflective amd dispersive, and as a ridig yet light material it is easy to suspend (often just prodded on a stick). The reflectivity can be further increased by painting the surface with a silverish metal paint, though it must be water soluble so it doesn't eat away the polystyrene. Aluminium foil can also be glued (with water soluble glue) on it, rubbed in so that it adopts the surface roughness.  &lt;br /&gt;
&lt;br /&gt;
Also, in order to get a uniform illumination of the image, the lighting needs to be symmetrical in reference to the view line of the camera. This means that you need, at minimum, two roughly identical light sources, positioned symmetrically on both sides of the camera. We are talking about radial symmetry here, so if you use more than two lights, they need to be positioned on regulal intervals on a circle that has the camera view line as its axis (but usually two lights do just fine).&lt;br /&gt;
&lt;br /&gt;
The image below shows an ideal setup for two light sources (camera is blue, the image red, and the light sources yellow).&lt;br /&gt;
&lt;br /&gt;
http://wesnoth.org/wiki-images/scanning-camera/camera.png&lt;br /&gt;
&lt;br /&gt;
Some of you might have gotten discouraged by all the talk about making reflectors and stuff, but things can be done as well with natural light. Windows are natural large area sources of diffuse light and the above illustrated setup can be achieved in a room with two windows on the same wall. Set the image on the centre of the room, facing windows, and put the camera next to the wall between them. There's also plenty of light outside, but direct sunlight is not good, you should only use light reflected from the sky or clouds. The best weather for photographing images ouside is a day when there is a cloud cover just thick enough to make shadows disappear.&lt;br /&gt;
&lt;br /&gt;
==Testing your setup==&lt;br /&gt;
&lt;br /&gt;
Once you have everything set up, you can run a test by taking a picture of a white sheet of paper the size of your image. Upload the picture into your computer and open it in a image processing program, such as GIMP or Photoshop. Using whatever tool available for making rectangles, you should be able to draw one that pretty much equals the shape of the paper, if your setup is correct. If the edges of the paper seem to bulge outwards, your camera is too close. If the shape of the paper looks like a trapezoid (opposite edges are not the same length), the angle between the view line and the image is not 90 degrees and/or the camera is not pointing at the centre.&lt;br /&gt;
&lt;br /&gt;
Next you must use the colour picker (pipette) tool to check that your lighting is uniform and that the exposure and white balance match your lighting. Pick a value at the centre of the paper and close to each corner. The values should be roughly the same, and if not, your lighting is not symmetric enough. The values should also indicate no colour, that is the red, green and blue values should be roughly equal. If not, the white balance is not set right. The values should also be as close to full white (255,255,255 in RGB) as possible, but to avoid overexposure, slightily below it (because overexposure is capped to 255,255,255, you can't tell it from values that really are full white). If the values fall significantly short of 255, you need a higher exposure setting for the camera, or more light. &lt;br /&gt;
&lt;br /&gt;
It is possible that no single setting of exposure will give you enough resolution in luminosity (dynamic range) in both the lighter and darker parts of the image. In these cases, the technique for extending dynamic range presented in [[Extending dynamic range|another tutorial]] will be applicable here as well. Obviously, any other postprocessing photo enhancement techniques can also be applied, but usually they also degrade the image quality in some way (e.g. intoduce posterisation or noise), so it's always worth the effort to make the image as good as possible already in the camera.&lt;br /&gt;
&lt;br /&gt;
[[Category: Art Tutorials]]&lt;/div&gt;</summary>
		<author><name>Max2008</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=MultiHexTutorial&amp;diff=54602</id>
		<title>MultiHexTutorial</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=MultiHexTutorial&amp;diff=54602"/>
		<updated>2014-04-08T08:22:17Z</updated>

		<summary type="html">&lt;p&gt;Max2008: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;(quickly written, I'll explain it more in detail when I have more time -- Ayin)&lt;br /&gt;
&lt;br /&gt;
== First example: mountains ==&lt;br /&gt;
&lt;br /&gt;
Suppose we have the following map to fill with mountain tiles:&lt;br /&gt;
&lt;br /&gt;
http://wesnoth.org/wiki-images/multi-hex/tutorial1.png&lt;br /&gt;
&lt;br /&gt;
And we have the following images to fill it:&lt;br /&gt;
&lt;br /&gt;
* tile1: http://wesnoth.org/wiki-images/multi-hex/tile1.png&lt;br /&gt;
* tile2: http://wesnoth.org/wiki-images/multi-hex/tile2.png&lt;br /&gt;
* tile5: http://wesnoth.org/wiki-images/multi-hex/tile5.png&lt;br /&gt;
&lt;br /&gt;
We will use the following three rules to fill the mountains. Beware: '''Spaces into maps do matter!'''&lt;br /&gt;
&lt;br /&gt;
 [terrain_graphics]&lt;br /&gt;
         map=&amp;quot;&lt;br /&gt;
 .,   1&lt;br /&gt;
 ,  .&lt;br /&gt;
 .,   1&lt;br /&gt;
 ,  .&lt;br /&gt;
 .,   1&lt;br /&gt;
 ,  1&lt;br /&gt;
 1&amp;quot;&lt;br /&gt;
         [tile]&lt;br /&gt;
                 pos=1&lt;br /&gt;
                 type=Mm&lt;br /&gt;
         [/tile]&lt;br /&gt;
&lt;br /&gt;
         probability=30&lt;br /&gt;
         no_flag=&amp;quot;base&amp;quot;&lt;br /&gt;
         set_flag=&amp;quot;base&amp;quot;&lt;br /&gt;
&lt;br /&gt;
         [image]&lt;br /&gt;
                 layer=-1000&lt;br /&gt;
                 name=tile5&lt;br /&gt;
         [/image]&lt;br /&gt;
 [/terrain_graphics]&lt;br /&gt;
&lt;br /&gt;
 [terrain_graphics]&lt;br /&gt;
         map=&amp;quot;&lt;br /&gt;
 .&lt;br /&gt;
 ,  1&lt;br /&gt;
 1&amp;quot;&lt;br /&gt;
         [tile]&lt;br /&gt;
                 pos=1&lt;br /&gt;
                 type=Mm&lt;br /&gt;
         [/tile]&lt;br /&gt;
&lt;br /&gt;
         probability=30&lt;br /&gt;
         no_flag=&amp;quot;base&amp;quot;&lt;br /&gt;
         set_flag=&amp;quot;base&amp;quot;&lt;br /&gt;
         [image]&lt;br /&gt;
                 layer=-1000&lt;br /&gt;
                 name=tile2&lt;br /&gt;
         [/image]&lt;br /&gt;
 [/terrain_graphics]&lt;br /&gt;
&lt;br /&gt;
 [terrain_graphics]&lt;br /&gt;
         [tile]&lt;br /&gt;
                 x=0&lt;br /&gt;
                 y=0&lt;br /&gt;
                 type=Mm&lt;br /&gt;
         [/tile]&lt;br /&gt;
         probability=100&lt;br /&gt;
         no_flag=&amp;quot;base&amp;quot;&lt;br /&gt;
         set_flag=&amp;quot;base&amp;quot;&lt;br /&gt;
         [image]&lt;br /&gt;
                 layer=-1000&lt;br /&gt;
                 name=tile1&lt;br /&gt;
         [/image]&lt;br /&gt;
 [/terrain_graphics]&lt;br /&gt;
&lt;br /&gt;
The first rule, regarding the biggest mountains, will apply first. It will include, with 30% probability, the big&lt;br /&gt;
5-tile mountain range. This will make, for example, something like this.&lt;br /&gt;
&lt;br /&gt;
http://wesnoth.org/wiki-images/multi-hex/tutorial2.png&lt;br /&gt;
&lt;br /&gt;
The second rule will then apply. Note that the previous rule had set the &amp;quot;built-m&amp;quot; flag, thus preventing the mountains&lt;br /&gt;
from the second rule to overlap the place where the first mountains already have been placed. The result will be&lt;br /&gt;
something like that:&lt;br /&gt;
&lt;br /&gt;
http://wesnoth.org/wiki-images/multi-hex/tutorial3.png&lt;br /&gt;
&lt;br /&gt;
The, the last rule, with 100% probability (the probability key could have been omitted) will apply. It will place a&lt;br /&gt;
mountain tile on the places where no other mountain tile was placed. The final mountain range will look like that:&lt;br /&gt;
&lt;br /&gt;
http://wesnoth.org/wiki-images/multi-hex/tutorial4.png&lt;br /&gt;
&lt;br /&gt;
== Village with a tower ==&lt;br /&gt;
&lt;br /&gt;
To add a building with a tower that spans over 2 hexes, you may use the following rule (Tt being the character&lt;br /&gt;
representing the building hex)&lt;br /&gt;
&lt;br /&gt;
 [terrain_graphics]&lt;br /&gt;
      map=&amp;quot;*, 1&amp;quot;&lt;br /&gt;
      [tile]&lt;br /&gt;
          pos=1&lt;br /&gt;
          type=Tt&lt;br /&gt;
      [/tile]&lt;br /&gt;
      [image]&lt;br /&gt;
          name=tower # a 36x72 image&lt;br /&gt;
          position=vertical&lt;br /&gt;
          base=36,108&lt;br /&gt;
      [/image]&lt;br /&gt;
&lt;br /&gt;
 [/terrain_graphics]&lt;br /&gt;
&lt;br /&gt;
== Reference ==&lt;br /&gt;
&lt;br /&gt;
Map:&lt;br /&gt;
&lt;br /&gt;
'.' means &amp;quot;this rule does not apply to this hex&amp;quot; (i.e: no image will be set to this hex, this hex will not be checked&lt;br /&gt;
for flags, etc).&lt;br /&gt;
&lt;br /&gt;
'*' means &amp;quot;this rule applies to this hex, but this hex can be any terrain type&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Flags:&lt;br /&gt;
&lt;br /&gt;
no_flag=&amp;quot;built-m&amp;quot; means that the rule only matches if the flag &amp;quot;built-m&amp;quot; is not set.&lt;br /&gt;
&lt;br /&gt;
set_flag=&amp;quot;built-m&amp;quot; means that the rule, upon matching, sets the flag &amp;quot;built-m&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Art Tutorials]]&lt;/div&gt;</summary>
		<author><name>Max2008</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=Making_portrait_art_in_vector&amp;diff=54601</id>
		<title>Making portrait art in vector</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=Making_portrait_art_in_vector&amp;diff=54601"/>
		<updated>2014-04-08T08:20:50Z</updated>

		<summary type="html">&lt;p&gt;Max2008: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;''NOTE: The style discribed here is no longer used in Wesnoth mainline portraits.''&lt;br /&gt;
&lt;br /&gt;
This is a tutorial for making unit portraits for the Battle for Wesnoth in vector graphics. The Wesnoth portraits are made in what is called &amp;quot;the Lutesian style&amp;quot; after the comic artist Jason Lutes, who has donated many of the Loyalist portraits. The main reason for stylistic restrictions is to achieve aesthetic consistency.&lt;br /&gt;
&lt;br /&gt;
The technical aspects of the Lutesian style can be summarised as follows:&lt;br /&gt;
&lt;br /&gt;
* The colouring is made in &amp;quot;cell shading,&amp;quot; that is, colours are applied in constant colour areas, known as &amp;quot;flats.&amp;quot; Changes in tone (such as shadows and highlights) are also made the same way, instead of brush strokes or gradients.&lt;br /&gt;
&lt;br /&gt;
* All the linework, instead of being black or having another colour of their own, is made in darker (or sometimes lighter) shade of the colour of the flat it is on top of.&lt;br /&gt;
&lt;br /&gt;
* Adjacent flats don't need to be separated by outlines.&lt;br /&gt;
&lt;br /&gt;
In addition to this, the final format of the portrait file should be a 205x205 pixel PNG with a fully black background.&lt;br /&gt;
&lt;br /&gt;
Vector graphics programs can be easily used to produced this kind of images, because the flats can be easily crated and edited as paths filled with a solid colour. The linework, shadows and outlines are most conveniently made as semitransparent dark or light areas on top of the flats, because then they always follow the colour of the flats, if it is changed.&lt;br /&gt;
&lt;br /&gt;
In this tutorial we use Inkscape as the program, but any vector drawing program worth its salt should have the same functionality. As a prequisite, you should be familiar with the basic concepts of vector drawing, how to make, edit and stroke paths, the fill rules (how to make transparent &amp;quot;holes&amp;quot; in paths), etc. Basically, reading the Inkscape manual and playing around with it for half an hour should be enough. You should also be able to draw and scan a pencil sketch four your portrait, or have other people's sketches available (remember to ask for permission).&lt;br /&gt;
&lt;br /&gt;
Here's our example sketch, a young burgher:&lt;br /&gt;
&lt;br /&gt;
http://wesnoth.org/wiki-images/vector-portrait/burghersketch2.png&lt;br /&gt;
&lt;br /&gt;
The blue lines show the edges of the shadows. It is convenient to make the shadow edges visible, because it is then easier to trace them (and scanners easily lose the lighter shades of pencilwork anyway), and by using a colour pencil, you make them separable from the actual linework. You can do the same thing with highlights, but use different colour than for shadows. The red arrow indicates the general direction of lighting.&lt;br /&gt;
&lt;br /&gt;
The first thing to do is to trace out the flats and make outlines for those that are going to have them. As stated above, we are going to make the outlines as a separate, semitransparent path on top of the flat path, so that it gets its colour from it. Because lines differentiating two flats of different colours should have the colour of one or the other, but not both, it follows that the outer edge of the outline path must align exactly with the edge of the flat path. We will learn shortly how to accomplish this, but first read [[Z-order tricks|this tutorial]] about the z-order and the path tools.&lt;br /&gt;
&lt;br /&gt;
Then it's time to get work on the image. First thing to do is to prepare the sketch. Since we must keep the sketch as the topmost object to see it as we draw, but also see the work beneath it, the background colour of the skecth must be changed into transparency. This can be done in GIMP, where the necessary tool can be found in &amp;quot;Layers -&amp;gt; Transparency -&amp;gt; Color to alpha.&amp;quot; Once this is done, save it as PNG and import it into Inkscape. It will initially have some random X and Y values, so change them to 0, in the top toolbar. Open the document preferences and set the page size to match the selection. Rename the current layer to &amp;quot;sketch&amp;quot; and lock it, so that you don't accidentally move the sketch image, and it will be easier to select the objects under it. Create a new layer under the sketch layer and name it &amp;quot;flat.&amp;quot; Now you are ready to trace the flats.&lt;br /&gt;
&lt;br /&gt;
There are to ways to trace, with the freehand tool, where you move the cursor along the line and nodes are created on the fly, or the bezier tool, where you set the nodes explicitly. If you have a tablet and a very steady hand, you can manage with the freehand tool, but otherwise the bezier is better. The good thing about the bezier tool is that you end up with relatively few nodes, which keeps the file size smaller and makes later editing of the paths easier. Beginners usually make the beziers by first making an approximating polygon, and then coming back to round the corners. This is too inefficient, a faster and equally easy (after a bit of practice) way is the &amp;quot;tangential sweep.&amp;quot; Follow the line and whenever there is a sharp corner, click on it without dragging. In between, click and drag tangentially to the line in few points along the curving line. You learn by practice where to place the sweep points. If there is a straight line between to corners, you don't need to put any nodes there.&lt;br /&gt;
&lt;br /&gt;
The flats are best traced in back to front order, so that flats that are going to be the on the bottom are drawn first. It's usually good to base the z-order of the flats to the natural order of the real-life objects they represent, so that flats representing the foreground objects are on top of the flats representing background objects. There are times when you must break this order, but following it as a general rule helps to keep the drawing organised in your head.&lt;br /&gt;
&lt;br /&gt;
In our image, we start with the sleeve at left. It's one of the &amp;quot;bottom objects,&amp;quot; it's being covered by the torso, but doesn't itself cover anything. In the image below we see the sleeve traced with the bezier tool. Note that this is not the only, and not probably even the best, way to place the nodes. There actually isn't a &amp;quot;right&amp;quot; way to trace a shape, the only places where you ''must'' put a node are the sharp corners. You should try to get away with as few nodes as possible, though. You will also notice tha we didn't trace the line separating the sleeve and the torso. We will do it when we trace the flat for the torso, which comes on top of this one.&lt;br /&gt;
&lt;br /&gt;
http://wesnoth.org/wiki-images/vector-portrait/burgshot1.png&lt;br /&gt;
&lt;br /&gt;
If we want the flat to have an outline, this is the time to do it, because it will then be directly on top of the flat it follows, and has the same relative z-placement as the flat. &lt;br /&gt;
&lt;br /&gt;
The outline could be made with the calligraphy tool, but then we would be tracing the same lines twice. The flat could also be stroked, which would produce the outline automatically, but there are two problems. First, the stroke is always half outside and half inside the path, but we want the outer edge of our outline to follow the path exactly. Second, the stroke is always constant width, and this tends to result in dull and formalistic look, better suited to diagrams and such than artistic drawings. Even though strokes are not good as themselves, there is a handy tool &amp;quot;stroke to path,&amp;quot; which makes a path out of a stroke so that the path follows the edges of the stroke, and we can use this to turn a stroke into a proper outline.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;stroke to path&amp;quot; tool makes the original path disappear, so we will first do &amp;quot;Edit -&amp;gt; Copy&amp;quot; and &amp;quot;Edit -&amp;gt; Paste in place&amp;quot; for our flat. Then select the copy and disable fill and enable stroke. Set the stroke colour to black with 50% opacity (you might want to adjust this later, but these are good working settings at this point).&lt;br /&gt;
&lt;br /&gt;
http://wesnoth.org/wiki-images/vector-portrait/burgshot2.png&lt;br /&gt;
&lt;br /&gt;
The width of the stroke should be about twice the intended mid-width of the outline. Then do &amp;quot;Path -&amp;gt; Stroke to path.&amp;quot; Half of the outline still lies outside the path, and we will cut it away with a clip path, but wirst we will have to make the outline variable width. This is done easily by moving the outline path slightly, only so much that the edges of the underlying flat stay within it. Moving the outline makes the part that is inside the flat, that will remain after the intersection operation, to become thinner in some parts and thicker in other. As a general rule, the outline should be thinner on the lighted side of the object and thicker on the shadow side, so you should move the outline towards the light source.&lt;br /&gt;
&lt;br /&gt;
http://wesnoth.org/wiki-images/vector-portrait/burgshot3.png&lt;br /&gt;
 &lt;br /&gt;
When the inside part of the outline is the way you like, select the flat path and do &amp;quot;Edit -&amp;gt; Clone -&amp;gt; Clone&amp;quot;. Select the clone and the outline path and do &amp;quot;Object -&amp;gt; Clip -&amp;gt; Set&amp;quot;. What we did was using the clone of the flat as a clip path on the outline path, making the parts that are outside the path invisible. Because we use a clone, if we edit the nodes of the flat, the changes will automatically change the (visible) shape of the outline path correspondingly.&lt;br /&gt;
&lt;br /&gt;
http://wesnoth.org/wiki-images/vector-portrait/burgshot4.png&lt;br /&gt;
&lt;br /&gt;
Since this method decides the outline width only by the angle of the outline, it doesn't always produce the desired outcome in all the places, but you can easily adjust the line width by moving the appropriate nodes of the ''inner edge'' of the outline path, inwards to thicken the line, outwards to thin it (the &amp;quot;sclupting&amp;quot; mode can become handy for this).&lt;br /&gt;
&lt;br /&gt;
Proceed by this method for the flats in back-to-front order. Having the flats traced and outlined, my picture would look like this:&lt;br /&gt;
&lt;br /&gt;
http://wesnoth.org/wiki-images/vector-portrait/burgher1.png&lt;br /&gt;
&lt;br /&gt;
Note that not all flats need an outline. Outlining usually adds a sense of weight and substance to objects, so thin, light and fluffy objects, such as hair, beard, moustache and the quill in my image, generally look better without.&lt;br /&gt;
&lt;br /&gt;
Later it will be useful to have the silhouette of the whole figure in one path. Create a new layer titled &amp;quot;silhouette,&amp;quot; select all the flat paths and do &amp;quot;Edit -&amp;gt; Copy.&amp;quot; Switch to the &amp;quot;silhouette&amp;quot; layer and do &amp;quot;Edit -&amp;gt; Paste in place,&amp;quot; followed by &amp;quot;Path -&amp;gt; Union.&amp;quot; This will fuse all the paths into one, creating a silhouette. Turn the visibility of this layer off and lock it.  &lt;br /&gt;
&lt;br /&gt;
At this point it might be a good time to handle some special features, such as eyes. We could make them as flats on top of the face flat, but the pupils usually require adjustements to make them look just right, it's more convenient to make the eyes as holes in the face, and put the pupils behind it. If you make the pupils as whole ovals, only part of them is visible, but when you move them, the part always shows which should.&lt;br /&gt;
&lt;br /&gt;
There are two ways to make a hole in a path. One is to make a path the shape of the hole on top of it and doing &amp;quot;Path -&amp;gt; Difference,&amp;quot; but if you select a path and press shift while starting to make a new one, the new one will become a subpath to the selected one, and if it's inside it, it will appear as a hole (provided the fill rule for the path is even-odd, the default).&lt;br /&gt;
&lt;br /&gt;
If you want the holes to have outlines as well, it will require a bit of trickery. Select the face flat and do &amp;quot;Edit -&amp;gt; Copy&amp;quot; and &amp;quot;Edit -&amp;gt; Paste in place.&amp;quot; Then do &amp;quot;Path -&amp;gt; Break apart,&amp;quot; which will make each of the subpaths into separate paths. Select the outermost path and delete it. What you are left with are paths that excactly cover the holes. Follow the outline making procedure, except in the end, instead of &amp;quot;Path -&amp;gt; Intersection,&amp;quot; do &amp;quot;Path -&amp;gt; Difference&amp;quot; to clip away the ''inner'' half of the outline path. &lt;br /&gt;
&lt;br /&gt;
For the eyes, you need white for the eyeballs (the white you see is the background colour). So make a eyeball colour flat (not usually pure white) that covers both of the eye holes, and drop it below the face flat. Then use the ellipse tool to make the iris and the pupil, group them, and drop the group below the face flat, but above the eyeball flat. When you have made one iris/pupil combo, you can copy it to get the other be exactly alike.&lt;br /&gt;
&lt;br /&gt;
http://wesnoth.org/wiki-images/vector-portrait/burgshot11.png&lt;br /&gt;
&lt;br /&gt;
Now would be a good time to make the rest of the linework, that is the lines not outlining any flats. These lines are also to be made dark with partial transparency, so that they become a darker shade of the colour of the flat they are covering. There are several ways to make the linework. With short lines extending from the outlines, like the ones on the sleeves in my picture, can be made by making new nodes in appropriate places on the outline path and dragging them out. Thick lines can me treated as the flats by tracing the edges of the lines with the bezier tool. If you have a tablet, the calligraphy tool might be useful, but it takes some practice to use well. If the calligraphy lines overlap, you have to fuse them together by doing &amp;quot;Path -&amp;gt; Union&amp;quot; on them, or the partial transparency will produce  darker shades on the overlapping parts.&lt;br /&gt;
&lt;br /&gt;
Sometimes tracing linework is done more easily on a raster program, because you can use the eraser tool to trim the lines and correct mistakes immediately (especially with a tablet, when you can use the other end of the stylus as the eraser). The prosedure is as follows: Open the original sketch bitmap on a raster program. Create a new transparent layer on top and do the linework on this with black. Save only this layer as a PNG and import it into Inkscape. Set the X and Y properties of the bitmap to zeroes to make it align with the rest of the image. Select the bitmap and do &amp;quot;Path -&amp;gt; Trace bitmap&amp;quot; (the default options work well most of the time). Delete the bitmap and what you are left with is the linework done in paths. They are fully black so decrease the opacity and edit them further with the usual tools, if necessary.&lt;br /&gt;
&lt;br /&gt;
Whatever method you use to make the linework, it's good to keep things organised and put it on its own layer.&lt;br /&gt;
&lt;br /&gt;
http://wesnoth.org/wiki-images/vector-portrait/burgher2.png&lt;br /&gt;
&lt;br /&gt;
After the linework we can do the shadows. Create a new layer titled &amp;quot;shadow&amp;quot; on top of the others, and start tracing the shadow edges like you did with flats, but obviously, the shadows don't need outlines. You can make the shadow paths extend beyond the outlines of the figure, and cut them off in the end using the silhouette path you created earlier, using &amp;quot;Path -&amp;gt; Intersection.&amp;quot; The shadows will also be partially transparent to show through the colour of the flat, but their own colour can well be something else than black. In my image I have used dark blue for the shadows, as in outdoors the light coming to the shadow parts comes from the sky and is bluer than the sunlight. You can try different colours for your shadows to see how it affects the general mood if the image. &lt;br /&gt;
&lt;br /&gt;
http://wesnoth.org/wiki-images/vector-portrait/burgher3.png&lt;br /&gt;
&lt;br /&gt;
We still have some details to do, like the buttons on the jacket. Here I made the buttons with the ellipse too, using the same ellipse to create the shadow (by now you should be able to figure out how to make the crescent shape). If you need identical objects, you can always make copies of one, but if you make clones instead, and decide to change something about the design of the object later, you only need to change the original and the clones change as well.&lt;br /&gt;
&lt;br /&gt;
http://wesnoth.org/wiki-images/vector-portrait/burgshot12.png&lt;br /&gt;
&lt;br /&gt;
To complete the image, some final touches are needed, like the specular spots in the eyes and some texture and highlights for the beard and hair (all done with semitransparent dark and light paths). Then the standard black background and some cropping and we're all done (I'll leave it as the exercise of the reader to figure out how to do the cropping).&lt;br /&gt;
&lt;br /&gt;
http://wesnoth.org/wiki-images/vector-portrait/burgherfinal1.png&lt;br /&gt;
&lt;br /&gt;
[[Category: Art Tutorials]]&lt;/div&gt;</summary>
		<author><name>Max2008</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=Extending_dynamic_range&amp;diff=54600</id>
		<title>Extending dynamic range</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=Extending_dynamic_range&amp;diff=54600"/>
		<updated>2014-04-08T08:18:56Z</updated>

		<summary type="html">&lt;p&gt;Max2008: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In the area of imaging, dynamic range means the imaging hardware's ability to tell differences in luminosity. Due to the non-linear nature of the human photoreception mechanism, the dynamic range of human perception is very large, and it's difficult to capture sceneries with high range of luminosities. A typical example is a scenery against a background of bright clouds. If you set the camera exposure to a setting suitable to the brightness of the foreground, the luminosity of the sky goes outside the dynamic range of the camera and most of the sky pixels are clipped to white, resulting in ugly flat &amp;quot;burnt through&amp;quot; white sky. On the other hand, if you set the exposure low enough to bring out the details of the clouds, the foreground luminosity drops below the lower end of the dynamic range, most of the pixels get clipped to black, and you are left with nothing but a dark silhouette.&lt;br /&gt;
&lt;br /&gt;
There is a trick to extend the dynamic range of a camera: by taking shots of the same scenery in different exposures we can capture the details of both highligth and shadow parts of the scenery, which can then be combined digitally in one image. The picture below is an example of this technique. The leftmost image was taken with an exposure setting suitable for the foreground, but it got the clouds blended into a white haze. The middle image was taken with exposure low enough to make the cloud structure visible, but now the foreground is too dark. The rightmost image is a combination of the two others. The foreground pixels are mostly from the high-exposure image, while the sky is a blend of the two. The result presents the details of various luminosities much better than either of the other images and is closer to what human eye would see. The good thing about this technique is that no extra equipment nor fancy sofware is needed, the pictures were taken with a regular cheap digital camera (a film camera would also do, as long as you can adjust the exposure) and the postprocessing was conducted with GIMP, using a simple plugin downloaded from the plugin registry. &lt;br /&gt;
&lt;br /&gt;
http://wesnoth.org/wiki-images/extending-dynamic-range/dynrange.jpg&lt;br /&gt;
&lt;br /&gt;
Scanners also have a limited dynamic range, and similar problems can occur when scanning images that depend on very small differences in luminosity for detail. Pencil drawings typically fall into this category. In order to read the detail in the darkest parts, plenty of light is needed to penetrate the pigment to reflect back from the paper, but this much light washes away the faintest pencilwork. The pictures below demonstrate the problem, scanned at different exposures. The darker one has all the lighter shades and linework present, but has the darker parts lacking in contrast and detail and the whole picture is generally too dark. The lighter one brings the detail of the darkest parts out better, but the rest of the picture is totally washed out.&lt;br /&gt;
&lt;br /&gt;
http://wesnoth.org/wiki-images/extending-dynamic-range/stoat1.jpg&lt;br /&gt;
&lt;br /&gt;
http://wesnoth.org/wiki-images/extending-dynamic-range/stoat2.jpg&lt;br /&gt;
&lt;br /&gt;
The solution to the problem is exactly the same as with the photographs, combine the different exposures into one image.&lt;br /&gt;
&lt;br /&gt;
Some notes about scanning the different versions: most scanner sofware offer &amp;quot;image enhancement&amp;quot; options by changing the gamma, brightness and contrast of the image. These, however, usually only manipulate the data ''after'' it has been scanned, and don't really add new detail to the image that we need. What you must change is the actual brightness of the scanning head light source (or the sensitivity of the CCD, whatever option is available for your scanner). In Xsane, these options are found in the &amp;quot;Standard options&amp;quot; window. Also, when using Xsane, when you change these settings, the preview window is not updated until you press the &amp;quot;Acquire preview&amp;quot; button. You must scan exactly the same area for each exposure, so to make sure it doesn't change between previews, uncheck the &amp;quot;Preselect scanarea&amp;quot; button in the &amp;quot;Preferences -&amp;gt; Xsane setup -&amp;gt; Enhancement&amp;quot; menu.&lt;br /&gt;
&lt;br /&gt;
Open GIMP or some other image manipulation program and put the exposures in the same image as separate layers. Simplest way to combine the images is to change the opacity of the upper layer to get a uniform blend. Most to the times, however, you want to mix the images selectively, by making some parts closer to the low exposure image, and other parts closer to the lighter one. This can be achieved by setting a mask to the upper layer. Paint the mask with 50% grey and you have a equal mix of the two layers. Now paint with black to the mask in parts where you want your image to be closer to the lower layer, and with white where you want it to be closer to the upper one. This method is labourous, but it offers you complete control of the result.&lt;br /&gt;
&lt;br /&gt;
The mask can be also produced automatically. In GIMP, there are two plugins for that. They don't ship with the standard distribution, but you can download them from the GIMP plugin registry. The first one is called [http://www.trsqr.net/photokit/dre.html Dynamic range extender] and it presumes two exposures, the darker one on top. Uncheck the &amp;quot;merge layers&amp;quot;, because you might want to try different opacities for the upper layer. The plugin creates a mask for the darker layer, which makes the the lower layer selectively visible.&lt;br /&gt;
&lt;br /&gt;
The second one is called [http://registry.gimp.org/plugin?id=9520 HDR Tone Mapping], and it presumes three different exposures. The order persumably doesn't matter, and it produces a mask for the two upper layers (though in all my trials the mask of the upmost layer was almost totally black, thus not contributing significantly to the combined image). NOTE: this plugin presumes an RGB image, so if you scanned your images in greyscale, you must change the image into RGB before using this plugin (you can change it back to greyscale afterwards). If you try to use it on a greyscale image, the plugin just hangs indefinitely.&lt;br /&gt;
&lt;br /&gt;
With both plugins, it's worth to try to change the masked layer's opacity after you have run the plugin. I have found that it often results in a better image.&lt;br /&gt;
&lt;br /&gt;
Here's the result of the first plugin applied to the exposures above, with the masked layer's opacity set to 70%:&lt;br /&gt;
&lt;br /&gt;
http://wesnoth.org/wiki-images/extending-dynamic-range/stoat3.jpg&lt;br /&gt;
&lt;br /&gt;
[[Category: Art Tutorials]]&lt;/div&gt;</summary>
		<author><name>Max2008</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=Seamless_Tiles_Using_Inkscape&amp;diff=54320</id>
		<title>Seamless Tiles Using Inkscape</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=Seamless_Tiles_Using_Inkscape&amp;diff=54320"/>
		<updated>2014-04-01T13:22:54Z</updated>

		<summary type="html">&lt;p&gt;Max2008: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this tutrial you will learn how to use [http://www.inkscape.org Inkscape] to create seamlessly hexagonal tiles. The tiles are first made in vector graphics and then rendered into a raster of the right resolution. The method utilises the clone tile tool, and the cool thing about it is that you see a multiple hex area which updates immediately as you edit the original hex.&lt;br /&gt;
&lt;br /&gt;
The method proceeds as follows:&lt;br /&gt;
&lt;br /&gt;
First make a hexagon path with the Star Tool (set the number of corners to six and check the polygon button. Keep CTRL pressed to get the hex in correct angle). Set the width and hight of the hex path to 72px. This hex will be the background.&lt;br /&gt;
&lt;br /&gt;
Create some object that fits inside the hex and group it with the hex (at this point it doesn't matter what it is, you just need a group and you can't group only one object). Give the group an ID which makes it easier to find in the XML editor.&lt;br /&gt;
&lt;br /&gt;
Select the group and open the &amp;quot;Edit -&amp;gt; Clone -&amp;gt; Tile clone&amp;quot; dialog. Set the symmetry to P1 (the default) and the size to something like 5x5. Open the &amp;quot;shift tab&amp;quot; and set &amp;quot;shift X per column&amp;quot; to -25% and &amp;quot;shift Y per column&amp;quot; to -50%. Press create, and you have a hex grid made up of clones. The original hex is under the top left clone hex, so remove the clone to edit the original. Now any change you make on the original will be updated on the clones. See the image below for example, the selected hex is the original, others are clones (it is not meant to be any terrain, just random shapes for demonstration).&lt;br /&gt;
&lt;br /&gt;
http://wesnoth.org/wiki-images/exong-backup/hexdemo_159.png&lt;br /&gt;
&lt;br /&gt;
The tiling of the hexes is precice, but you can still see a one-pixel boundary between them caused by anti-aliasing bias (you can see this by zooming in, the boundary always stays one pixel wide). To get rid of this, CTRL-click (select within a group) the background hex path (the original), grab the bottom right scaling arrow and drag it out just enough to make the gap disappear. Now you are ready to edit.&lt;br /&gt;
&lt;br /&gt;
One thing you must remember that you made the clone out of a ''group'', so you can't break the group without breaking the cloning. To select objects to edit, you must always use CTRL-click (or select in the XML editor). Adding objects in the group is a bit tricky too. Create the object first on top of the original, the drag-and-drop it into the the group in the XML editor. You can put objects on top of the hex border, but because of the z-ordering, you can only put them on top of the north, nortwest and southwest borders. This is not a broblem, though, because a copy of the object will always appear on the opposite border. If you have screen real estate to spare, you can keep two windows open, one with zoomed in view to the original, where you do the editing, and another with a zoomed out view of the grid in right size.&lt;br /&gt;
&lt;br /&gt;
Once you are happy with the result you must render it to a Wesnoth terrain bitmap. Open &amp;quot;File -&amp;gt; Export bitmap&amp;quot; and export your image in 90dpi. This should make one image pixel unit equal one pixel in the export PNG. Open the exported image in raster program and crop it down to 72x72 pixels. The exact placement of the cropping frame doesn't matter (as long as it doesn't contain any of the empty parts), only the size. Now make transparent the pixels that would fall outside the stardard Wesnoth hex, and what you have left is a seamlessly tileable terrain hex.&lt;br /&gt;
&lt;br /&gt;
Making the transition hexes for each border, and possibly some variations to break the repeating are best done in a raster program.&lt;br /&gt;
&lt;br /&gt;
[[Category: Art Tutorials]]&lt;/div&gt;</summary>
		<author><name>Max2008</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=How_to_Anti-Alias_Sprite_Art&amp;diff=54319</id>
		<title>How to Anti-Alias Sprite Art</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=How_to_Anti-Alias_Sprite_Art&amp;diff=54319"/>
		<updated>2014-04-01T13:20:19Z</updated>

		<summary type="html">&lt;p&gt;Max2008: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Anti-aliasing is a technique designed to counter the inherent &amp;quot;grain&amp;quot; of computer displays, a grain that results from their cartesian nature.  Despite early experiments with radically different display technologies, the computing industry settled on this display system of rectangularly arrayed pixels, and to effectively use it, you must overcome one of it's greatest inherent limits.  Anti-aliasing is designed to do just that.&lt;br /&gt;
&lt;br /&gt;
The problem is this, when rendering a line, distances between drawn elements on a screen are not infinitesimal.  You can only make a change to your image at fixed distances, specifically the true dpi resolution of your current display setting.  As an aside, this is not to be confused with the display setting recognized by the operating system - macintosh screens were only 72dpi (dots per inch, lengthwise) on the original macintosh computers, though they have inherited that setting in name, it became meaningless with the advent of the first color screens.  Likewise, though they pretend that they do, computers running windows very rarely have a monitor set to exactly 96dpi.  Something near or above those is not uncommon these days, though.&lt;br /&gt;
&lt;br /&gt;
To render a solid line, you cannot simply place pixels (picture elements) in the target color, as you might when drawing with a pen on paper, because the granularity of them on the screen is so big that you can see the breaks between the rows.  The result of drawing a solid black line on a white background, without antialiasing, will look like this:&lt;br /&gt;
&lt;br /&gt;
http://wesnoth.org/wiki-images/exong-backup/aliased_line_144.png&lt;br /&gt;
&lt;br /&gt;
Notice the rather garish and sudden shifts between pixel rows?  These have many names, including the &amp;quot;jaggies&amp;quot;, and are an unnecessary evil.&lt;br /&gt;
&lt;br /&gt;
This is how much smoother the line looks if you anti-alias it:&lt;br /&gt;
&lt;br /&gt;
http://wesnoth.org/wiki-images/exong-backup/anti_aliased_line_634.png&lt;br /&gt;
&lt;br /&gt;
Anti-aliasing copes with this by doing what any digital camera would do, in trying to decide what color a target pixel would be.  Imagine the target pixel as a rectangular area of different colors that you have to represent by a single color.  Imagine doing the same thing to a photograph.  How would you go about this?  By taking an average, that's how.  If you were doing this to a photograph of the empty sky, you might pick a light blue color.  When you are dealing with a line, you are dealing with a geometric object with width.  You're not really drawing a line, you're drawing a solid rectangle.  It's only in math that lines exist with no width - the lines you draw exist to pretend they are the &amp;quot;edges&amp;quot;, the infinitely small exact points at which one thing starts and another ends.&lt;br /&gt;
&lt;br /&gt;
In doing pixel and sprite art, you assume that your lines are usually 1 pixel in width.  To anti-alias, you, in your imagination, superimpose the line on a grid representing the real pixels you're drawing on to.  If the real, geometric line that you are trying to represent covers up a pixel completely, that pixel is the color of the line.  If the real, geometric line doesn't touch the pixel, the pixel gets no color from the line.  If the line covers it up partly, which is most common, the final color gets mixed towards the color of the line by exact fraction of how much the line covers the pixel.&lt;br /&gt;
&lt;br /&gt;
http://wesnoth.org/wiki-images/exong-backup/anti_aliasing_212.png&lt;br /&gt;
&lt;br /&gt;
Covering it all the way gives a full 1/1, and it goes all the way to the line's color.  Covering 1/2 of the way moves it half of the way to the color - if we have a black line on a white background, halfway between those two colors is a medium gray.  Covering just a tiny corner of the pixel with the line will mix in just a little bit of the line's color into the pixel - for the example we've been using this whole time, it'd end up a very light grey.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Applications to sprite art:===&lt;br /&gt;
&lt;br /&gt;
Anti-aliasing is how you make anything that is not a vertical or horizontal edge look good.  You can get away with not doing anti-aliasing on many parts of your images, but if you do it some of the time, on the parts where it is most needed, it will make the image look much better.  Anti-aliasing is often used on things like staves, or swords, when they hang at a slight angle rather than straight up or straight down.&lt;br /&gt;
&lt;br /&gt;
* One really nice trick is that mixing colors by transparency works exactly the same way as the color mixing I described above - in fact, it's the exact same thing.  If you anti-alias the edges of your units, where they interface with the terrain, they will look to have edges that follow the actual shape you intended, rather than being forced into a cartesian grid.  You can create pixels along the edges of your units that are the same color as the edge, but with variable transparency.  We can do this because, though we don't know what it's going to be mixed with, we do know how much of the unit's color to mix with the background, whatever that background is.  It follows the same rules as those for the line I showed above.  That &amp;quot;how much of the line's color&amp;quot; is the level of opacity.  To do this, you will need a program which can actually work with transparency values, like Adobe Photoshop, or the free Gnu Image Manipulation Program (GIMP).&lt;br /&gt;
&lt;br /&gt;
* One advanced way to have naturally anti-aliased lines is to draw your sprites with a paintbrush instead of the pencil tool.  This is, however, a very difficult technique, and not something to be attempted unless you are a master at sprite art.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[Create]]&lt;br /&gt;
* [[Create Art]]&lt;br /&gt;
&lt;br /&gt;
[[Category: Art Tutorials]]&lt;/div&gt;</summary>
		<author><name>Max2008</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=Scaling_Digital_Images&amp;diff=54318</id>
		<title>Scaling Digital Images</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=Scaling_Digital_Images&amp;diff=54318"/>
		<updated>2014-04-01T13:19:25Z</updated>

		<summary type="html">&lt;p&gt;Max2008: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Scaling of digital images is subject to the same problems that come with and without antialiasing.  Rasterized digital images are composed of a mosaic of little square pixels.  When you resize an image, a computer will create a new mosaic of pixels based on the previous one.  There are several methods that a computer can use to do this, which have slightly different results.&lt;br /&gt;
&lt;br /&gt;
Interpolation is the process of doing this resizing, and of choosing what colors should go into the new pixel mosaic.  When scaling an image to larger size, there will be more pixels present; there will be cases where there are now two pixels where there was one before.  When scaling an image to a smaller size, there will now be pixels saddled with the task of representing the same colors that more than one pixel did before.&lt;br /&gt;
&lt;br /&gt;
Nearest Neighbor interpolation, sometimes called a lack of interpolation altogether, decides which color the new pixel will be based on a simple criterion.  Imagine that instead of resizing the mosaic, that we were instead remaking the same thing at the exact same size, with many more (smaller) tiles - this would be analogous to scaling an image to a larger size.  One way to do this would be to simply use the exact same color as whatever previous tile was closest to the new one you're putting in.  In fact, you could simply break the old tiles into little pieces where they lay, and you'd get the same effect.&lt;br /&gt;
&lt;br /&gt;
The problems with this are simple - if you are scaling up, the tiles don't blend in color any more than they used to, which wastes the presence of all those new tiles.  The second problem is that if you are scaling to a smaller size, with less tiles, you will run into situations where two are being replaced by one.  In theory, if you had a blue tile next to a red tile, it might make sense to replace the both of them by a single purple tile; however, you are forced by the &amp;quot;Nearest Neighbor&amp;quot; method to choose one of those two and remove the other entirely.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Bicubic interpolation, and Bilinear interpolation, do the blending I just talked about.  There are many other methods which work something like these two, and when given a choice between them, always choose to use Bicubic Interpolation over Bilinear interpolation.  It's simply better.  It is very slightly slower, but this hasn't been an issue on personal computers for quite some time, and the continued availability of it is just a legacy of a time when computers were much worse than they are now.&lt;br /&gt;
&lt;br /&gt;
This image illustrates the bad effects of downscaling with Nearest Neighbor filtering:&lt;br /&gt;
&lt;br /&gt;
http://wesnoth.org/wiki-images/exong-backup/konradinterpolationcompare_656.png&lt;br /&gt;
&lt;br /&gt;
Side note:  One of the problems with digital scaling is trying to scale to a larger size.  A computer can scale any image to a smaller size without any problems, but to scale something to a larger size is difficult, because you're trying to fill in details that simply do not exist.  Nearest neighbor filtering will produce hard, rectangular edging, bicubic will blur the space between the pixels.  In certain rare instances, such as old-fashioned sprite art, special algorithms that follow the edges of similarly colored pixels can be used to better effect than either bicubic or nearest neighbor interpolation.  These are often used in nintendo emulators.  It should be noted, however, that these would be useless for wesnoth, because of how our sprite art is drawn.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Which Scaling to Use:===&lt;br /&gt;
based on the type of art being scaled.&lt;br /&gt;
&lt;br /&gt;
For sprite art, it is generally best to set your scaling method to &amp;quot;nearest neighbor.&amp;quot;  After scaling your image, you '''absolutely must''' retouch any misplaced pixels by hand, and I guarantee they will be present.  Sprite art is very difficult to scale, because of the procedural nature of its construction.  The smaller a piece of sprite art gets, the more important a single pixel and the arrangement of pixels becomes; thus it follows that any displacement of these can destroy the effect they had before.&lt;br /&gt;
&lt;br /&gt;
For basically all other art, use the &amp;quot;Bicubic Interpolation.&amp;quot;  Be this photos, scanned drawings, cell-shaded art, anything.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===How do I set this?===&lt;br /&gt;
(Note that this describes the global setting.  If, in any scale dialog box, there is another menu with the same thing in it, that sets the same thing, but only for that individual operation.)&lt;br /&gt;
&lt;br /&gt;
In the Gimp, you should find a panel in the preferences that looks a bit like this.  The section outlined in red is the place you change this:&lt;br /&gt;
http://wesnoth.org/wiki-images/exong-backup/scaling_363.png&lt;br /&gt;
&lt;br /&gt;
In photoshop, the following picture illustrates the same thing:&lt;br /&gt;
http://wesnoth.org/wiki-images/exong-backup/interpolationphotoshop_513.png&lt;br /&gt;
&lt;br /&gt;
[[Category: Art Tutorials]]&lt;/div&gt;</summary>
		<author><name>Max2008</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=Editing_Castles&amp;diff=54317</id>
		<title>Editing Castles</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=Editing_Castles&amp;diff=54317"/>
		<updated>2014-04-01T13:17:42Z</updated>

		<summary type="html">&lt;p&gt;Max2008: /* Editing the Existing Castles */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This tutorial is based on a gimp-python script, and as such is aimed squarely at users of The GIMP.&lt;br /&gt;
&lt;br /&gt;
It will show you how to edit the existing castle tiles while making sure they continue to line up properly in game. The same technique can be used for any tiles which work on the same principle (such as Eleazar's new canyons, or Scott's indoor walls).&lt;br /&gt;
&lt;br /&gt;
'''You will need to download both [http://www.wesnoth.org/forum/download.php?id=5197 this overlay template], and [http://www.wesnoth.org/forum/download.php?id=5196 this gimp-python script]. ''Extract the python script to your GIMP &amp;quot;plug-ins&amp;quot; directory'', and you're ready to go.'''&lt;br /&gt;
&lt;br /&gt;
== Editing the Existing Castles ==&lt;br /&gt;
&lt;br /&gt;
=== Step 1: Open ===&lt;br /&gt;
&lt;br /&gt;
Open the overlay template in The GIMP.&lt;br /&gt;
&lt;br /&gt;
http://wesnoth.org/wiki-images/exong-backup/shot1_568.jpg&lt;br /&gt;
&lt;br /&gt;
Find the castle tiles you want to modify and drag them onto your image. This should add each castle image as a separate layer. In this case I'm modifying the &amp;quot;castle-convex&amp;quot; parts of pekka's castles.&lt;br /&gt;
Press 'M' and move the layers around so that the images line up around the central white hex. The layers should snap to the guides in the overlay template, so this should be easy to get exactly right.&lt;br /&gt;
&lt;br /&gt;
http://wesnoth.org/wiki-images/exong-backup/shot2_531.jpg&lt;br /&gt;
&lt;br /&gt;
You can hide the guides (as I've done here) by pressing shift-control-T, or deselecting &amp;quot;show guides&amp;quot; in the &amp;quot;View&amp;quot; menu.&lt;br /&gt;
&lt;br /&gt;
=== Step 2: Edit ===&lt;br /&gt;
&lt;br /&gt;
Edit the castle to your heart's content. Here I'm just going to put some annoying little flags on top. Make sure you edit one corner at a time, and that you keep each corner on a separate layer. It's useful to turn &amp;quot;Snap to Guides&amp;quot; off (in the &amp;quot;View&amp;quot; menu) if you're doing any freehand drawing.&lt;br /&gt;
&lt;br /&gt;
http://wesnoth.org/wiki-images/exong-backup/shot3_178.jpg&lt;br /&gt;
&lt;br /&gt;
=== Step 3: Save ===&lt;br /&gt;
&lt;br /&gt;
Now to save the edited castle. First, make everything except for one corner invisible.&lt;br /&gt;
&lt;br /&gt;
http://wesnoth.org/wiki-images/exong-backup/shot4_494.jpg&lt;br /&gt;
&lt;br /&gt;
Then run the &amp;quot;WesCutter&amp;quot; script. If you've extracted the plugin to the right place, it should be found under &amp;quot;Wesnoth&amp;quot; in the Gimp &amp;quot;Python-Fu&amp;quot; menu. You'll be doing this again, so click the dotted line to detach the Wesnoth menu and save yourself a few clicks.&lt;br /&gt;
&lt;br /&gt;
The script lets you choose a directory to save the file in (I'm saving to my desktop), the base filename (in this case, &amp;quot;castle&amp;quot;), whether it's a concave or convex image (added to the filename) and which corner it is (in this case, NW).&lt;br /&gt;
&lt;br /&gt;
http://wesnoth.org/wiki-images/exong-backup/shot5_193.jpg&lt;br /&gt;
&lt;br /&gt;
After clicking on &amp;quot;OK&amp;quot;, I have a shiny new image called &amp;quot;castle-convex-nw.png&amp;quot; on my desktop, just the right size to work in Wesnoth. After doing this with all 6 corners, you can put them in the &amp;quot;images/terrain&amp;quot; subdirectory of your userdata directory (see [[EditingWesnoth]]). If you've put them in the right place, your new castles will automatically replace the old ones next time you run wesnoth http://www.wesnoth.org/forum/images/smiles/icon_smile.gif.&lt;br /&gt;
&lt;br /&gt;
http://wesnoth.org/wiki-images/exong-backup/shot6_273.jpg&lt;br /&gt;
&lt;br /&gt;
hooray!&lt;br /&gt;
&lt;br /&gt;
== Making other Corner-Based Terrains ==&lt;br /&gt;
&lt;br /&gt;
The same technique can also be used to make other corner-based terrains (for examples of other corner-based terrains, see [http://www.wesnoth.org/forum/viewtopic.php?t=7936 Eleazar's Canyons] and [http://www.wesnoth.org/forum/viewtopic.php?t=8274 Scott's Indoor Walls]).&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[Create]]&lt;br /&gt;
* [[Create Art]]&lt;br /&gt;
* [[CastleTutorial]]&lt;br /&gt;
* [[EditingWesnoth]]&lt;br /&gt;
&lt;br /&gt;
[[Category: Art Tutorials]]&lt;/div&gt;</summary>
		<author><name>Max2008</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=Turning_Square_Tiles_into_Hex&amp;diff=54231</id>
		<title>Turning Square Tiles into Hex</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=Turning_Square_Tiles_into_Hex&amp;diff=54231"/>
		<updated>2014-03-25T07:09:40Z</updated>

		<summary type="html">&lt;p&gt;Max2008: /* Method 2: Rotation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In Wesnoth the Terrain graphics are made with seamlessly tiling hexagonal pixmaps. These are more difficult to make than square tiles, for which ready made scripts exist in most image manipulation programs, and which can also be found in multitude of libraries, free to use.&lt;br /&gt;
&lt;br /&gt;
If you cut a square tile into a hexagon, it's only going to be seamless in north and south edges. To make it seamless in all edges takes a bit of trickery, but it's relatively simple. There are two methods to do it, the one that is better depending on the circumstances.&lt;br /&gt;
&lt;br /&gt;
==Method 1: Keeping the Orientation==&lt;br /&gt;
&lt;br /&gt;
Let's start with a dry mud texture from the standard GIMP library:&lt;br /&gt;
&lt;br /&gt;
http://wesnoth.org/wiki-images/tiles-to-hex/hextile1.png&lt;br /&gt;
&lt;br /&gt;
First it must be scaled to 54x36 pixel size (this applies to the standard 72x72 pixel Wesnoth hexes, for other hexes the figures are width*0.75 and height/2). Then resize the canvas by 2 in both directions and fill the empty space with copies of the tile:&lt;br /&gt;
&lt;br /&gt;
http://wesnoth.org/wiki-images/tiles-to-hex/hextile2.png&lt;br /&gt;
&lt;br /&gt;
Now crop the image to 72x72 pixels (the exact placement of the cropping does not matter) and trim the corners so that it matches the standard hex:&lt;br /&gt;
&lt;br /&gt;
http://wesnoth.org/wiki-images/tiles-to-hex/hextile3.png&lt;br /&gt;
&lt;br /&gt;
Now comes the moment of truth: what happens when we tile this hex? Let's see:&lt;br /&gt;
&lt;br /&gt;
http://wesnoth.org/wiki-images/tiles-to-hex/hextile4.png&lt;br /&gt;
&lt;br /&gt;
Almost makes you believe in magic, doesn't it?&lt;br /&gt;
&lt;br /&gt;
There are two important things to notice:&lt;br /&gt;
&lt;br /&gt;
# The size and aspect ratio of the original texture are not preserved (unless it is already 54x36 pixels), but this can be a good thing. If you start with a square tile where the pattern is seen as if looking down from above, when it gets scaled down vertically, it creates an impression of perspective (in Wesnoth, the terrain is seen from an angle, not directly above).&lt;br /&gt;
# The hex will contain the original pattern twice, that is, every unique feature in the original tile will appear in the hex tile two times. This may make the pattern appear too densely repeating, but once you have the hex made, you can change something about one copy of each feature to counteract this effect (as long as you don't touch the edge pixels, the tile will stay seamless).&lt;br /&gt;
&lt;br /&gt;
==Method 2: Rotation==&lt;br /&gt;
&lt;br /&gt;
In the second method the original tile must be square, for it will be rotated 45 degrees. The rotation may prove useful in cases where the pattern has straight forms, like stripes or checkers. In that case the end result will generally look better if the lines go from SE to NW and SW to NE rather than from south to north and west to east. So if your pattern has strong lines vertically or horizontally, you should use this method.&lt;br /&gt;
&lt;br /&gt;
If the original tile is not square, scale it horizontally or vertically so that it is. Double the size of the canvas in both directions and fill the space with copies of the tile, creating a 2x2 pattern. Below is our example, a ceramic tile pattern:&lt;br /&gt;
&lt;br /&gt;
http://wesnoth.org/wiki-images/tiles-to-hex/hextile21.png&lt;br /&gt;
&lt;br /&gt;
Next rotate the image 45 degrees and scale it so that the height becomes 144 and width 216 pixels:&lt;br /&gt;
&lt;br /&gt;
http://wesnoth.org/wiki-images/tiles-to-hex/hextile22.png&lt;br /&gt;
&lt;br /&gt;
Then cut the hex shape out anywhere you like (don't include any transparent pixels), and that's it (notice that the pattern appears only once in the hex):&lt;br /&gt;
&lt;br /&gt;
http://wesnoth.org/wiki-images/tiles-to-hex/hextile23.png&lt;br /&gt;
&lt;br /&gt;
If you doubt that it can be this simple, let's see how it tiles:&lt;br /&gt;
&lt;br /&gt;
http://wesnoth.org/wiki-images/tiles-to-hex/hextile24.png&lt;br /&gt;
&lt;br /&gt;
Which method to use depends on your requirements. If you need to preserve the original orientation, use method 1. If you need the rotation, or must have the pattern repeated only once per hex, use method 2 (simultaneously preserving orientation and having 1 repeat/hex is not possible with these methods). If the orientation and repeat number don't matter, the appropriate method depends on the desired size of the pattern: method 2 reproduces the pattern twice as big as method 1.&lt;br /&gt;
&lt;br /&gt;
[[Category: Art Tutorials]]&lt;/div&gt;</summary>
		<author><name>Max2008</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=Turning_Square_Tiles_into_Hex&amp;diff=54230</id>
		<title>Turning Square Tiles into Hex</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=Turning_Square_Tiles_into_Hex&amp;diff=54230"/>
		<updated>2014-03-25T07:09:00Z</updated>

		<summary type="html">&lt;p&gt;Max2008: /* Method 1: Keeping the Orientation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In Wesnoth the Terrain graphics are made with seamlessly tiling hexagonal pixmaps. These are more difficult to make than square tiles, for which ready made scripts exist in most image manipulation programs, and which can also be found in multitude of libraries, free to use.&lt;br /&gt;
&lt;br /&gt;
If you cut a square tile into a hexagon, it's only going to be seamless in north and south edges. To make it seamless in all edges takes a bit of trickery, but it's relatively simple. There are two methods to do it, the one that is better depending on the circumstances.&lt;br /&gt;
&lt;br /&gt;
==Method 1: Keeping the Orientation==&lt;br /&gt;
&lt;br /&gt;
Let's start with a dry mud texture from the standard GIMP library:&lt;br /&gt;
&lt;br /&gt;
http://wesnoth.org/wiki-images/tiles-to-hex/hextile1.png&lt;br /&gt;
&lt;br /&gt;
First it must be scaled to 54x36 pixel size (this applies to the standard 72x72 pixel Wesnoth hexes, for other hexes the figures are width*0.75 and height/2). Then resize the canvas by 2 in both directions and fill the empty space with copies of the tile:&lt;br /&gt;
&lt;br /&gt;
http://wesnoth.org/wiki-images/tiles-to-hex/hextile2.png&lt;br /&gt;
&lt;br /&gt;
Now crop the image to 72x72 pixels (the exact placement of the cropping does not matter) and trim the corners so that it matches the standard hex:&lt;br /&gt;
&lt;br /&gt;
http://wesnoth.org/wiki-images/tiles-to-hex/hextile3.png&lt;br /&gt;
&lt;br /&gt;
Now comes the moment of truth: what happens when we tile this hex? Let's see:&lt;br /&gt;
&lt;br /&gt;
http://wesnoth.org/wiki-images/tiles-to-hex/hextile4.png&lt;br /&gt;
&lt;br /&gt;
Almost makes you believe in magic, doesn't it?&lt;br /&gt;
&lt;br /&gt;
There are two important things to notice:&lt;br /&gt;
&lt;br /&gt;
# The size and aspect ratio of the original texture are not preserved (unless it is already 54x36 pixels), but this can be a good thing. If you start with a square tile where the pattern is seen as if looking down from above, when it gets scaled down vertically, it creates an impression of perspective (in Wesnoth, the terrain is seen from an angle, not directly above).&lt;br /&gt;
# The hex will contain the original pattern twice, that is, every unique feature in the original tile will appear in the hex tile two times. This may make the pattern appear too densely repeating, but once you have the hex made, you can change something about one copy of each feature to counteract this effect (as long as you don't touch the edge pixels, the tile will stay seamless).&lt;br /&gt;
&lt;br /&gt;
==Method 2: Rotation==&lt;br /&gt;
&lt;br /&gt;
In the second method the original tile must be square, for it will be rotated 45 degrees. The rotation may prove useful in cases where the pattern has straight forms, like stripes or checkers. In that case the end result will generally look better if the lines go from SE to NW and SW to NE rather than from south to north and west to east. So if your pattern has strong lines vertically or horizontally, you should use this method.&lt;br /&gt;
&lt;br /&gt;
If the original tile is not square, scale it horizontally or vertically so that it is. Double the size of the canvas in both directions and fill the space with copies of the tile, creating a 2x2 pattern. Below is our example, a ceramic tile pattern:&lt;br /&gt;
&lt;br /&gt;
http://koti.welho.com/thonkasa/Roinaa/hextile21.png&lt;br /&gt;
&lt;br /&gt;
Next rotate the image 45 degrees and scale it so that the height becomes 144 and width 216 pixels:&lt;br /&gt;
&lt;br /&gt;
http://koti.welho.com/thonkasa/Roinaa/hextile22.png&lt;br /&gt;
&lt;br /&gt;
Then cut the hex shape out anywhere you like (don't include any transparent pixels), and that's it (notice that the pattern appears only once in the hex):&lt;br /&gt;
&lt;br /&gt;
http://koti.welho.com/thonkasa/Roinaa/hextile23.png&lt;br /&gt;
&lt;br /&gt;
If you doubt that it can be this simple, let's see how it tiles:&lt;br /&gt;
&lt;br /&gt;
http://koti.welho.com/thonkasa/Roinaa/hextile24.png&lt;br /&gt;
&lt;br /&gt;
Which method to use depends on your requirements. If you need to preserve the original orientation, use method 1. If you need the rotation, or must have the pattern repeated only once per hex, use method 2 (simultaneously preserving orientation and having 1 repeat/hex is not possible with these methods). If the orientation and repeat number don't matter, the appropriate method depends on the desired size of the pattern: method 2 reproduces the pattern twice as big as method 1.&lt;br /&gt;
&lt;br /&gt;
[[Category: Art Tutorials]]&lt;/div&gt;</summary>
		<author><name>Max2008</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=EditingWesnoth&amp;diff=51251</id>
		<title>EditingWesnoth</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=EditingWesnoth&amp;diff=51251"/>
		<updated>2013-06-02T06:11:23Z</updated>

		<summary type="html">&lt;p&gt;Max2008: /* Windows */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{EditingWesnoth/Translations}}&lt;br /&gt;
&amp;lt;!-- single enters on this page are intentional --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Game and User Directories ==&lt;br /&gt;
&lt;br /&gt;
Wherever you install the game, there will be a game data directory that contains, of course, the game's data.  This directory should have the following subdirectories: data, music, sounds, and images.  There are several others, but these are the important ones. In this wiki, the terms &amp;quot;game data&amp;quot;, wesnoth/data,  or ./data refers to the wesnoth/data directory. You normally should not modify these files, but you can if you want to modify a unit or something.&lt;br /&gt;
&lt;br /&gt;
The user data directory holds your preferences file, custom maps, saved games, the WML cache and data files corresponding to user-created content (add-ons/maps). In this wiki, &amp;quot;user data&amp;quot; and ''userdata''/ refer to this directory.&lt;br /&gt;
&lt;br /&gt;
The paths to the game data and user data directories vary according to the operating system and packager. &lt;br /&gt;
&lt;br /&gt;
=== Where is my '''game''' data directory? ===&lt;br /&gt;
&lt;br /&gt;
====Windows====&lt;br /&gt;
&lt;br /&gt;
* ''X:\Program Files\Battle for Wesnoth &amp;lt;version&amp;gt;\data'', where X: corresponds to the drive where Windows is installed (normally C:).&lt;br /&gt;
* On 64-bit computers, it will be in ''X:\Program Files (x86)\Battle for Wesnoth &amp;lt;version&amp;gt;\data''.&lt;br /&gt;
* The path may be different if you originally chose to install the game in a different location. In such case, look for the data folder in the folder where you installed the game.&lt;br /&gt;
&lt;br /&gt;
====Mac OS X====&lt;br /&gt;
&lt;br /&gt;
* SourceForge.net bundle: Control+click on the application icon.  Select &amp;quot;Show Package Contents.&amp;quot;  Select &amp;quot;Contents&amp;quot;, then &amp;quot;Resources&amp;quot;.&lt;br /&gt;
* Custom builds: ''/usr/local/share/wesnoth''&lt;br /&gt;
&lt;br /&gt;
====Linux====&lt;br /&gt;
&lt;br /&gt;
* Custom builds: ''/usr/local/share/wesnoth''&lt;br /&gt;
* Debian/Ubuntu packages, or emerge (Gentoo): ''/usr/share/games/wesnoth''&lt;br /&gt;
* Red Hat Linux-based distributions in general (openSUSE, Fedora): ''/usr/share/wesnoth''&lt;br /&gt;
* Mandriva: ''/usr/share/games/wesnoth''&lt;br /&gt;
* Slackware Linux: ''/usr/local/share/wesnoth''&lt;br /&gt;
&lt;br /&gt;
In a terminal, the command &amp;lt;code&amp;gt;wesnoth --path&amp;lt;/code&amp;gt; shows the game data directory.&lt;br /&gt;
&lt;br /&gt;
====BSD====&lt;br /&gt;
&lt;br /&gt;
* OpenBSD package: ''/usr/local/share/wesnoth''&lt;br /&gt;
&lt;br /&gt;
The command &amp;lt;code&amp;gt;wesnoth --path&amp;lt;/code&amp;gt; also works.&lt;br /&gt;
&lt;br /&gt;
=== Where is my '''user''' data directory? ===&lt;br /&gt;
&lt;br /&gt;
====Windows====&lt;br /&gt;
&lt;br /&gt;
* Windows 2000/XP (1.8 and later): ''My Documents\My Games\Wesnoth1.8''&lt;br /&gt;
* Windows Vista/7 (1.8 and later): ''Documents\My Games\Wesnoth1.8''&lt;br /&gt;
* General (before 1.8): ''X:\Program Files\Battle for Wesnoth &amp;lt;version&amp;gt;\userdata'', where X: corresponds to the drive where Windows is installed (normally C:).&lt;br /&gt;
&lt;br /&gt;
''Note: If you don't remember where you installed the game, right click on the game's shortcut, open properties, and click on the &amp;quot;Find target&amp;quot; button, then search for the &amp;quot;data&amp;quot; folder.''&lt;br /&gt;
&lt;br /&gt;
''Note: If you chose &amp;quot;Store userdata in the install location&amp;quot; during installation you will find your userdata as mentioned above under &amp;quot;General&amp;quot;. This will also apply if you launch wesnoth.exe directly instead of using the start menu shortcut.''&lt;br /&gt;
&lt;br /&gt;
''Note: If your userdata folder is located in the install location (for the reasons mentioned above) and you are not an administrator on this machine Windows Vista/7 will silently redirect any write access to the so called Virtual Store. You can find your userdata folder in e.g. C:\Users\&amp;lt;yourname&amp;gt;\AppData\Local\VirtualStore\Program Files (x86)\Battle for Wesnoth &amp;lt;version&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
''Note: The AppData folder might not be visible, you can either change the default Folder Options (Control Panel / Appearance and Personalization / Folder Options, check &amp;quot;Show hidden files and folders&amp;quot;) or open a new Windows Explorer window, click in the address bar and type &amp;quot;shell:local appdata&amp;quot; (without the quotes)''&lt;br /&gt;
&lt;br /&gt;
====Mac OS X====&lt;br /&gt;
&lt;br /&gt;
* SourceForge.net bundle: ''~/Library/Application Support/Wesnoth_1.x/'' (1.8 and later), or ''~/Library/Preferences/Wesnoth'' (older versions). As of OS X 10.7, this location is hidden by default.&lt;br /&gt;
* Custom builds: same as Linux - see below for details.&lt;br /&gt;
&lt;br /&gt;
====Linux====&lt;br /&gt;
* Wesnoth 1.10: ''~/.local/share/wesnoth/1.10''&lt;br /&gt;
* Wesnoth 1.9: ''~/.local/share/wesnoth/1.9''&lt;br /&gt;
* Wesnoth 1.8: ''~/.wesnoth1.8''&lt;br /&gt;
* Older versions: ''~/.wesnoth''&lt;br /&gt;
&lt;br /&gt;
In a terminal, the command &amp;lt;code&amp;gt;wesnoth --config-path&amp;lt;/code&amp;gt; shows the user data directory.&lt;br /&gt;
&lt;br /&gt;
====BSD====&lt;br /&gt;
* Same place as Linux.&lt;br /&gt;
&lt;br /&gt;
== Game Data ==&lt;br /&gt;
&lt;br /&gt;
The major directories you need to know about are wesnoth/data, wesnoth/data/core/units, wesnoth/data/campaigns, wesnoth/data/multiplayer, wesnoth/images and wesnoth/data/core/images&lt;br /&gt;
&lt;br /&gt;
Become familiar with what is in ./data/campaigns and ./data/multiplayer/scenarios.  These have the officially distributed campaigns and multiplayer maps.  If you ever want to examine or edit one of the scenario configuration files, this is where you would go.  For example, a common question is how a new player can give himself more turns or gold in scenario X.  This is where you would go to do that.&lt;br /&gt;
&lt;br /&gt;
Two very important directories are ./data/core/units/ and ./images.  You have the ability to drop new units or images in these directories and have the game recognize them.  When specifying an image for something, you do so relative to ./images.&lt;br /&gt;
&lt;br /&gt;
== User Data ==&lt;br /&gt;
&lt;br /&gt;
The user data directory can do a lot of things.  The game looks here for several things:&lt;br /&gt;
* ''userdata''/data/add-ons - campaign configuration files and subdirectories&lt;br /&gt;
* ''userdata''/editor/maps - multiplayer standalone maps (map data only)&lt;br /&gt;
&lt;br /&gt;
The ''userdata''/data/add-ons directory is particularly useful.  A single configuration file here can selectively point to an entire subdirectory tree of units, images, sounds, scenarios, and macros.  This allows you to wall off parts. Content included in the userdata units or images directories will be available globally whether you want it or not.&lt;br /&gt;
&lt;br /&gt;
For example, assume you have a campaign called MyCampaign.  This is what the ''userdata''/data/add-ons directory might look like:&lt;br /&gt;
* ''userdata''/data/add-ons/MyCampaign/ - your campaign's directory&lt;br /&gt;
* ''userdata''/data/add-ons/MyCampaign/_main.cfg - a text file containing your instructions for the game about how to load the campaign&lt;br /&gt;
** ''userdata''/data/add-ons/MyCampaign/scenarios&lt;br /&gt;
** ''userdata''/data/add-ons/MyCampaign/units&lt;br /&gt;
** ''userdata''/data/add-ons/MyCampaign/images&lt;br /&gt;
** ''userdata''/data/add-ons/MyCampaign/music&lt;br /&gt;
** ''userdata''/data/add-ons/MyCampaign/sounds&lt;br /&gt;
** ''userdata''/data/add-ons/MyCampaign/utils&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[Create]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Create]]&lt;/div&gt;</summary>
		<author><name>Max2008</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=SingleUnitWML&amp;diff=43876</id>
		<title>SingleUnitWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=SingleUnitWML&amp;diff=43876"/>
		<updated>2011-10-20T12:43:45Z</updated>

		<summary type="html">&lt;p&gt;Max2008: /* How to describe a single unit */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WML Tags}}&lt;br /&gt;
== How to describe a single unit ==&lt;br /&gt;
&lt;br /&gt;
This tag, '''[unit]''', describes a single unit on the map, for example Konrad.&lt;br /&gt;
It is different from the [unit_type] in [units], which describes a class of units. However it takes many of the same keys and thus can generally override the inherited properties from the associated [unit_type].&lt;br /&gt;
&lt;br /&gt;
[unit] can be used inside [side] ([[SideWML]]) for units present at start of the scenario, or as [[DirectActionsWML]] for units created during the game. (It is also used in save-files.)&lt;br /&gt;
&lt;br /&gt;
The following keys are recognized:&lt;br /&gt;
* '''type''': the ID of the unit's unit type. See [[UnitTypeWML]].&lt;br /&gt;
&lt;br /&gt;
* '''side''': the side that the unit is on. It has to be an existing side, even if the unit is created in a variable.&lt;br /&gt;
&lt;br /&gt;
* '''gender''': can be set to male or female to designate the gender of the unit. Default is male, but if the unit has only a female variant it will be female.&lt;br /&gt;
&lt;br /&gt;
* '''x''', '''y''': the location of the unit. By default ( see '''placement''') if a location isn't provided and the side the unit will belong to has a recall list, the unit will be created on the recall list.&lt;br /&gt;
&lt;br /&gt;
* '''placement''': How the unit should be placed: can be one value or a comma-separated list of values. Default value is  'map,leader' for a leader given directly in [side], &amp;quot;&amp;quot; otherwise. By default, 'map,recall' is implicitly appended to the end of the list.&lt;br /&gt;
** '''map''': If x,y are explicitly given and point to a valid on-map location - try to place the unit at the nearest free location to there, never overwriting existing units. Successful if x,y are given and a valid on-map vacant location near it can be found.&lt;br /&gt;
** '''leader''': Try to place unit near the leader, if leader is not present or is in recall list - try to place unit near the start location for this side. Successful if a valid on-map vacant location can be found near leader or near start location.&lt;br /&gt;
** '''recall''': Place unit on recall list. Always successful. &lt;br /&gt;
** '''map_overwrite''': If x,y are explicitly given and point to a valid on-map location - try to place unit at this location, if there was a unit there - overwriting it, without firing events. &lt;br /&gt;
&lt;br /&gt;
* '''to_variable''': creates the unit into the given variable instead of placing it on the map.&lt;br /&gt;
&lt;br /&gt;
* '''id''': a unique identifier for the unit. This is not displayed to the player, but is to be used only for identifying and filtering for units. If not specified or when a unit is normally recruited, a random one will be generated for the unit to ensure that each unit has a unique ''id'' attribute.  In older versions, the '''description''' attribute specified a unique ID.&lt;br /&gt;
&lt;br /&gt;
* '''name''': the user-visible name of the unit. Note that the player may use the &amp;quot;rename unit&amp;quot; action to change this.&lt;br /&gt;
&lt;br /&gt;
* '''generate_name''': (default=yes) will generate a new name if there isn't one specifed for the unit, as if the unit were a freshly-recruited one&lt;br /&gt;
&lt;br /&gt;
* '''unrenamable''': if 'yes', the user-visible name of the unit cannot be changed by the player (which is only possible when the unit is on the player's side anyway).&lt;br /&gt;
&lt;br /&gt;
* '''traits_description''': the description of the unit's traits which is displayed. However if it is not specified explicitly, the unit's actual traits' names will be used instead, so it is normally not necessary to set this.&lt;br /&gt;
&lt;br /&gt;
* '''random_traits''': &amp;quot;no&amp;quot; will prevent random trait generation for units. You should only need to set this for placed nonleaders in multiplayer games or if you want to give a unit less traits than it would normally get for its unit type. When generating traits for a unit, first traits the unit has already been given are excluded. Then &amp;quot;musthave&amp;quot; traits (undead, mechanical) for the unit type are given. Then for leaders ('''canrecruit=yes''') traits that are not available to &amp;quot;any&amp;quot; (currently that's all of them to avoid a multiplayer OOS issue, but later will be restricted based on multiplayer play balance issues) are removed from consideration. Then traits are added randomly until the maximum allowed for the unit type is reached or there are no more available traits. Random traits can now be used in MP games but only when spawned in an event, so not for leaders and other units in the [side] definition.&lt;br /&gt;
&lt;br /&gt;
* '''random_gender''': &amp;quot;yes&amp;quot; will cause the gender of the unit with male and female variations to be male 50% of the time, female 50% of the time.  If the unit has only one gender variant it will always be given the correct one.&lt;br /&gt;
&lt;br /&gt;
* '''canrecruit''': a special key for leaders.&lt;br /&gt;
** '''no''': default. Unit cannot recruit.&lt;br /&gt;
** '''yes''': unit can recruit.&lt;br /&gt;
: Normally when a team controls no units with '''canrecruit=yes''', that team loses. However, even if your team has lost you continue to play with whatever units you still have until the scenario is over. Usually scenarios end when only one team is left with a leader that can recruit, but special victory conditions can be set up in campaigns. Normally you want to set the leader of a side with '''canrecruit=yes'''. If you don't want the leader to recruit, it is usually better to just not give him any unit types to recruit, than to make a special victory condition. Units with '''canrecruit=yes''' are exempt from upkeep costs. So that leaders do not need to be given the ''loyal'' trait.&lt;br /&gt;
: More than one unit with '''canrecruit=yes''' for the same side (see [[SideWML]]) are allowed in single player, if the side is human-controlled.&lt;br /&gt;
&lt;br /&gt;
* '''extra_recruit''': a list of unit types which this unit can recruit in addition to the ones given by its [side]recruit=, only working for units with '''canrecruit=yes'''. {{DevFeature1.9}}&lt;br /&gt;
&lt;br /&gt;
* '''variation''': the variation of itself the unit should be created as.&lt;br /&gt;
&lt;br /&gt;
* '''upkeep''': the amount of upkeep the unit costs.&lt;br /&gt;
** '''loyal''': no upkeep cost. Can be changed by the effect 'loyal' (see [[EffectWML]])&lt;br /&gt;
** '''free''': synonymous with &amp;quot;loyal&amp;quot;.&lt;br /&gt;
** '''full''': unit costs ''level'' upkeep (see [[UnitTypeWML]]).&lt;br /&gt;
** An integer can be used to set the upkeep cost to that number.&lt;br /&gt;
** The default is &amp;quot;full&amp;quot;.&lt;br /&gt;
** Leaders (units with '''canrecruit=yes''') never pay upkeep no matter what upkeep is set to.&lt;br /&gt;
** Normally you don't want to muck with this value. If you want to give a side units without upkeep costs, give those units the 'loyal' trait.&lt;br /&gt;
&lt;br /&gt;
* '''overlays''': a list of images that are overlayed on the unit.&lt;br /&gt;
&lt;br /&gt;
* '''goto_x''':, '''goto_y''': UI settings that control courses. Default is 0,0 i.e. the unit is not on a course.&lt;br /&gt;
&lt;br /&gt;
* '''hitpoints''': the HP of the unit. Default is the max HP for ''type''.&lt;br /&gt;
&lt;br /&gt;
* '''experience''': the XP of the unit. Default is 0.&lt;br /&gt;
&lt;br /&gt;
* '''moves''': number of movement points the unit has left. Default is the movement for its unit type.&lt;br /&gt;
&lt;br /&gt;
* '''resting''': whether the unit has not moved yet this turn. Used to decide whether to give a unit rest healing.&lt;br /&gt;
&lt;br /&gt;
* '''role''': used in standard unit filter ([[FilterWML]]). Can be set using [role] (see [[InternalActionsWML]]).&lt;br /&gt;
&lt;br /&gt;
* '''ai_special''': causes the unit to act differently.&lt;br /&gt;
** &amp;quot;guardian&amp;quot; the unit will not move, except to attack something in the turn it moves (so, it only can move if an enemy unit gets within range of it).&lt;br /&gt;
&lt;br /&gt;
* '''facing''': which way the unit is facing (this only affects how the unit is displayed).&lt;br /&gt;
** Possible values are '''se''', '''s''', '''sw''', '''nw''', '''n''', '''ne'''. Using '''sw''' is preferred for a &amp;quot;reversed&amp;quot; facing (looking to the left) and '''se''' for a normal (looking to the right) facing.&lt;br /&gt;
&lt;br /&gt;
* '''profile''': sets a portrait image for this unit. If the unit type already has a portrait set, this is used instead for this unit. When the unit advances, if the value of profile is different from the unit-type portrait, that value is preserved. If the profile field is empty or the same as the unit-type portrait, the level-advance changes the unit portrait to the default for the new level and type. See [[UnitTypeWML]] for the rules used for locating files.&lt;br /&gt;
** &amp;quot;unit_image&amp;quot; if given instead of a filename, uses the unit's base image as the portrait (in the same manner that unit types without portraits do by default).&lt;br /&gt;
&lt;br /&gt;
* '''small_profile''': {{DevFeature1.9}} sets a small portrait image for this unit. See the '''profile''' attribute above for advancement and special values. As with [[UnitTypeWML]], the location heuristic of the '''profile''' attribute is disabled when the '''small_profile''' attribute is provided.&lt;br /&gt;
&lt;br /&gt;
* '''animate''': if ''yes'', fades the unit in like when it's recruited/recalled.&lt;br /&gt;
&lt;br /&gt;
* '''[status]''' the status of the unit. This affects different features of the unit, for example whether the unit loses health each turn. Default for all keys is 'off', but this can be changed by the scenario or by special abilities (see [[AbilitiesWML]]). The status of a unit is displayed on the Status Table; each status modification ''statusmod'' is represented by the image '''misc/statusmod.png'''.&lt;br /&gt;
** '''poisoned''': if 'yes', the unit loses 8 HP each turn. See also ''heals'', ''cures'', [[AbilitiesWML]].&lt;br /&gt;
** '''slowed''': if 'yes', the unit has 50% of its normal movement and does half damage. When the controller of the unit's turn is over, ''slowed'' is set to 'off'  &lt;br /&gt;
** '''petrified''': if 'yes', the unit cannot move, attack, or be attacked.&lt;br /&gt;
** '''uncovered''': if 'yes', the unit has performed an action (e.g. attacking) that causes it to no longer be hidden until the next turn.&lt;br /&gt;
** '''guardian''': this is set to 'yes' by ai_special=guardian and clearing it will allow the unit to act normally again.&lt;br /&gt;
** '''healable''': if set to 'no', the unit cannot be healed. {{DevFeature1.9}} ''healable'' is deprecated, use ''unhealable'' instead.&lt;br /&gt;
** '''unhealable''': {{DevFeature1.9}} if set to 'yes', the unit cannot be healed.  Use '''not_healable''' as a workaround for 1.8&lt;br /&gt;
&lt;br /&gt;
* '''[variables]''' a set of variables that will be stored when this unit is stored (See [store_unit], [[InternalActionsWML]]). The attribute '''variable'''='''value''' means that when the unit is stored in the array ''unit'', the variable '''unit'''.variables.''variable'' will have the value ''value'' (See [[VariablesWML]]).&lt;br /&gt;
&lt;br /&gt;
* '''[modifications]''' changes that have been made to the unit.&lt;br /&gt;
** '''[trait]''' a trait the unit has. Same format as [trait], [[UnitsWML]].&lt;br /&gt;
** '''[object]''' an object the unit has. Same format as [object], [[DirectActionsWML]].&lt;br /&gt;
&lt;br /&gt;
* '''[filter_recall]''' A leader can only recall those units which pass the SUF.&lt;br /&gt;
**'''[[StandardUnitFilter]]''' tags and keys&lt;br /&gt;
&lt;br /&gt;
* '''unit_description''': overrides the unit type description for this unit. You will probably want to set up a ''post_advance'' [[EventWML|event]] to override the default description after promotions. Or better, use an object with a profile [[EffectWML|effect(s)]] to filter on unit type and change the unit description and/or portrait.&lt;br /&gt;
&lt;br /&gt;
* '''[event]''' {{DevFeature1.9}} The event is copied from this unit's wml description into the scenario. The event is carried along with the unit (it can advance etc) and inserted into every scenario where this unit is first created. A [unit][event] is required a non-empty id= attribute.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[UnitTypeWML]]&lt;br /&gt;
* [[ReferenceWML]]&lt;br /&gt;
&lt;br /&gt;
[[Category:WML Reference]]&lt;/div&gt;</summary>
		<author><name>Max2008</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=EditingWesnoth&amp;diff=43733</id>
		<title>EditingWesnoth</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=EditingWesnoth&amp;diff=43733"/>
		<updated>2011-09-22T08:12:16Z</updated>

		<summary type="html">&lt;p&gt;Max2008: /* Windows */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- single enters on this page are intentional --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Game and User Directories ==&lt;br /&gt;
&lt;br /&gt;
Wherever you install the game, there will be a game data directory that contains, of course, the game's data.  This directory should have the following subdirectories: data, music, sounds, and images.  There are several others, but these are the important ones. In this wiki, the terms &amp;quot;game data&amp;quot;, wesnoth/data,  or ./data refers to the wesnoth/data directory. You normally should not modify these files, but you can if you want to modify a unit or something.&lt;br /&gt;
&lt;br /&gt;
The user data directory holds your preferences file, custom maps, saved games, the WML cache and data files corresponding to user-created content. In this wiki, &amp;quot;user data&amp;quot; and ''userdata''/ refer to this dir.&lt;br /&gt;
&lt;br /&gt;
The paths to the game data and user data dirs vary according to the operating system and packager. &lt;br /&gt;
&lt;br /&gt;
=== Where is my '''game''' data directory? ===&lt;br /&gt;
&lt;br /&gt;
====Windows====&lt;br /&gt;
&lt;br /&gt;
* ''X:\Program Files\Battle for Wesnoth &amp;lt;version&amp;gt;\data'', where X: corresponds to the drive where Windows is installed (normally C:).&lt;br /&gt;
* The path may be different if you originally chose to install the game in a different location. In such case, look for the data folder in the folder where you installed the game.&lt;br /&gt;
&lt;br /&gt;
====Mac OS X====&lt;br /&gt;
&lt;br /&gt;
* SourceForge.net bundle: Control+click on the application icon.  Select &amp;quot;Show Package Contents.&amp;quot;  Select &amp;quot;Contents&amp;quot;, then &amp;quot;Resources&amp;quot;.&lt;br /&gt;
* Custom builds: ''/usr/local/share/wesnoth''&lt;br /&gt;
&lt;br /&gt;
====Linux====&lt;br /&gt;
&lt;br /&gt;
* Custom builds: ''/usr/local/share/wesnoth''&lt;br /&gt;
* Debian/Ubuntu packages, or emerge (Gentoo): ''/usr/share/games/wesnoth''&lt;br /&gt;
* Red Hat Linux-based distributions in general (openSUSE, Fedora): ''/usr/share/wesnoth''&lt;br /&gt;
* Mandriva: ''/usr/share/games/wesnoth''&lt;br /&gt;
* Slackware Linux: ''/usr/local/share/wesnoth''&lt;br /&gt;
* Alternatively, you can try one of commands &amp;lt;code&amp;gt;slocate wesnoth&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;find / -name '*wesnoth*'&amp;lt;/code&amp;gt; (as yourself, not as superuser) if you are using a different distribution or the locations mentioned above don't exist.&lt;br /&gt;
&lt;br /&gt;
=== Where is my '''user''' data directory? ===&lt;br /&gt;
&lt;br /&gt;
====Windows====&lt;br /&gt;
&lt;br /&gt;
* Windows 2000/XP (1.8 and later): ''My Documents\My Games\Wesnoth1.8''&lt;br /&gt;
* Windows Vista/7 (1.8 and later): ''Documents\My Games\Wesnoth1.8''&lt;br /&gt;
* General (before 1.8): ''X:\Program Files\Battle for Wesnoth &amp;lt;version&amp;gt;\userdata'', where X: corresponds to the drive where Windows is installed (normally C:).&lt;br /&gt;
&lt;br /&gt;
''Note: If you don't remember where you installed the game, right click on the game's shortcut, open properties, and click on the &amp;quot;Find target&amp;quot; button, then search for the &amp;quot;data&amp;quot; folder.''&lt;br /&gt;
&lt;br /&gt;
''Note: If you chose &amp;quot;Store userdata in the install location&amp;quot; during installation you will find your userdata as mentioned above under &amp;quot;General&amp;quot;. This will also apply if you launch wesnoth.exe directly instead of using the start menu shortcut.''&lt;br /&gt;
&lt;br /&gt;
''Note: If your userdata folder is located in the install location (for the reasons mentioned above) and you are not an administrator on this machine Windows Vista/7 will silently redirect any write access to the so called Virtual Store. You can find your userdata folder in e.g. C:\Users\&amp;lt;yourname&amp;gt;\AppData\Local\VirtualStore\Program Files\Battle for Wesnoth &amp;lt;version&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
====Mac OS X====&lt;br /&gt;
&lt;br /&gt;
* SourceForge.net bundle: ''~/Library/Application Support/Wesnoth_1.x/'' (1.8 and later), or ''~/Library/Preferences/Wesnoth'' (older versions).&lt;br /&gt;
* Custom builds: same as Linux - see below for details.&lt;br /&gt;
&lt;br /&gt;
====Linux====&lt;br /&gt;
* Wesnoth 1.9: ''~/.local/share/wesnoth/''&lt;br /&gt;
* Wesnoth 1.8: ''~/.wesnoth1.8''&lt;br /&gt;
* Older versions: ''~/.wesnoth''.&lt;br /&gt;
* It's also possible to check the beginning of Wesnoth's stderr output in a terminal emulator to see the path Wesnoth uses to access its configuration.&lt;br /&gt;
&lt;br /&gt;
== Game data ==&lt;br /&gt;
&lt;br /&gt;
The major directories you need to know about are wesnoth/data, wesnoth/data/core/units, wesnoth/data/campaigns, wesnoth/data/multiplayer, wesnoth/images and wesnoth/data/core/images&lt;br /&gt;
&lt;br /&gt;
Become familiar with what is in ./data/campaigns and ./data/multiplayer/scenarios.  These have the officially distributed campaigns and multiplayer maps.  If you ever want to examine or edit one of the scenario configuration files, this is where you would go.  For example, a common question is how a new player can give himself more turns or gold in scenario X.  This is where you would go to do that.&lt;br /&gt;
&lt;br /&gt;
Two very important directories are ./data/core/units/ and ./images.  You have the ability to drop new units or images in these directories and have the game recognize them.  When specifying an image for something, you do so relative to ./images.&lt;br /&gt;
&lt;br /&gt;
== User data ==&lt;br /&gt;
&lt;br /&gt;
The user data directory can do a lot of things.  The game looks here for several things:&lt;br /&gt;
* ''userdata''/data/add-ons - campaign configuration files and subdirectories&lt;br /&gt;
* ''userdata''/editor/maps - multiplayer standalone maps (map data only)&lt;br /&gt;
&lt;br /&gt;
The ''userdata''/data/add-ons directory is particularly useful.  A single configuration file here can selectively point to an entire subdirectory tree of units, images, sounds, scenarios, and macros.  This allows you to wall off parts. Content included in the userdata units or images directories will be available globally whether you want it or not.&lt;br /&gt;
&lt;br /&gt;
For example, assume you have a campaign called MyCampaign.  This is what the ''userdata''/data/add-ons directory might look like:&lt;br /&gt;
* ''userdata''/data/add-ons/MyCampaign/ - your campaign's directory&lt;br /&gt;
* ''userdata''/data/add-ons/MyCampaign/_main.cfg - a text file containing your instructions for the game about how to load the campaign&lt;br /&gt;
** ''userdata''/data/add-ons/MyCampaign/scenarios&lt;br /&gt;
** ''userdata''/data/add-ons/MyCampaign/units&lt;br /&gt;
** ''userdata''/data/add-ons/MyCampaign/images&lt;br /&gt;
** ''userdata''/data/add-ons/MyCampaign/music&lt;br /&gt;
** ''userdata''/data/add-ons/MyCampaign/sounds&lt;br /&gt;
** ''userdata''/data/add-ons/MyCampaign/utils&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[Create]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border:1px solid #5599FF; margin-top: 10px; margin-bottom: 5px; padding: 5px;&amp;quot;&amp;gt;&lt;br /&gt;
- [[EditingWesnoth|English]] - [[Editer Wesnoth vf|Français]] -&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
[[Category:Create]]&lt;/div&gt;</summary>
		<author><name>Max2008</name></author>
		
	</entry>
</feed>