
- Software: Inkscape
- Level: Beginner
- Subject: Drop Shadows
This is quite a simple technique you can use to create drop shadows of objects you have designed in Inkscape.
Drop Shadows of Simple objects

Let us first look at a simple example.
Make a copy of the object (rectangle in this case) and move it few units to the bottom and to the right.

Then, change the color to black or dark gray.

This would be the shadow shape. Move it under the object - either by pressing [Page Down] or [End].

Now, open up the Fill and Stroke dialog box. Either use [Ctrl]+[Shift]+[F] while selecting the shadow object, or you can choose the Fill and Stroke from the Object menu item.

Increase the blur from 0 to 3.0 or 4.0. You now have a drop shadow for your simple object.
Drop Shadow of Complex Shapes
This technique can be used for creating drop shadows of complex objects too. There is just one additional step.

Even when the object is complex set of shapes like the one above, just make a copy of all of them and paste it over it. To do this, select all the shapes, then use [Ctrl]+[C] to copy and then a [Ctrl]+[Alt]+[V] to paste it over at the exact same spot. When the new copies are still selected, move them all together and position them a bit to the bottom and to the right.

Now, with all the new copies still selected, hit the [Ctrl]+[+] or choose Path > Union.

After this, follow the steps similar to a simple object, and you have drop shadow for your complex object too.

Here, if you observe carefully, you will notice that I have reduced the Master Opacity of the shadow shape along with blurring it.
Armed with this technique, you should be able to create drop shadows of almost any shape/object. You needn’t position the shadow the same way as I have done, but keep it consistent with the direction of the light source.
If you have any questions, feel free to use the comment form below.
If you liked this tutorial, get updates using KalaaLog.com Feeds. You can also use the email form above to get updates.



6 comments
Comments feed for this article
Trackback link
http://kalaalog.com/2008/06/15/drop-shadows-in-inkscape/trackback/
July 2, 2008 at 8:08 pm
Arthur
What I’d like is a drop shadow (or other such effects) which updates automatically when the master object is updated. Is this possible with some cloning commands or the like?
July 3, 2008 at 3:46 am
Vyoma
Well Arthur, I just did some experiment, and I think, it is not possible with the current (0.46) version, it is not possible.
First of all, not sure if it works on complex objects.
If we take single shapes, the clone object does let the clone to be blurred, but it does not let the color of the clone alone to be changed. That would defeat the purpose of having a darker gray or black shadow shape under it.
July 3, 2008 at 4:25 am
ShaneK
Arthur, you can do it via filter effects in 0.46
http://screencasters.heathenx.org/wp-content/videos/ep058/ep058.html
This is a video tutorial that will walk you through it step by step. Drop shadow updates on the fly and everything.
July 3, 2008 at 5:40 am
Vyoma
I stand corrected - that is a great link, ShaneK. That screencast does provide a wealth of information.
That said, I think it is time I explore 0.46 version a bit more - did not realize that they had a new version released.
July 3, 2008 at 9:39 am
Alex
When it comes to creating a shadow for a complex object, I thought of drawing a rectangle above the whole thing then doing a logical intersection between the complex object and the new rectangle. Path\Union is cooler though
August 19, 2008 at 1:36 pm
chris
Than you for all the explanations, the tut on screencasters perfectly completes it (incredible what you can do simply with the filter effect, I must use it more often).
Another related question: I’m drawing drop shadows on my diagram, then I want to export it to pdf for inclusion on a latex document (using then pdflatex). The problem is that the created pdf file is poor for the shadow; depending on the methods it disappears, it is transformed to plain grey, or it shows ugly bitmap pixels. I tried to use the “save as pdf with cairo”, and a pdfcreator printer, but didn’t manage to achieve correct results. Does anyone have a solution for that, or is it impossible to have a pdf with cast shadow ?