<?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=Sergeant+Groovy</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=Sergeant+Groovy"/>
	<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/Special:Contributions/Sergeant_Groovy"/>
	<updated>2026-05-10T21:49:00Z</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=40373</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=40373"/>
		<updated>2011-02-26T17:44:59Z</updated>

		<summary type="html">&lt;p&gt;Sergeant Groovy: &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://koti.welho.com/thonkasa/Roinaa/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://koti.welho.com/thonkasa/Roinaa/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://koti.welho.com/thonkasa/Roinaa/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://koti.welho.com/thonkasa/Roinaa/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://koti.welho.com/thonkasa/Roinaa/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://koti.welho.com/thonkasa/Roinaa/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>Sergeant Groovy</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=Shaped_gradients_with_Gaussian_blur&amp;diff=40342</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=40342"/>
		<updated>2011-02-15T18:10:16Z</updated>

		<summary type="html">&lt;p&gt;Sergeant Groovy: &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://koti.welho.com/thonkasa/Roinaa/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://koti.welho.com/thonkasa/Roinaa/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://koti.welho.com/thonkasa/Roinaa/tutorial4.png&lt;br /&gt;
&lt;br /&gt;
[[Category: Art Tutorials]]&lt;/div&gt;</summary>
		<author><name>Sergeant Groovy</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=Variable-width_strokes&amp;diff=40341</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=40341"/>
		<updated>2011-02-15T18:09:29Z</updated>

		<summary type="html">&lt;p&gt;Sergeant Groovy: &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://koti.welho.com/thonkasa/Roinaa/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>Sergeant Groovy</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=Smooth_shading_in_vector&amp;diff=40340</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=40340"/>
		<updated>2011-02-15T18:08:23Z</updated>

		<summary type="html">&lt;p&gt;Sergeant Groovy: &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://koti.welho.com/thonkasa/Roinaa/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://koti.welho.com/thonkasa/Roinaa/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://koti.welho.com/thonkasa/Roinaa/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://koti.welho.com/thonkasa/Roinaa/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://koti.welho.com/thonkasa/Roinaa/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://koti.welho.com/thonkasa/Roinaa/koti.welho.com/thonkasa/Roinaa/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>Sergeant Groovy</name></author>
		
	</entry>
</feed>