Thursday, December 2, 2010

How to Create a Sketch Effect in Blender 2.55

Well, since I can't get my video tutorials to upload anywhere else, and my website is still in progress (yes, I got a website with my own domain name), I figured I'd make a few more text tutorials here.  This tutorial will teach you how to create a sketch effect in Blender.  Here is the final result of this tutorial:

In this tutorial, we will be relying on the compositing nodes do do the majority of the work for us.  The only thing we'll be doing outside of the compositing nodes is putting together our scene.  I'm assuming you have at least enough knowledge to compile a simple scene (like the one I did above), but even if you don't, this effect will still work fine on the default cube ;)

So, we'll start by selecting Compositing from the drop down menu on the toolbar at the top.

Next, enable the Use Nodes option at the bottom of the compositing window.  This should show two nodes: A Render Layer node, and a Composite node.  Press Shift-A, and add an Viewer node (Output - Viewer).  I like to drag the viewer node to the upper right corner, the composite node to the lower right, and the render layer node to the upper left.  This will leave plenty of space in between for our additional nodes.  Next, connect the image output on the render layer node to the composite node and the viewer node (Simply left-click and drag), then enable the Backdrop option, which is right next to the Use Nodes option we used just a second ago.  You should now have a setup that looks something like this (if you're just seeing a black box in the background, try rendering the image, and it should appear as a background in the node window):

Now that that's out of the way, we can work on the actual effect.  Start by adding a Filter node (Filter - Filter), and connecting the render layer output to the input on our new node.  From this point on, it's up to you whether you want to reconnect any new nodes you add to the viewer node; just keep in mind that whatever is connected to the Viewer node is what will be shown in the background.  On your filter node, change the type from Soften to Sharpen.  However, you'll notice that it doesn't really sharpen quite as much as we want it to.  To increase the amount (since the factor on the node won't go any higher than 1), duplicate the node and connect it to your previous Sharpen node, then set the factor of the new one to 0.05.  The higher you raise it, the more detail will be shown.  I usually like to keep mine relatively low, though.

Next, we'll add a Math node.  Connect the newest Sharpen node to the first Value slot on the math node, then set the second value to 0.  Next, choose Greater Than on the drop down menu.  This will isolate anything that isn't part of the actual effect; it's basically what the render would look like if you used the sharpen effect, but you couldn't see the rest of the scene.  If you connect the Math node to the Viewer node, you should see something like this:

If we wanted, we could stop right then and there and say that the effect was complete.  It looks pretty good, but I think it can still be improved, so I'm going to continue on with that.  Add a Blur node (Filter - Blur), and connect the value output of our Math node to the input of our blur node.  Next, change the blur type from Flat to Fast Gaussian.  Then raise the numbers on both the X and the Y values to 2.  

Now add a Mix node (Color - Mix) and connect the output of the blur node to the Fac value of our mix node, then connect the Value output on the math node to the second input on the mix node.  Change the node type from Mix to Screen, and by clicking on the little color box, choose a darker grey.  How dark you make this grey is up to you and how light you want your 'pencil' to be.

Finally, connect the output of the Mix node to the input on the Composite node, and you're done!  I've also added a vignette effect, but I won't go over that as it's not a necessary part of the tutorial.

Here is the final node setup (vignette included):

And here is a link to the .blend file (this was made in blender version 2.55 beta): Sketch Effect .blend

If you had trouble with any part of the tutorial (or downloading the .blend), then feel free to post a comment below.  Thanks for reading!

*UPDATE* I figured out how to anti-alias the effect; go into the render panel, and under Anti-Aliasing, enable Full Sample.  That's it :D *UPDATE*


  1. Dude! You finally posted! After 39 comments under your tutorial, finally decided you'd had enough, huh? Anyways, cool tutorial. Comppositing is something I've been wanting to try for a while.

    P.S. I just got the Essential Blender of of (the state I live in)-Cat. It's really helped me with compositing and fluid sim and particles and stuff. But it's written for Bllender 2.44, believe it or not. And the guy who wrote it has a crush on Suzanne.

  2. P.S.S. Is the URL to your site ?

  3. That was fast... thanks, though! I've never read 'The Essential Blender', but I've seen parts of it before and it looks really good. The only blender book I've read from beginning to end is Mastering Blender, by Tony Mullen.

  4. Yes, it is, but I have a theme installed that I haven't changed any of the settings on it, so there are strange category names on the side, and there's really nothing on the site yet...

  5. Cool tut, never thought of using that method.

  6. Thanks! That's only one way to do it, too. I was messing around with the compositor and found about 6 other ways to do it. But they all got different results, and I think this one was the best. I just wish there was a way to anti-alias the sharpen filter...

  7. Ben, you are such a nerd. In a good way. Everyone tells me I am, too.