Here’s How I Did It - Open Source Graphic Design

October 29, 2008

Something I’ve been working on

Filed under: Inkscape — Jude @ 5:13 pm

I spent a couple of hours working on a graphic of a dandelion the other weekend and I thought I would share how it was done.

Dandelion table number

The design is simple. Using Inkscape, I began by drawing the dandelion stalk using the Freehand Tool (using spiro for that nice curve) and coloured it with a slight gradient from pale green to dark green.

For the head I simply drew a circle and filled large number of very small star-shaped hand-drawn polygons. Drawing these by hand meant I was able to ensure a good placement. Initially I had drawn a series of star shapes and tried using tile clones to place them radially. This created a very geometric look so I decided to hand-draw for a more organic feel.

After filling the circle with stars a few were dragged across the canvas to create the “just blown” look. I then made the guide circle completely transparent. Leaving it there meant I could still check the placement of the stars by viewing the image in Outline Mode (View>Display Mode>Outline).

The star shapes were selected (Edit>Select All and while holding Shift, click on the stalk to deselect) and in the Fill & Stroke Dialogue I set the blur to around 3. The stars were copied and pasted in place and while the duplicate stars were still selected I set the blur back down to zero. This makes a sharp star shape with a blurred halo, creating a soft appearance without losing detail.

And that’s pretty much all there is to it. Opinions welcomed.

October 24, 2008

Inkscape: Exploring Spiro

Filed under: Inkscape — Jude @ 6:18 pm

Octopus with spiro tentaclesNow you have your development version of Inkscape running, let’s have a look at the Spiro option. Select the Freehand (Pencil) Tool. You’ll notice an addition to the toolbar: Spiro path options in Inkscape
Make sure the “Create Spiro Path” mode is selected as shown. This will correct your freehand lines to smooth curves which you can adjust using the Smoothing Slider. Currently this can only be set before drawing your line so some experimentation will probably be required to get the amount of smoothing right.
This image shows you how it works. The blue path shows the line I drew. The purple line shows the path with Spiro applied.

Spiro and true path

As with any path, you can edit each node and the Spiro path will adjust accordingly. Modified path shows how Spiro adjusts

Shape

Spiro paths can be shaped. This shows each type of path; None, Triangle In, Triangle Out, Ellipse, From Clipboard.

Spir
None: This draws a simple line with no shaping which you can thicken or thin using the Stroke Style dialogue. There you can choose the cap or even add markers to your line. Change the colour using the Stroke Colour dialogue.

Triangle In & Triangle out: The line is thickened at one end. By default you can change its colour using the Fill Dialogue but you can also apply a stroke colour. If you do so the stroke is an outline of the triangle shape so thickening it will eventually cover over the fill colour rather than increase the size of the whole object.

From Clipboard: Use an existing path to shape your spiro path. In the example above I used a star shape and applied it to a curved line to create the deformed star shape. You must use a path for this trick to work. If you draw a shape you’ll need to convert it to a path first Path>Object to Path. The colour of your original shape will not be preserved.

How can you thicken a shaped Spiro path?
Try resizing a shaped Spiro path and you’ll soon see that proportionately remains the same, but what if you want a much thicker object than the one you drew? If you thicken the stroke you’ll find the lines are blunted and the fill colour becomes occluded by the stroke. The secret is to draw small and scale up. Here’s an example.

The two paths on the left show how scaling a medium sized path up slightly thickens the overall object.  The two paths on the right show how drawing a very small path allows much more noticeable thickening when the image is scaled up.

Upscaling a Spiro path

Notice how the stroke has scaled with the image? If you don’t like this effect you can decrease the stroke thickness through the Stroke Style Dialogue.

This is quite a dirty workaround to the problem and hopefully a better  solution will be incorporated into the final release.

October 20, 2008

Inkscape: Previewing Spiro - Getting Started

Filed under: Inkscape — Jude @ 4:48 pm

When I first read about the new spiro feature on Andy Fitzsimon’s blog I thought it was so cool I had to have a go.

Spiro is a new feature in development for Inkscape which is an add-on to the Freehand Tool. It modifies your stroke path into spirals giving a very fluid look to curves and lines. Spiro isn’t the only new tool for the next version of Inkscape. There are new filter effects to play with so it really is well worth the hassle of trying development version.

Check out the download page for the most recent builds for your operating system. You’re likely to find the development version pretty unstable so don’t go deleting your copy of 0.46 just yet.

