Create a misty hill scene in Inkscape

Introduction

In a previous designmark tutorial, How to create detailed vector traces in Inkscape, we took a stock tree photograph and converted it to vector form ready to use in another project. While this article naturally follows on, I've written is as a standalone piece so there's no required knowledge before you get here.

This tutorial will show you how to create a misty landscape scene, with hills extending and fading into the background. Introducing your original silhouette into the piece is simply a case of copy + paste, so to add your object into this image and make it a foreground subject should be nice and simple.

In this in-depth Inkscape tutorial, we'll be using Sharon Milne's Create a Hill Scene Using Gradients in Adobe Illustrator as a base, and converting it to the Inkscape equivalent. This piece is written with thanks and credit to her for providing inspiration and an instructional template.

So first of all, let's have a preview of what you'll have made by the end of this tutorial:

Skills you'll be developing in this tutorial

Creating complex polygons and combining them and their fills

Creating and managing gradients in Inkscape, as well as their interaction with each other

Using Blur and Opacity adjustments

Step 1 - Create a canvas for the image and prepare the colour palette

The first thing we need to do is set up our Inkscape project and prepare all the resources we need to make our workflow nice and smooth.

Open the Document Properties dialog box and set your canvas width and height to a good size ready for our layered, rolling hill vector drawing. We'll use a landscape orientation of width 2200px and height 1600px.

Let's get all of our helper elements set up straight away, starting with the colour palette.

I'm going to take the quick route and replicate Sharon's palette directly using one of the images from her tutorial. Navigate to the Design Tutsplus article in a browser window, then right-click and save the Kuler palette image (3rd from the top) to your computer.

Drag the file into Inkscape's window, and select Link from the dialog box which appears to place it inside the application's window as a linked image. Position it somewhere outside the central canvas area using the mouse so it's not in our way.

Grab the Rectangle tool from Inkscape's toolbox (keyboard shortcut R), and quickly draw five rectangles outside of the central canvas area. Select each in turn and, with the Dropper tool (keyboard button D), assign it a fill colour matching one of the five from the imported image by clicking on areas of the imported image. We'll be using the colour of these squares to fill other shapes later on with the Dropper tool.

Add a rectangle covering the whole of the canvas, which will act as our final image's background. You might like to switch the grid on for this step, by pressing the # key, to make fitting the rectangle's edges to the edges of the canvas much easier. Again using the Dropper tool, give this rectangle a fill of the lightest sky colour from the palette: #f5eed2ff.

As this is our background colour, let's add the rest of the image's elements on other layers above it. This will also help to keep our work organised and easier to manager. Select Layer --> Add Layer or press Ctrl, Shift and N, and name the new layer "Hills", selecting Above current for the Position. You can bring up the Layers panel via the Layer --> Layers menu, or by pressing Ctrl, Shift and L at any time.

Step 2 - Draw the first hill polygon

Time to get started on the drawing itself. As with the original guide, we'll start at the top of the image and add more as we work downwards - each new shape appears on top of previous ones, so this is a sensible way to work. Activate the Pen tool with the B key and click on a series of points which form a very crude hill outline extending beyond the edges of the canvas area. You can toggle the grid off for this step - press the # key again to do it.

Don't worry about creating slopes or a realistic set of rolling hills straight away, just a box with a zig-zag top contour will suffice. Click on each point in turn, then hover over your first node and click once more to close the shape.

In order to generate an uneven landscape effect with sufficient detail, we need to add lots of individual points to this shape then get Inkscape to move them around randomly, giving us a natural-looking result.

So, activate the Node tool from the toolbox, or using the F2 key. Click on your newly-created shape so the individual nodes around its border become visible. Then drag a selection area which covers the top nodes to select them - they'll change colour when you do.

In the Node tool's toolbar, find and click the Add Nodes button three or four times. You can see exactly how many nodes are in the selection in the information bar at the bottom of the Inkscape window. You'll also see why we only selected the top area's nodes - if we added nodes to the whole shape we'd have thousands of superfluous vertices, which we obviously don't need.

From the menus, select Extensions --> Modify Path --> Jitter nodes and, in the dialog box which appears, enter the following settings: Maximum displacement in x, px: 2.0, Maximum displacement in y, px: 6.0, tick Shift nodes and Use normal distribution, and leave Shift node handles unticked. Then click OK to apply the effect.

