Inkscape tutorial: creating a simple ribbon

Inkscape tutorial: creating a simple ribbon


Inkscape is one of the most popular free software vector drawing applications. With minimal effort you can achieve some excellent results. However, for the inexperienced it can be a bit hard to find out how to get those results. In this tutorial I'll look at creating a simple ribbon effect which will hopefully introduce some of the key Inkscape features along the way.

Tools of the trade

Before I start, you should know that for this tutorial I will be using Inkscape 0.46 on Debian Sid. Don't let the apparently low version number put you off, Inkscape is pretty stable. It does have some quirks to iron out but it's a while since I last had crash on me. Besides murphy's law would suggest that it is always prudent to regularly save your work anyway. Figure 1 shows a typical layout of Inkscape interface. I've picked out a few buttons that I'll be referring to through this tutorial.

Figure 1: The basic Inkscape interfaceFigure 1: The basic Inkscape interface

For the benefit of the complete beginner: Inkscape is a vector drawing program. That means that it creates graphics which can be scaled without adverse effect on quality. These won't be photos or other such graphic work, but more usually they are found in logos, clipart and other places where the image may be scaled up or down. If you enlarge a small photo or bitmap image you get pixelisation and "jaggies". Do that with a vector graphic and you'll find the linework is as smooth as the smaller version. Inkscape uses the open standard Scalable Vector Graphic format (svg), but it will import popular vector formats like Adobe Illustrator and wmf. In this instance I'll start with a new file anyway. I'll assume you have Inkscape installed and open.

By the way, the screenshots will have lost a little quality to keep the size down; so, apologies if it looks a little blurred (where it's not supposed to be).

Create a basic curve

For this ribbon we'll need a bezier curve to start, as shown in figure 1. Click the Bezier curve tool button and click twice down the page to create two points on our curve (it doesn't matter if they are in line with each other at this stage). Double click further down for a final point to finish the curve. These points will be joined by straight lines -- not very curvy, so we need to edit the curve. Click the Edit paths by nodes button to show us all three nodes (handles) on our curve (see figure 2).

Figure 2: Creating the basic curveFigure 2: Creating the basic curve

Now click on one of the segments (lines) and drag it to create a curve between the two corresponding points. Do the same with the other segment to create a kind of reverse S-shape. You'll notice the centre of this curve is still quite angled. We can smooth this by changing the middle node. Click on it and then click the Symmetrical node button to make it smooth. You'll also notice you now get additional handles for each node which you can use to adjust the -- err -- curve of your curve. Try having a play with them, when you are done make sure you have something resembling figure 3.

Figure 3: Making it flowFigure 3: Making it flow

Making the basic ribbon

To give your ribbon thickness you need to duplicate our curve. Click the Object select button and if your curve is not automatically selected, click once on it. Now duplicate it by pressing CTRL+D. The new curve is placed directly on top of the original. You need to move this horizontally but not vertically. The easiest way to achieve this is to change the X co-ordinate shown on the toolbar. Add 50 to it to give your ribbon some width. When you move focus away from the X co-ordinate box the new curve will be moved. Note that if you are working on a smaller or larger object you may have to adjust some of these coordinate figures accordingly.

To fill your ribbon, you need to join these two curves into a single object. Draw a box around both curves to select them and then press CTRL+K (or Path->Combine) to combine them. Once that is done, click the Edit paths button again and draw a box around the bottom two nodes. They will turn blue. Now click the join button to join these two with a new segment. This segment will be curved: YOU need it to be a line; so, click it and then click the Segment-to-line button. Repeat this for the other end so we have a single closed curve.

Figure 4: Looking more like a ribbon nowFigure 4: Looking more like a ribbon now

The ribbon still looks a little flat though. It needs to be given some perspective. Click the Edit path button again and move the modes on the right hand side so they are not inline with the left. Also give it a pinch effect in the centre and you can slightly bow the end lines we just created if you want as well.

Finally, add some colour to Your ribbon. I'm in a festive mood: click the red colour swatch from the colour toolbar at the bottom of the page. This will set the fill for the ribbon to be red. You can choose any colour you like. It's possible that your chosen colour will be a little transparent. For the basic ribbon you need to have opaque colours; so right click the fill toolbar at the bottom left and select Make fill opaque. Now you should have something resembling figure 4.

Giving it depth

You could stop here, but apart from the silhouette it doesn't really look like a ribbon! It needs depth. To do this you'll add shading and a drop shadow. Start with the shading.

Figure 5: Adding shadingFigure 5: Adding shading

Select the ribbon and duplicate it using CTRL+D. Again the new ribbon is on top of the old one. With the new one still selected, left click the Fill colour on the bottom left. The Fill and Stroke dialog should appear. If it doesn't, click the "fill/stroke" button on the toolbar instead. In the new dialog, click the Fill tab and choose the linear gradient option. Inkscape creates a new gradient using the existing colour, but you can't see it because it's the same as the main ribbon underneath. Click the Edit button to open the gradient editor. Now change the main colour to be black. Then pull down the stops drop down and choose the other stop (which is the other "end" of the gradient) -- change this to be black also but make sure the Opacity (A) remains at zero for this one -- see figure 5. Close the Edit gradient dialog.

Figure 6: More realistic shadingFigure 6: More realistic shading

With the Fill dialog still open click the Edit paths button again. You'll now see additional nodes showing where the gradient starts and ends. Move these so the gradient runs vertically along the ribbon from the top to midway down the first bend -- see figure 6. Now click the Select object button again and go back to the linear gradient fill page on the Fill dialog. Under "Repeat", select reflected. The gradient should now be reflected along the length of the ribbon. It's still a little dark; so change the Opacity to 20%. It also needs a little less clarity; so change the Blur to 1. Last of all, you no longer need the stroke on this shading; so click the Stroke tab and remove the colour by clicking the X.