I use OS X 10.4 which currently has no up-to-date downloads available so I’ve had to compile it myself. If you’re in the same position, it’s not as hard as it looks. Read Inkscape’s page on compiling Inkscape on OS X. Make sure you have XTools installed (searching for it in finder will be enough). On my copy of 10.4 it was already installed. If it isn’t, you’ll find it on your installation CD.

I’m going to show you how to download and install this using MacPorts. If you want to use MacPorts for the download instead of installing everything manually, you’ll need a newer version of XTools. I found the correct version on Download.com as it’s no longer available on the Apple Developer Network for 10.4.

For this installation you’ll be using the program Terminal to work from the command line.

Tip: If you’re using the packaged version and get “command not found” when you try running the port command, see this work around. If you already have a .bash file, open it (nano .profile), copy the line inserted by macports and paste it into your .bash_profile and it should now work.

Assuming you got MacPorts up and running, copy and paste this into Terminal. Expect it to take a long time to run. You’ll be required to enter your system password.

sudo port install cairo +pdf boehmgc gtkmm intltool libxslt lcms popt poppler boost gnome-vfs \ libgnomeprintui automake autoconf subversion

Finally, to complete it, run this command:

svn co https://inkscape.svn.sourceforge.net/svnroot/inkscape/inkscape/trunk inkscape cd inkscape/packaging/macosx/./osx-build.sh a c b i -s p

Navigate to your new Inkscape directory and into the folder packaging/macosx/ and open the file named Inkscape to run it.

Next: Using Spiro paths.


	

July 15, 2008

Inkscape: Leaf Skeleton

Filed under: Inkscape — Jude @ 7:06 pm

In my absence I’ve been working on a design for something I’m going to have laser cut. Who wouldn’t love to have their very own laser cutting machine? I know I would but until then I’ll be sending my work off to a specialist company, so I’ll keep you posted on how that goes.

As part of the design I was working on I came up with this leaf design. I started out just sketching line drawings in Inkscape and quickly came up with something I liked. The only problem is that when laser cutting you need to provide outlines for the laser to follow - not solid blocks of colours or thick lines. I was able to get around this problem and come up with a new technique using the bucket fill tool. Here’s how…

This was the leaf shape I began withI started with this leaf shape. It was a 5 sided polygon that I reshaped to look like a maple leaf. I’ve also drawn a jagged outline with the pencil tool. It’s coloured pink to show you how it’s constructed but the final image will be black and white. Veins have been drawn onto the leaf

The next stage was to draw on the veins. To to this use the pencil tool and click once at the starting point and once at the end point. This creates a straight line rather than trying to drag a straight line. Use the node editor to click on each line to bend it into the desired shape.

 

Outlines of the leafDraw in the smaller veins until you’ve filled in your leaf shape.

In this image I’ve coloured all the strokes white and I’ve changed the page colour so that the white outlines are visible.

 

If it wasn’t going for laser cutting I would stop at this point but since the laser needs a line to follow, if I supplied this as the outline I would end up with just a cutout leaf shape and none of the vein detail.

For that I’ll need to outline the lines!

 

The Bucket Fill Tool  is really handy for this. Set the fill to be “none” and the stroke to black. The stroke for this stage needs to be thinner than your white stroke areas so that you can have detail in the corners.

You can either apply the bucket fill to each of the void areas in turn or just click on your white outline area for an almost identical finish.

Finally set your page colour back to white to get the full effect.

 

The final outlined leaf

 

June 11, 2008

Absenteeism

Filed under: General — Jude @ 5:37 pm

I’ve been AWOL again. Here’s why; I’ve recently acquired a car. The problem is I can’t drive, so it’s taken quite a bit of my free time to learn and for the past couple of weeks I’ve been working on a big new project for my business. It’s taking a lot of coding and I’m a little bit rusty so it’s all taking a long time. But I haven’t forgotten about the blog.

I had planned this week to show you a new extension for Inkscape I heard about through Planet Inkscape but I’m still trying to figure out how to get it working on OS X. It seems that it’s not as simple as installing a new Python Library so it might be a while before you see anything on that.

I hope to be back with a new tutorial on Friday. In the mean time if you’d like to request a tutorial (I’m in an Inkscape mood this week) just let me know.

June 4, 2008

Inkscape: Using Clips & Masks

Filed under: Inkscape, Vector — Jude @ 2:35 pm