Step 3 - Create the hill gradient

That should give you a nice outline for your first hill shape, now to use our colour palette to give it the right appearance. Hit the D key to activate the Dropper tool again, and click on the lightest blue colour from the pre-set colour squares we created earlier: #ccdacdff. Then use the Fill and Stroke dialog box (Ctrl, Shift and F) to remove the outline stroke from the hill shape by clicking the X.

Keeping the Fill and Stroke dialog box open, find the Linear Gradient button and click it, then click the Edit button to open a new window in which we can make changes to the gradient fill of this shape.

From the Stops dropdown, select the lower of the two stops - this is the transparent end-point of the gradient we've just created. Unfortunately, we can't set the colour of this Gradient stop using the Dropper, but we can copy and paste a colour from another shape into the box in the bottom-right corner to get the right result.

Click on the lightest sky colour from our palette rectangles, then copy the colour from the RGBA box on the Fill and Stroke panel with trusty old Ctrl and C. Paste this setting into the Gradient Editor window with Ctrl and V to give a solid gradient fill of our two lightest colours.

Pick up the Gradient Tool with Ctrl and F1, and change the direction of this gradient, which will be horizontal by default, to be vertical: from the top of the hill shape to about half way down it.

Step 4 - Add more hills and an overlay gradient

Use the same steps as above to add more hills to your composition, applying the same gradient fill to each one. Try to keep their undulations similar to each other for a more consistent composition, but move the peaks and troughs around so as not to make them appear copies of each other.

Introduce a couple of ranges which don't span the full width of the canvas, and watch your gradient stops so the hard edges to the shape can't be seen. As you get lower down the image - closer to the 'front' of the view - space the hills out slightly more vertically. This will add a greater feeling of depth and realism to our piece.

To enhance the sense of distance and perspective in our image even further, select the top few hill ranges and lower their Opacity in the Fill and Stroke dialog box. Give the furthest-away hills a very low opacity: about 25%, and progressively larger values as you work forwards - 50% and 75%, say. This will fade out the most distant ranges; you can leave the others as they are at 100% opacity.

Add another layer above this one, and name it Colour overlay. Locate the Blend mode dropdown box within the Layers panel, and change it to Multiply.

With the grid switched on again and using it as a guide, create a new rectangle which is the full width and height of the Inkscape canvas. Apply a linear gradient fill to the rectangle using the button, then open up the Gradient Editor as before so we can set its colours how we want to.

By default, Inkscape's gradient-fills begin life as two-colour affairs: a solid colour at the start, blending to transparent at the end. By clicking the Add stop or Delete stop buttons, we can apply different colours along the gradient, as well as changing the start and end colours as before, of course.

Click the Add stop button twice then, using our original palette of misty sky colours, select each stop in turn and set its colour to #ffffff (white), #ccdacd (light blue colour), #588f94 (mid-blue), and #091928 (darkest blue).

Now obviously, this gradient is flowing in the wrong direction for what we need, so pick up your Gradient Tool once again and drag a gradient line from the top of the image to the bottom. Adjust the position of the mid-points (the light- and mid-blue hues) using their stop-position markers - which are diamond-shaped - until you're happy.

This should re-colour all our hills in one swoop, and give a smooth fade from light-to-dark sky over our composition.

Step 5 - Create the foreground objects and apply dark silhouette colours

Add a new layer called Foreground above the gradient layer, and create a hill shape on it as before. This one should be positioned at the bottom of the canvas - 'nearest' to the viewer in terms of the image's depth - and can contain a little more detail than the background hills. Use Max displacement in x, px: 2 and Max displacement in y, px: 10 when jittering the extra nodes you add to this shape.

