Episode 072

Episode 072 – Glass Panels

by Richard Querin

In this screencast I demonstrate one way of creating a glass panel using Inkscape v0.46.

I got the idea for this screencast from this image on Flickr.

Also, I recorded this one in a single take with no do-overs. And while I think it’s an ok screencast, I twice mentioned a potential problem with the method I was using and how I was going to discuss it “later”. Well of course “later” never came and I completely forgot about it. So in the interest of lazyness I thought I’d just put the explanation here ;). Here goes:

This method uses the Object->Clip function to “fake” the transparency of the glass. The reason I do this is because it is impossible (somebody prove me wrong – please!) to create that drop shadow under the edges of the glass AND maintain transparency through the glass. In Inkscape I cannot find a way to create a fringe blur so that for instance, there is blur around the outside of a rectangle, but the inside of the rectangle is transparent. You could show only the outline or border of a shape and blur that, but the blur goes inward and outward – not what you want here.

There are workarounds. Such as going to the GIMP and creating the fringe blur at exactly the right size and importing that (as long as the interior of the fringe is transparent). If you can think of other workarounds, by all means post them in the comments.

Why is this a limitation of this method for creating the glass panel. Well, primarily it is because once you create the glass panel, you can’t move it around the image easily. You would have to do the Object->Clip whenever you move it. Not ideal. It means you have to pick your spot and dimensions of the panel pretty much at the beginning. A niggly detail, but annoying to me nonetheless.

So apologies for not explaining it in the screencast. It is an important thing to note when creating these things. And I implore you once again to post any solutions or workarounds you might have for this problem. I have been known to be slow catching on.

Just ask heathenx. 🙂

ps. The music in the intro was a song called “Should Be” by Arthur Yoria off of his Handshake Smiles album. You can find his stuff (which is great) over at Magnatune.com (which is great too!)

Cheers!