Clipped image with transparent mask on topFollowing on from yesterday’s faceted diamond shape, I’m going to show you a few ways to tidy up the edges without the need for time consuming node editing.

 

 

 

A faceted vector diamond shape

Here’s our shape from yesterday. In order to make it look more diamond-like we’ll need to get rid of those sharp edges and form it into a more uniform shape. 12 sided shape
If you look at the shape, you could fit the areas where two or more colours overlap into a 12 sided shape so make a polygon and fit it into the shape. I’ve outlined it here to show you but what you need is a white dodecahedron (I’ve been waiting to write that!) filled white at around 30% with no outline. It should fill most of the diamond shape.

The 12-sided polygon will be used to shape the diamond.

There are two ways of doing this; clips and masks.

Clip
Move your 12-sided shape on top of the diamond. For clipping it doesn’t matter what colour your top shape is as this won’t show when the clip is applied. Select the diamond shape and your 12-sided shape and go to Object>Clip>Set. Everything under your 12-sided shape will be showing and anything outside of it is hidden. You can undo it by going to Object>Clip>Release. The image below shows the diamond shape with the polygon positioned on top, then after clipping is applied.

Before and After Clipping

 

Mask
Mask works in a similar way to clipping except that it retains some of the properties of the mask object. This time the white semi-opaque colour of the 12-sided shape will be applied as well as the clipping. This will give the coloured object the transparency of the mask above. Here’s how it looks now:

Mask sets transparency

That’s possibly too transparent but you get the idea. Release the mask and adjust the transparency on the mask object and reapply the mask if you’re unhappy with it.

Note: If you want to apply a gradient as a mask use a black>white gradient.

 

If you copy and paste in place the mask object on top of a clipped object you can give the diamond a more glassy look:

Clipped image with transparent mask on top
Play around with it until you end up with something you like. All the files for this are available from yesterday’s tutorial including the various clipped and masked objects with explanations.

Creative Commons License

June 3, 2008

Inkscape: Faceted Shapes

Filed under: Inkscape, Vector — Jude @ 2:09 pm

10 days and no posting. I spent most of last week in Ireland and I couldn’t bring myself to look at a computer. It’s nice to have a break sometimes.
Anyway, I’m back with my semi-regular 3 posts a week.

Today I’m going to show you a technique for making faceted shapes in Inkscape using simple geometry.

4 hexagons arranged togetherStart by making a six-sided polygon with equal width and height. Set the transparency to 33%. Copy and Paste another 3 polygons and colour them red, green, blue and white. Arrange the red green and blue hexagons so that they each have a side touching another colour and place the white hexagon on top spanning the red, green and blue shapes.

It should look similar to this (left).

2 sets of hexagons at 180 degrees from each otherA second set of triangles adds more facets

Group (select them and press Ctrl + G or go to Object>Group) the 4 hexagons together and make 1 copy. Rotate one of the groups by 180° (Object>Transform…) and arrange them so that the white hexagons align. It’s starting to look kind of faceted but it lacks detail (right). Let’s make another set of hexagons to add dimension.

Repeat the steps above but this time use only the red, green and blue hexagons. Make 2 groups of 3 hexagons and rotate one of them by 180° as before. You’ll have something like this on the right.

Each group forms a larger hexagon. Rotate one of these by 30° so that the two shapes will intersect each other rather than line up one on top of the other. Combine the two hexagon groups so that the set with the white hexagon will be on top. The end result is a faceted diamond shape… well sort of.

A faceted vector diamond shape

Tomorrow I’ll show you a couple of ways you can tidy this shape up, make it look more like a diamond and trim off the rough edges.

Download the SVG but read the license first please. Creative Commons License

May 23, 2008

Adding Quotation Marks to Your Web Page

Filed under: Web Design — Jude @ 7:06 pm

I really like magazine layouts. I like those little boxes with additional information or quotes inside the main body of the text but if you want to do something similar in your web pages it can be extremely frustrating to get it looking good.
Here’s one method for creating a quote box.

Step 1. Create your quotation marks. Use something like GIMP to create 2 files for each quotation mark using a font and colour of your choice. Unfortunately if you want it to look alright in Internet Explorer you’ll either need to save this with a background colour to match your quote area or you’ll have to save it as a transparent GIF. IE does not handle transparent PNGs well and definitely won’t cope with SVGs without a plugin.
Here’s how mine look. I opted for GIFs.Left Quote Right quote