Give this shape a vertical, linear gradient fill similar to before, using the darkest blue colour as the starting colour at the top, and black (#000000) as the end colour at the bottom.

Time to add the foreground's main subject. We're going to create a (very simple) stone archway, then blend it in with the other foreground shapes for optimal impact.

With the Rectangle tool, draw a shape which is 280 pixels wide by 300 pixels tall on the canvas. Position this so it sits 'on top' of your foreground land formation, about a third of the way in from the left-hand edge. I've picked an arbitrary block fill here so I can clearly see the new shape; you should too.

Bring back your grid with the # key and draw another Rectangle which is 120px wide and 320px tall. Use the grid to align it so it sits centrally above the first shape, with an equal amount visible on the left, top and right edges. You'll need the Select Tool (F1) for this bit.

Activating the Node Tool, use the topmost rectangle's rounding handles to fully round its corners. Then, using the Select tool, hold down the Shift key and click on the lower shape so that both rectangles are selected.

Then click Path --> Difference or press Ctrl and - to create the basic archway object.

Swap to the Pen tool and click on a series of points to form a base to one of the arch's pillars. The overall outline should be a straight-edged polygon with a narrowing top, which is slightly wider than the pillar. Duplicate this shape with Ctrl and D, and drag the copy - which will be created on top of the original - over to the pillar on the other side of the arch using the Select tool (F1 to activate it via the keyboard), so it matches on the opposite side.

Hold down the Shift key and click on the first pillar foot and the arch shape, so all three shapes are selected at the same time Join them into a single object, using the Union operation: Path --> Union is the menu option, while Ctrl and + is the handy keyboard command which does the same.

Use the Pen tool to add another pair of shapes high up the arch's column for the ledges. These are right-angled pieces on one-side, and more triangular on the protruding edge. Duplicate and move them to the opposite side, flipping them horizontally with Object --> Flip Horizontal or the H key, before joining all of them with the archway base.

I'm just going to add one more detail to this archway, and cap it with a triangular top. Use the Pen Tool to create a triangle outline which touches the arch. Again, Union this with the main object to keep everything as one shape.

You can add any more decorative elements you want, either to the arch or elsewhere, at this point. I went with a couple of nearby stone plinths to give a more ancient, collapsed feel to the architecture, as well as preventing our arch from looking too lonely on the canvas.

If you need to, tweak the placement or height of these elements with the Select Tool. Then select them all with Ctrl and A, and Union everything with the hill underneath it - it will take on the same fill as the shape you join it with to complete our foreground area. You may need to adjust the position of your foreground gradient's stops to avoid it looking too blue at the top.

Step 6 - Add some misty elements using blurred white strokes

This is starting to look great. All we need to do now is add that early-morning misty feel to the image for a really special result. Start with either the Pen tool or the Pencil tool (keyboard shortcut P) and draw a wiggly line near the base of your arch shape. Apply a Stroke colour of white.

Give this line a broad stroke width - about 18px. Also in the Fill and Stroke panel, apply a Blur to the line of about 26, and reduce the opacity to 12%.

Looks nice. Make another one near the upper edge of the foreground land outline, then press the Page Down key (or Object --> Lower in the menus) a couple of times to send it to the bottom of the stack. Because it's white, you should get a nice, back-lit glow which will also add a greater feeling of depth.

Repeat this process on the Hills layer to create another mist patch, focusing on making it visible just above the outline of the layer of hills. This can be a bit fiddly because you'll be working below the topmost layer, so lock them with the padlock icon in the Layers panel to enable clickthrough. Also, as these are below the overlay layer, you may find that they appear dark or difficult to see. If so, apply the blur at 100% opacity and Duplicate them a couple of times until the brightness is more suitable.

Keep adding mist patches, layering them downwards so they appear to be behind each row of hills. Don't overdo it: be fairly sparing with the number of mist clouds you create, and move them around the composition so they're not all on one side or the other.

When you're happy, export the image as a PNG using Ctrl, Shift and E or File --> Export Bitmap and select the Page button under Export Area. This will nicely crop your image to the bounds of the canvas and give you your fantastic final result.

And there you have it - a re-creation of a beautiful Illustrator piece using free and open source vector package, Inkscape.

We've learned lots about creating gradients and controlling their interaction, creating and combining shapes to build image elements, the Jitter Nodes extension, and using blur and opacity adjustments to blend objects into a scene. That's an awful lot for one design tutorial so if you've made it through to the end, give yourself a pat on the back and enjoy the view!





Mark is the Editor and owner of Designmark Graphics Ltd. Publishing tutorial articles and guides for Inkscape and the GIMP, this blog aims to boost the profile of these Open Source graphics applications and showcase what they are capable of.





Please enable JavaScript to view the comments powered by Disqus.

Disqus