Final flourish

The last touch is to give it a drop shadow. To do this duplicate either of the ribbon objects using CTRL+D. This will give you a new ribbon. Using the Fill dialog set the colour to a solid black. Also set the Blur to 3 and the Opacity to 70%. Now add 5 to the X coordinates and subtract 5 from the Y coordinates. This will move the object slightly down and to the right. Next you need to drop it behind the other objects. Click the Lower to bottom button to do this.

Figure 7: The final resultFigure 7: The final result

That should give you a basic and reasonably realistic ribbon effect like figure 7. Play around with colours, shading and shape as much as you like.

Like most tutorials this really is scraping the surface of what can be done. as they say, practice makes perfect!

References

Category: 

Comments

szurcher's picture
Submitted by szurcher on

I had to do a bit of trial and error to find out that to select the different stacked objects I needed to Alt+click (otherwise all I could access was the top gradient). That seems to cycle through the different objects that are underneath the point your mouse is at. If there's a button or menu item for this behavior I missed it. Now I have a nice light blue ribbon :) Thanks for the introductory tutorial!

Author information

Ryan Cartwright's picture

Biography

Ryan Cartwright heads up Equitas IT Solutions who offer fair, quality and free software based solutions to the voluntary and community (non-profit) and SME sectors in the UK. He is a long-term free software user, developer and advocate. You can find him on Twitter and Identi.ca.

Most forwarded

Interview with Dave Mohyla, of DTIDATA

Dave Mohyla is the president and founder of dtidata.com, a hard drive recovery facility based in Tampa, Florida.

TM: Where are you based? What does your company do?
DTI Data recovery is based in South Pasadena, Florida which is a suburb of Tampa. We have been here for over 10 years. We operate a bio-metrically secured class 100 clean room where we perform hard drive recovery on all types of hard disks, from laptop hard drives to multi drive RAID systems.

Anybody up to writing good directory software?

Since the very beginning, directories (of any kind) have had a very central role in the internet. (I have recently grown fond of Free Web Directory. Even Slashdot can be considered a directory: a collection of great news and invaluable user-generated comments. As far as software is concerned, doing a quick search on Google about software directories will return the free (as in freedom) software directories like Savannah, SourceForge, Freshmeat and so on, followed by shareware and freeware sites such as FileBuzz, PCWin Download Center and All Freeware (great if you're looking for shareware and freeware, but definitely less comprehensive than their free-as-in-freedom counterparts).

Interview with Mark Shuttleworth

Mark Shuttleworth is the founder of Thawte, the first Certification Authority to sell public SSL certificates. After selling Thawte to Verisign, Mark moved on to training as an astronaut in Russia and visiting space. Once he got back he founded Ubuntu, the leading GNU/Linux distribution. He agreed on releasing a quick interview to Free Software Magazine.

Is better education the key to finding better software?

I read David Jonathon's article Anybody Up To Writing Good Directory Software? the other day, which got me thinking about software directories in general. As David mentioned, many of the software directories one finds when doing a quick google search are free as in beer, not as in freedom. But what interests me is the software directories that already exist, providing a combination of both free as in beer software, and open source software. Sites such as Freeware Downloads and Shareware Download don't advertise themselves as providing free as in liberty software, but each of them have a good selection of open source software available... if you know where to look.

Most emailed

Free Open Document label templates

If you’ve ever spent hours at work doing mailings, cursed your printer for printing outside the lines on your labels, or moaned “There has got to be a better way to do this,” here’s the solution you’ve been looking for. Working smarter, not harder! Worldlabel.com, a manufacture of labels offers Open Office / Libre Office labels templates for downloading in ODF format which will save you time, effort, and (if you want) make really cool-looking labels

Creating a user-centric site in Drupal

A little while ago, while talking in the #drupal mailing list, I showed my latest creation to one of the core developers there. His reaction was "Wow, I am always surprised what people use Drupal for". His surprise is somehow justified: I did create a site for a bunch of entertainers in Perth, a company set to use Drupal to take over the world with Entertainers.Biz.

Update: since writing this article, I have updated the system so that the whole booking process happens online. I will update the article accordingly!

So, why, why do people and companies develop free software?

More and more people are discovering free software. Many people only do so after weeks, or even months, of using it. I wonder, for example, how many Firefox users actually know how free Firefox really is—many of them realise that you can get it for free, but find it hard to believe that anybody can modify it and even redistribute it legally.

When the discovery is made, the first instinct is to ask: why do they do it? Programming is hard work. Even though most (if not all) programmers are driven by their higher-than-normal IQs and their amazing passion for solving problems, it’s still hard to understand why so many of them would donate so much of their time to creating something that they can’t really show off to anybody but their colleagues or geek friends.

Sure, anybody can buy laptops, and just program. No need to get a full-on lab or spend thousands of dollars in equipment. But... is that the full story?

Fun articles

Santa Claus - the most successful open source project

It dawned on me the other day, as I was shopping for the dozens of gifts it seems I have to buy every December, that Santa Claus is the most successful open source project in history. (Bridget @ Illiterarty would agree with that). Santa Claus is essentially a marketing development that is embodied by everyone who stuffs a sock, gives a gift, hosts a dinner or wishes Merry Christmas over the holiday season.

Most emailed

Editorial

When I first started thinking about Free Software Magazine, I was feeling enthusiastic about the dream. I had Dave, Gianluca, and Alan willing to help me, I had established members of the free software community willing to help me out, I had writers volunteering their time and energy for free, and I had a generous offer from OpenHosting for servers, all before I'd proved myself. There was a sense of excitement in the air, and I thought maybe, just maybe, I could make this work.

Free Software Magazine uses Apollo project management software and CRM for its everyday activities!