Step 2. Write your code.
Make a new blockquote and within that a paragraph tag. Why put a paragraph inside a blockquote? You’ll see in a minute.

<blockquote class="quote">
<p>Your quoted text goes here. </p>
</blockquote>

Step 3. Position your quotation marks.
To avoid having your images floating around all over the place and positioning themselves based on the text, it’s usually better to position it as a background image. It’s an especially useful thing when your text is generated dynamically and you don’t know how long it will be.
Now the reason for having the <p> tag becomes clear. Each element can only have 1 background image, so if you position the opening quote as the background image to the blockquote you need another element to put the closing quote in; the closing quote becomes the background of the paragraph tag.

The CSS for this would be something like this:

blockquote.quote {
padding: 3px 3px 0px 3px;
width:90%;
background-color: #F0F0F0;
background-image: url(leftquote.gif);
background-position: top left;
background-repeat: no-repeat;
text-indent: 20px;
}

blockquote.quote p {
padding-bottom: 1.3em;
background-image: url(rightquote.gif);
background-repeat: no-repeat;
background-position: bottom right;
}

The important parts there are background-image, background-repeat and background-position. They’re pretty self explanatory - choose the background image, position it and tell it not to repeat to avoid having a tiled background.

Put that all together and you should have something like this:

Your quoted text goes here.
There’s no point in viewing the source for this bit since wordpress likes to add its own stuff and take away mine. I had to write some horrible code to make it work.

May 21, 2008

GIMP: Restore a Torn Photograph (Part 2)

Filed under: GIMP — Jude @ 11:00 am

You’ll remember last week I started a pretty large photo restoration project trying to piece together an old photograph.

This week I’ll show you how I go about “healing” the tear line and removing some of the major blemishes from it.

When you’re working on something particularly heavy-going it can be difficult to see what’s going on after a while. I like to go away, have a break and go back to it with fresh perspective. That’s exactly what I did today and when I went back to start working on the project again I noticed I hadn’t lined it up quite as well as I thought.

Slight rotation required to align the edges

Initially it looked as though the picture was lined up pretty well - the bars on the window, the man’s face and even the edge of the picture looked fine but when I zoomed in to start removing the tear line I noticed the white border on the left wasn’t aligned correctly (see left). Everything else looked right so what’s the problem? Rotation.

That’s something to keep in mind when you scan images - no matter how carefully you line it up on the edge of the scanner either by static or airflow the image nearly always gets moved slightly.

Rotating the top portion by just -0.23° fit everything back into place.

Feathering caused by scanning needs to be removed before flattening the imageBefore beginning to heal the tear, areas of special detail will probably need their own treatment. You’ll see where the tear passes through the man’s face that there is still some black feathering from when it was scanned. On other areas of flatter colour, like the curtains or walls, it’s simple to clone this out but where there are detailed features on the face we’ll need to remove as much contamination as possible. The layers will need to be flattened later so it’s important to get rid of anything along the borders at this stage.

 

Harsh black edge is removedNow that the harsh black edge has been removed, the extent of the tear can be seen. It still looks severe but it should be much easier to heal up later.

When you’re happy that all the detailed areas have been cleaned up it’s time to save with a new file name (so you can go back if you go wrong) and merge the layers. Select the top layer and go to Layers>Merge Down to flatten the image into one layer.

Now let’s begin healing up the tear.

For small differences I like using the Heal Tool Heal Tool in gimp. It’s somewhere between Smudge and Clone and samples the colour and texture of the surrounding pixels so you can paint a kind of average colour. Ctrl+click on a clean area near to your tear to set the target area, now use your cursor as usual to paint over the tear. Be careful to keep your target away from the edges or you’ll get unsightly white or dark smudges in your freshly papered-over crack.

Heal tool helps smooth out creases and tears.The tear has been repairedHeal smooths it over but because the colours are based on the surrounding colours there’s still a visible darkened area. This is where Clone comes in handy.

Clone works in much the same way as Heal so use Ctrl+click to select a clean area and paint over the darkened line where the tear was. The key to avoiding circular patterns is to keep the brush moving rather than dab at areas. Clone will copy the area under the target cursor to where you’re painting. To avoid noticeable repetition you can build up layers by setting the brush opacity to 50%.

Left: Beginning to heal the tear along the border, Right: After healing and some cloning.

Now most of the tear has been removed you can get a better idea of how the picture once looked.Areas of flat colour like that are easy to fix. As you work along the tear, repeat the same process to close up any gaps. On areas like the curtains take care to keep your brush strokes vertical to blend in with the transitions from light to dark.

