Final Product What You'll Be Creating
In this tutorial, we’ll be designing a cool pair of sunglasses. These sunglasses use a lot of different shapes comprised from multiple techniques throughout Inkscape. We’ll cover simple things such as drawing shapes, to some more complex things like path operations. So, how about we jump right in?
1. Setup the Document
Let’s open Inkscape and go to File > Document Properties to prepare our canvas. For this tutorial, we’re going to set our document size to Width 600px and Height 600px. Just to make things a little easier, we’re also going to check Border on top of drawing.
2. Drawing a Lens
Click the Create Circles (F5) tool and draw a perfect circle (hold Control while clicking/dragging). Size isn’t important just yet, so just make a circle large enough to work on.
With your circle selected, head up to Path > Object to Path (Shift + Control + C) to convert this circle into a path.
This way, we can edit the circle using nodes as shown below.
Now we’re going to use the Edit Paths by Nodes tool to click-drag these nodes and handles to form the circle into the shape of a sunglasses’ lens (you may also use arrow keys to move the nodes). This is the tricky part, so the exact coordinates of the 4 nodes are listed below to get you started.
3. Styling the Lens
First, bring up Fill and Stroke by clicking Object > Fill and Stroke. Let’s set the Stroke paint to a flat color of R=93, G=93, B=93.
The Fill is going to be a linear gradient. To change the colors of our gradient, we’re going to click Edit… under Linear Gradient. This brings up the Gradient Editor where we will be able to change our stop colors.
Click that first drop menu to select the stops. Our first stop will be R=197, G=137, B=79, A=200. The second stop will be R=176, G=79, B=0, A=200. In case you were wondering, we’re decreasing the A, which is Alpha, to make our lenses see-through. This will add some realism later on.
We need to adjust the angle of this gradient. To do this, let’s click the Gradients Tool and select the lens. This brings up a couple nodes which designate the direction of our gradient. Click-drag the nodes to make a vertical line (hold Control to keep straight lines).
We need to give our lens a frame, so let’s click the Stroke style tab in Fill and Stroke. Set the Width to 8px.
4. Adding Some Details
Copy and paste the lens to get an exact shape for our details. On our copied lens, let’s remove the Fill by clicking the "X" icon, set the Stroke paint to R=0, G=0, B=0, and give the Stroke style a Width of 1px. On the bottom of Fill and Stroke, you’ll see Blur and Opacity, % values. Give this detail a Blur of 0.5px and Opacity of 30%.
Position this detail over the original lens and offset it vertically about 2px down (whatever looks best on your lens).
We’re going to make another detail just like this one, so select the detail we’ve just made and copy and paste it. This one is going to have a Stroke paint of R=255, G=255, B=255, a Blur of 0.3px, and an Opacity of 40%. Position this one over the lens again, but offset it vertically about 2px up this time.
As you can see, these small details add some dimension to our lens.
5. Add Highlights to the Lens
Select the lens (not the details), then copy and paste it. Twice. We’re going to use these copied lenses to create perfectly shaped highlights.
Select one of the copied lenses and make sure it’s above all other shapes by going to Object > Raise to Top. Then, drag that lens over the other copied lens and click-drag one of the scale icons in the corners of your selected lens (Hold-Control to scale uniformly) and make this lens just slightly larger than the lens under it, as shown below.
When everything is positioned as below, select both of the copied lenses and click Path > Difference.
You should end up with a shape like this:
As you can see, this shape will make a great highlight for the lens. Let’s remove this shape’s Stroke paint by clicking the "X" icon. Then, position it over our lens as shown below (or to your liking).
We need to give this shape a Linear Gradient with the first stop as R=255, G=255, B=255, A=255 and the second stop as R=255, G=255, B=255, A=0. If this linear gradient direction isn’t vertical already, you can use the Gradients Tool again to adjust accordingly. Finally, give this shape an Opacity of 80%.
To add some depth, let’s copy and paste this highlight and position it about 4 pixels lower than the original. Then, give this new highlight a Blur of 4px and an Opacity of 50%.
And just to keep our whole lens organized, let’s select everything and click Object > Group (Control + G).
6. Duplicate the Lens
Select the lens and click Edit > Duplicate (Control + D). This will create an exact duplicate with the exact position as well. If you’ve been following this tutorial exactly, what you’ll want to do is enter the exact X-coordinates below to ensure proper spacing between the lenses. Otherwise, you may do whatever spacing looks best for your design.
When your new left lens is in position, click the Flip selected objects horizontally button.
7. Draw the Bridge
Using the Create Rectangles tool, draw a rectangle, acting as the bridge for the lenses, across the two lenses. We’re also going to Object > Object to Path so we can edit this shape with nodes again.
Using the Edit Paths tool along with the nodes and handles, draw a similar bridge design as shown below. Also, don’t forget you can grab in between two nodes to curve a line. Keep in mind that we’ll eventually position the bridge behind the lenses so we don’t see anything we don’t want to.
First, set the bridge behind everything by clicking Object > Lower to Bottom. We’re going to set a Linear Gradient for the Fill of our bridge. First stop R=93, G=93, B=93 and second stop R=73, G=73, B=73. Use the Gradients Tool to make this vertical.
We’re also going to set a Linear Gradient for the Stroke paint. First stop R=188, G=188, B=188 and second stop R=76, G=76, B=76. Use the Gradients Tool to make this vertical as well.
8. Highlight the Bridge
We’re going to do exactly what we did for the lens highlights. Let’s copy and paste two more of our bridges and position them as shown below. Then of course, Path > Difference.
You should’ve ended with a shape like this:
First, remove the Stroke paint and position it over the bridge as shown below. Let’s give this highlight a Linear Gradient with the first stop as R=255, G=255, B=255, A=0 and the second stop as R=255, G=255, B=255, A=255. Then, set the Blur to 2px and the Opacity to 10%.
9. Draw the End Pieces
Using the Pen Tool, draw a rough, four-sided polygon to resemble an end piece for our glasses.
Click the Edit Paths by Nodes tool and select all four nodes of the end piece. Then, click Make selected nodes smooth in the nodes menu. This is a quick way to bring our shape closer to what we want.
Drag nodes and handles for final adjustments…
Remove the Stroke paint on the end piece and give it a Fill of R=93, G=93, B=93. Then copy/paste, flip horizontally, and position on x-axis for the other lens.
10. Draw the Temple Pieces
We’re going to free draw the temple piece with the Pen Tool as shown below. It may take a couple tries to get it just right.
Using the Edit Paths by Nodes tool, select only the nodes that we want to be rounded (four nodes highlighted yellow below). You can select multiple nodes by holding-Shift and clicking on the desired nodes.
With the proper nodes selected, click Make selected nodes smooth in the nodes menu.
With our rounded temple piece selected, give it a Fill of R=93, G=93, B=93. Then copy/paste, flip horizontally, and position on x-axis for the other lens.
Select one of the temple pieces and give it a Blur of 4px. Repeat with the other temple piece (we blur objects one at a time because if you select multiple objects, the blur calculation changes). Select both of the temple pieces (hold-Shift to select multiple objects) and click Object > Lower to Bottom.
Finally, let’s select everything and head to Object > Group to keep these sunglasses in one piece.
11. Draw a Background to Complete Your Illustration
Using the Pen Tool, lets draw a simple, slightly curved shoreline for our glasses to sit on. I’ve got the Fill on this set to R=208, G=168, B=118 along with a slight Blur of 2px for some depth.
Now we need to add some texture. Duplicate this object and go to Filters > Image effects, transparent > Alpha Engraving.
With this shape still selected, set the Opacity to 15%. This will make as a nice texture overlay. Then, position over the original shoreline as shown below.
Now, grab those glasses and set them on the sand. You can even rotate them just a little to give it a more natural look.
Let’s add a shadow to our sunglasses for even more realism. Select the Pen Tool and draw an abstract shape that would resemble a shadow for the sunglasses. For a reference, see the image below.
What we’ll do now is remove the Stroke paint and give the shadow a Fill of R=0, G=0, B=0. Then, we’ll do a Blur of 7px along with an Opacity of 40%.
Let’s draw a rectangle (using the Rectangle Tool of course) for our ocean in the background. Make sure this rectangle is positioned behind the shoreline. We’re going to give this rectangle a Linear Gradient Fill. The first stop is R=62, G=149, B=166 and the second stop is R=75, G=113, B=134. Finally, give this rectangle a Blur of 4.2px.
Using the Gradients Tool, position the gradient vertically, but offset the stops as shown below (towards the horizon).
Now, draw a similar rectangle for the sky. Make sure this rectangle is behind the ocean. We’re going to give this rectangle a Radial Gradient Fill. The first stop is R=227, G=250, B=255 and the second stop is R=122, G=191, B=229. Using the Gradients Tool, you can position the sky similar to how it’s shown below.
Now Chill, You’re Done!
That finishes up this tutorial. We’ve done a lot here using Inkscape, so I hope you’ve learned a few new things. You should have a pretty cool pair of sunglasses designed now, just in time for Summer!