Monday, December 7, 2015

Grease Pencil - Lookdev Doodles

Just some after-work doodles with Grease Pencil, playing around with different colours and what effects can be achieved by playing around with different brush settings :)

As always, it was a great exercise for checking on the state of things. From personal experience, I can attest to how "dog fooding" (as it's often called in the software industry) is one of the best/most efficient ways for developers to pick up problems and/or workflow bottlenecks in their work!

A collection of fixes I did over the weekend are good examples of this. Notably examples were:
  1) The new "Additive Drawing" option - I intend to make a short demo vid explaining this feature shortly. Hang on for a bit longer to see what this is about :)
  2) The changes to make Stroke Placement a toolsetting vs a per-datablock setting - needed to improve the workflow for using that, which was a bit clunky
  3) Some tweaks to the Onion Skinning toggle on the header to make it disable onionskinning on all layers when toggled, making it easier to use for quickly turning onionskinning on/off
  4) The new filtering options in Grease Pencil mode in the DopeSheet, including name-based filtering, and filtering only those GP datablocks used in the current scene

As usual, all these can be found in the GPencil_Editing_Stage3 branch.   (I'm hoping/tempted to try and just merge it into master, and then work on fixing any issues that crop up later... thoughts? ;).


In today's little project, a few little things did stand out to me as being in need of some urgent attention. It's surprising how although some are things I've known about (and have been planning on fixing), others were things that AFAIK are the first time I've heard or come across the problem. These particular things were:

1) Eraser needs a few tweaks to make it more suitable for making art. It's fine now for annotations, but could be a bit better in a few specific ways:
  1a) Maybe it should not just operate on the active layer only - We already have the protection toggles for isolating strokes, so it may be a good idea to let it operate on more. The only redeeming quality is that it can be used for some interesting effects if you layer several layers of hand-coloured shapes on top of each other, and then use the eraser to progressively remove bits and pieces of some of the "hidden" layers. It produces an interesting effect, especially if the colouring on the top-most layer is rough enough to leave quite a few random gaps between the strokes.

  1b) Pressure Sensitivity for the Eraser -  I've been thinking about this one for a while now, but after today, I think it's time. Basically, the eraser would be a lot more useful if instead of outright erasing the stroke points, it would first decrease the pressure of the points (until they got lower than a threshold), and then, only then would it delete the points.

2) Enable/Disable All for Layers - In particular, for protecting/isolating layers, and so forth. I know, I've talked about this one for a while now, but it's clear that this needs to happen urgently. The current situation just sucks too much.

3) Some way of managing groups of related layers - While writing this post, the idea of filtering layers by their prefixes (as a way of grouping/managing them) came up as an interesting idea to be explored.

4) Some way for the "Push" brush to move strokes around in terms of screen depth - Most likely, the brush pressure would get used for this.


I also ran across some non-Grease Pencil things (again), that I'm sorely tempted to resolve:
* 3D Cursor - This will probably be somewhat contentious, but I'm finally convinced that it would be really beneficial if we had a toggle to lock the location of the 3D cursor. Phew! Maybe that isn't quite as contentious as hiding the thing, but being able to lock it would prevent people from accidentally jolting it off into the wrong place while drawing with Grease Pencil (and then finding that half the strokes ended up on a different depth plane as a result) would be a good thing.

* Align Camera to View - Arrrgggh!!! I absolutely hate how this tool routinely fails to do as it says on the can! It almost always ends up being too close to the action (and then needs to be yanked backwards (by what feels like "2 inches", determined visually) a few times to frame things up again), but by that point, it's almost invariably gone and lost whatever viewpoint you'd been trying to save in the first place!

Adding insult to misery is the fact that even when it does line everything up right, the camera settings and viewport settings (e.g. focal length, clipping, etc.) are usually out of sync too, meaning that your chances of actually getting that camera giving you the framing you wanted are even more remote.

So, there are 2 steps here:
  1) Copy the viewport settings on to the camera when doing this  (trivial),
  2) Fix the mapping math (doable; may require some tweaking/experimentation)

It'd be a nice opportunity for someone to get a patch (or patches) into Blender :)

(Even better would be a single operator called "Add Camera for Current View", saving the step of creating and making that camera active first :)

* Set render size from 3D viewport dimensions - Admittedly, this is quite a niche feature, but gah! Sooo useful for use with the above!


Finally, I'm planning on posting an updated GP development roadmap later this month, with a fuller list of some of the big ticket directions that I'm currently thinking about taking the Grease Pencil tools. With the viewport work starting up, there are quite a lot of interesting and exciting possibilities that we can now start taking advantage of, so it'll be very interesting to start looking into some of these things.

But first, let's get the current branch into master, and resolve some of the lower-hanging usability fruit first :)

And to conclude today's post, here's another doodle made using Grease Pencil from a few years back:
 Title:  "Goldfish Pond"      Vintage: (2.4x)



  1. It is really a good idea to think of merging your lasted improvements into the code, and then we can start (those who are familiar with the features of GreasePencil of course) taking care of the issues and bugs presented there.

    For me reading all this is such an inspiration.
    Thank you

    1. This comment has been removed by the author.

    2. As I am not going to build GreasePencil (because I don't know how) I have to be patient :) and wait till it is already present in Blender3D!

  2. a bucket tool would be nice, also instead of generating make greasepencil keyframes when creating a tween, why not treat tweens as a 1 dymentional curve.

    For inking drawings, a way to slow the drawing speed. You can now smooth lines after you have drawn them, but you can not slow down the speed of the actual brush movement as you draw them. For refference, look at tvpaint's "smooth" value for brushes, see inkscape's calligraphy tool "mass" value, zbrush' lazybrush, krita's smoothing:
    You can call the feature "stroke stabilizer" or something like that. It stabilizes the stroke as you make it and can be controlled how much