You’ll probably find you will need to switch between Clone and Heal as you fix up the tear. For areas where there is a lot of colour missing you could try cloning at 100% opacity to fill the gaps, then heal to blend it and then add detail again with 50% opacity clone. There are no rules on how best to do it so experiment until you get something you’re happy with. The Undo Command (ctrl+z) will come in very useful.

You’ll also find that you’ll have to change between brush sizes depending on the detail required. For example, replacing the window uprights required a very small clone brush. For large areas of one colour increase the brush size to reduce repetition.

Here’s how the photo looked after fixing most of the tear. I’ve left the face and shoulder area alone to work at in detail (left).

To try and repair the face zoom right in - enough to work easily on the area but far enough to have good overview.

Much of the man’s chin was lost when the photograph was torn so it will have to be reconstructed. For this I first cloned the area, using a very small brush, trying to match the skin tones with the contours of his chin. This was pure guesswork since we’ll never really know how he looked.

Cloning produced a rather chunky pixelated look so this was softened using the Heal Tool. The image below shows before, after cloning, after healing on chin.
Repairing the chin using clone and heal

There’s so much of the face missing we’ll have to guess at that too. Using a combination of Cloning and Healing, sample areas near to the tear and replace the lost areas as done with the chin.This was by far the most challenging part of the photograph.

Here’s how the face looked after a lot of work.
Face repaired

The original photo had a stain right on the corner of the mouth. After some deliberation I decided to leave it there. Trying to repair that would have meant that 70% of the mouth was replaced and in my opinion that would have had too much impact on the face.

I also chose to leave the stamp mark from the original picture and the crease that ran through the woman’s body.

I felt that the stamp didn’t detract from the image and rather it added to the character of the image.

The crease through the woman’s body was left because to remove it would have altered the image a lot. You can see that there’s a large colour difference either side of the crease requiring a lot of blending between the two tonal areas which may have resulted in a “touched-up” look.

So here is the before and after:

Before restorationThe restored photograph

I hope to print this onto some cotton rag to complete the restoration.

If you want to have a go at this, go here and read through part 1 of the tutorial and download accompanying file if you want to work on this image.

Do you have any comments or opinions on this? Did you try the restoration yourself? Got a better method? Let me know with a comment.

May 19, 2008

Inkscape: Filling with Pattern

Filed under: Inkscape — Jude @ 5:53 pm

How often do you opt for a solid or gradient fill for your Inkscape drawings? Have you ever used the Pattern Fill?

Here’s an example of a star shape filled solid pink next to one filled “Ermine”.
Ermine pattern fill on a shape
This is as simple as setting any other fill.

Applying a pattern fill

You can change the opacity and blur filters on Pattern Fill but not the colour… at least not without cheating a bit!

This method is by no means predictable but can create interesting effects. Select your patterned object and go to Effects>Color and try out some of the colour effects. It seems that not all effects work with all patterns. Polka Dots, Stripes and Checkerboard seem to work best with Randomize and RGB Barrel colour effects.

You can also change the scale and orientation of your pattern. This can be buggy so save your work first.

Adjusting the PatternPatterns Can be LayeredUse the Node Select Tool to select your patterned fill. You’ll notice to the top left an ‘x’ shape with circular and square handles. To increase the size of the pattern just move the square handle away from the ‘x’ and to rotate move the circular handle around the x.

Since most of the patterns are semi-transparent you can layer them up (right).
You don’t have to use the presets to fill your objects - you can make patterns out of objects!

Select objects to make a pattern

Create the objects you want to use as your pattern as well as an object you want to fill with pattern. Here I’m using a square for the background with a shape on top. Group your pattern objects (Ctrl +G) and then go to Object>Pattern>Objects to Pattern.

New pattern used to fill an objectTo fill your other object with your new pattern just click on it, select pattern fill and choose your new pattern. It will probably have a name like Pattern3806.

I’m unsure why the edges are visible. I tried using a thick outline for the square shape but it was unsuccessful. If you have any tips for that drop me a comment below.

Shape filled with bitmap patternFinally if you want to fill a shape with a bitmap it’s just as simple. Go to File>Import and select your bitmap image. Now as before, select the bitmap and go to Object>Pattern>Objects to Pattern. You now have a new pattern to fill with.

Any comments/questions/suggestions? Let me know!

Next Page »

Powered by WordPress