39 Responses to “Episode 072”

  1. screencasters.heathenx.org/blog » Blog Archive » Episode 072 - Glass Panels Says:

    […] Episode 072 just went up. […]

  2. cb2k Says:

    Consistently Awesome… I like the way the guys implement and generously demonstrate the clever little techniques of their art into these tutorials. Thanks for opening new dimensions of possibilities to our creative efforts.

    P.s. I want a T shirt….

  3. Zombiebrainz Says:

    hmmm shirt 😉

  4. Darth_Gimp Says:

    Hey Richard..

    Haven’t watched this one yet as I am currently downloading it. As per the fringe blur, I have done this in inkscape in the past by the following process:

    1. duplicate the object
    2. Fill and stroke dialog > remove fill and set blur on a stroke
    3. Send fringe blur to the back and set transparency as needed.

    I will test this with your screencast when its finished downloading.

  5. Richard Querin Says:

    @Darth_Gimp

    The problem with blurring a border or stroke is that the blur goes inward as well as outward. I want the blur to go outwards and a sharp edge (no blur) going inward.

  6. Richard Querin Says:

    For those interested in the “cal” command I used to generate the calendar text, you can check out this blog post I did a couple of years ago. It could be quite useful if you wanted to make your own customized calendars using Inkscape:

    http://blog.rfquerin.org/2006/11/07/command-line-calendars-on-linux-cygwin/

    Note: Windows users shouldn’t give up all hope yet. If you want to use the cal command, you could always install Cygwin which effectively gives you a Unix/Linux terminal right on your Windows system. I recommend the following link as a good starting point for getting it installed:

    http://www2.warwick.ac.uk/fac/sci/moac/currentstudents/peter_cock/cygwin/

    Once you have the basic Cygwin installation working, you will likely have to install a package called “util-linux” to get the ‘cal’ functionality at the command line.

  7. heathenx Says:

    Cool screencast. 🙂

    Hey, thanks for the links. Also, if you are fortunate enough to have VirtualBox installed (free) and a Linux distro installed (free) then one could get to the terminal/calendar that way. Running in seamless mode is even more convenient as Windows and Linux apps run together. 😉

  8. Richard Querin Says:

    How does the seamless thing work? Can you save out a text file from the linux distro to your windows file system? Or can you cut and paste between the two? I run VMWare here at work from time to time, but it’s a real memory hog. Cygwin is a lot more lightweight for terminal-only stuff for me.

    I’ve got to give Virtualbox another shot. I had a heck of a time with it the last time I tried it (which was months and months ago).

  9. heathenx Says:

    Once you get VirtualBox installed and a distro installed, Ubuntu for instance, then install the guest additions. Restart your VM and then go to File>Seamless Mode. You will have an overlay of the gnome panels on top and bottom. I move my bottom gnome panel to the right so that it doesn’t interfere with my Windows taskbar but that isn’t necessary. You can toggle seamless on and off along with full screen. Very handy.

    I can copy-n-paste text between the two and I transfer files to and fro with my standard network connection to my servers (samba). You can have shared folders in VirtualBox but I don’t use it.

    Lower your ram and graphics settings as low as you can tolerate for your virtual machine so that it doesn’t take such a hit on resources.

    I use VirtualBox 2.0 and it’s pretty darn stable. I like much better than VMWare.

  10. Zombiebrainz Says:

    I run Virtualbox on my Ubuntu box @ home… works really well for me. I keep Office 2K7 on there when OpenOffice 3.0 RC3 (now) doesn’t render properly. Also use it when I need to VPN into work.

  11. Andy J Says:

    Got a way to make a hard edged drop shadow… could be hard to explain, but I did do it. and it works. I’ll use a circle but it can be applied to any shape..

    1) make your circle and dup it.
    2) dup it again and make the dup bigger (big enough to cover the blurred radius
    3) make em all paths
    4) select one of the original sized circles and the big one and diff em to make a donut
    5) blur the original sized circle
    6) with the donut on top, select the blur and the donut, and set your clip.
    7) That’s it…

  12. Richard Querin Says:

    Andy J !!!!!!!!!!!!!

    You are officially DA MAN!

    I never thought of using a donut (or outer band of any shape) and the Object->Clip->Set to clip the blur itself. Simple and exactly what I wanted to achieve!

    I knew someone would come through! This opens up a few more avenues for things I’ve wanted to try creating in Inkscape.

    Beautiful Andy J.. beautiful!

    🙂

  13. Richard Querin Says:

    So for anybody reading this far down, Andy J’s suggested method means you can create the glass panel and move it anywhere on top of your background image very easily. You could even use this to create glass panel graphics for a web site that were semi-transparent and without caring about the background colour(s) underneath. Nice!

  14. Firus Says:

    Hey,

    again a great tutorial.

    Maybe Richard or heathenx can put in AndyJ’s idea into one of their next screencast, because I think not everybody reads the responses to this blog *g*

    Greatings from Germany,

    Tony

  15. heathenx Says:

    @Firus

    Sure. If something like this comes up again (and if we remember) we will most certainly give a shout out to Andy J. My problem is that people teach me so many things that I sometimes forget who taught them to me. Thanks for the tip Andy J. 🙂

  16. Benjamin Says:

    Hi,
    I found a very easy way to do a shadow that only goes out- or inward:

    1. Create any shape and fill it with any color
    2. Object>Filtereffects…
    3. Add a Blur that uses the Source – so you can change the color/transparency later easily by changing the fill
    4. Add a Combine with Operator ‘Out’. Use Blur on top for an outside-effect, Blur on bottom for a inside-effect – the other link goes to Source again.

    Thats it.

    …maybe some words of menu-elements are wrong…my inkscape is german…sorry.

  17. heathenx Says:

    @Benjamin

    Wow! I like that method. Very easy to use and once setup can be saved out and brought back in when you want to use it. Nice work. 🙂

  18. heathenx Says:

    Here’s is a filter that I made based on Benjamin’s instructions. Draw any shape that you want and apply the filter. To bring the filter into a new project just drag-n-drop the filter_outer_glow.svg file onto your canvas then apply your filter to an object.

    UPDATED WITH ARITHMETIC SETTING:
    filter_outer_glow.svg

  19. Richard Querin Says:

    Y’know what…

    These revelations maybe call for a quickie supplemental screencast demo (like heathenx provided for in Ep034). Maybe I’ll try to put one together in the next day or three… and just stick it in as an update to this post.

  20. Benjamin Says:

    …i found a bug…

    the effect works well as long as the opacity of the object is 100% – when it isn’t the object becomes grey.

    but the solution is simple:

    Do not use ‘Out’ in the Combine statement – use ‘Arithmetic’ with 0,1,-1,0 – so transparence works well, too.

  21. heathenx Says:

    @Benjamin

    Good find. I updated my svg file above.

  22. cb2k Says:

    Well hell it’s a linux nerd fest in the comments area – great I love linux if I come up with something worthwhile to contribute to this I’ll write again… seamless gonna give it a shot…

    now what color are those shirts? what size? how much? 🙂

  23. heathenx Says:

    @cb2k

    Just click the “goodies” link in the navigation bar at the top of this page. We would be disappointed if you didn’t at least buy one of every item that’s available…even the pink one. Or find the most expensive item, like the hoodie, and buy ten of them. 🙂

  24. cb2k Says:

    I’ll procure one of those fine article 3552442’s … I will introduce my college class to screencasters soon to maybe generate a few prodigies. Hey HX I gotta rerun some of those old casts re filters and live path effects.

  25. George Moschovitis Says:

    Thank you for these great tutorials, filled with useful little tricks!

  26. Zombiebrainz Says:

    I took a closer look @ the “Filter effect” method for the Outer Shadow — specifically at the Arithmetic formula 🙂 pretty clever! So much to learn in Inkscape…

  27. MWUK Says:

    My outer shadow method:
    (From having grouped objects)
    1: Take original rectangle or other object
    2: Remove fill and add stroke (black) then align with grouped objects.
    3: Ctrl+j the outline of the original shape until it borders the outer glass element
    4:Add blur and increase stroke as desired

    Hope people find this useful, although there already seem to be some better methods (although this one is simple after the first time)

    MWUK

    P.s. It can be easier to use strokes for the first parts, in my opinion anyway, still brilliant tutorial though Richard!

    P.s.2. I know that you don’t like inwards blur, but it can add depth to the glass border ‘bit’.

  28. tomh Says:

    I have just thought of a simpler? way,

    1) Create object
    2) Create duplicate + set blur
    3) Group objects <- the key step!
    4) Set transparency on group

    blur will not bleed into the object as the transparency is applied after the grouping of the objects…

    There’s more than one way to skin a cat…

  29. Richard Querin Says:

    @tomh

    I’m confused about step 2. I want a black blurred shadow under the edges of the object. How does blurring the duplicate of the original object accomplish that? Can you maybe do a step by step example image and post it somewhere?

  30. MarkC Says:

    Following on from the comments about VirtualBox, if your main desktop machine is Windows, but you have Linux in a virtual machine, or elsewhere on your network, you can get a “seamless” interface working by following these instructions from my blog:

    http://www.peppertop.com/blog/?p=54

    If you have VirtualBox locally installed you’ll probably find it better to use the integrated “seamless” mode – but if you use some other virtualisation software, or want to do the same trick with a remote machine on your network, this might help. It’s probably overkill if you just want to run the “cal” command though 😉

  31. heathenx Says:

    It is absolutely NOT overkill to install VirtualBox and a Linux distro just to get to the cal command…just kidding. 😛

    The only reason that I mentioned VirtualBox in the first place is because it’s part of my work environment. Getting to Linux terminal commands in Windows isn’t really an issue for me. Many of us are stuck on Windows at our day jobs so VirtualBox at least keeps us from going insane when we need to use Linux. Running in seamless mode blends Windows and Linux together (I’m sure you know) and it makes things awfully handy.

    Thanks for the link. I’ll plug your blog into my feed reader. Looks like you have an interesting blog. 😉

  32. user Says:

    I have never before seen sooo inspiring tutorials for inkscape. thank you for your work.

  33. Porfirio Says:

    Why my comments dont show up :s

    I wrote how to make the shadow without need to clip original image, alowing to move arround the glass pane, but it didnt apeared

    Example here: solidfiles.com/d/5830

  34. heathenx Says:

    @Porfirio

    Sorry. I’m not sure why your comment didn’t show. I blame Richard. 🙂

  35. tomh Says:

    @Richard

    hm, I may have missed out a step (or at least some detail on it)

    here is the example image: http://hicks.f2s.com/TEST/SVG/blur_effects_simple.svg (you will probably have to save page as or something…)

    ps. a more complete step by step may be this:

    1) Create object
    1a) group objects (not needed, but can be helpful)

    2) Create duplicate
    2a) set the fill of the objects to black,
    (if there is an image, convert it to a patten and then set the fill to black)
    2b) blur object as desired
    2c)send to back of original
    2d 😉 if you need a storonger black, duplicate the blurred object again+send to black

    3) Group all objects created so far… <- the key step!
    4) Set transparency on group

    …hope that helps, its harder than you think to explain to someone something that you think is straightforward! lesson perhaps learnt
    tomh

  36. Fionn Says:

    Very nice screencast!
    I love the \’cal\’ command, actually I realy needed to do calendar. 😉
    Greetings

  37. metalmarious Says:

    Here is a non destructive way to do it, just make a rectangular “ring”

    blur the original rectangle

    than place the ring on top of the blurred one and clip together

    here is a video of it: http://www.metacafe.com/watch/2235337/re_inkscape_screencast_ep072_non_destructive_method/

  38. Xbody Says:

    Looks really cool! A bit like the gadgets in Windows Vista.

  39. Resonance Says:

    @ metalmarious:
    Is it not same as what Andy J says? All these steps you do there in the video can be basically summed up with the following illustration – http://i.imgur.com/BWX60.png