Monday, December 29, 2014

Grease Pencil - Stage II Roadmap

With "Stage I" of the Grease Pencil revamps in master now, it's time to start talking about "Stage II" :) This list is currently still a very preliminary, but it should give an idea of what is planned. There may be one or two things I've forgotten off this list though...

Integrated keyframes display + editing in the Dopesheet


High-Priority - In Progress
1) Make it possible to edit Grease Pencil keyframes in the DopeSheet alongside normal animation
While doing some animation tests, I quickly found that indeed, this is one of those things that would really come in handy. Indeed, as seen in the screenshot above, showing all the channels/keyframes together in the same view is quite easy to do. The "hard" part is the fact that I have to go through fixing all the operators in the Dopesheet Editor to work on a mix of both! That's because, the majority of the operators in the Dopesheet currently assume that they will only ever encounter keyframes, and will crash if they encounter anything else!

2) Copy + Paste Keyframes
Well, this is really a sub-task of the above really. The copy and paste tools were not restored for GPencil keyframes in the Dopesheet when porting from 2.4 to 2.5; in fact, a there are a few other tools which have a similar fate.

High Priority - Planned
3) Copy + Paste Strokes
Currently, while you can duplicate strokes within the same layer, there's no easy way to copy/move them between layers. The idea here is that we would implement a copy/paste buffer for Grease Pencil strokes so that you can copy all the selected (and visible strokes), then be able to paste them into which layer is active. With this in place, it should be much easier to animate just the outlines in one layer, then copy these into another to animate the fills (and/or potentially the shadows too!).

4) Shrink/Fatten Transform Tool - To adjust pressure values of stroke points
Just like how Alt-S is used on curves to change the thickness of the curve at the selected points, the same should work for strokes.

(Somewhat related is also the ability to set the "scale" at which volumetric stroke thicknesses are interpreted. While the current hardcoded value was OK for the tests I did initially, in the snowman file, this turned out to be far too large in a few cases)

5) Ability to parent a layer's strokes to an object/bone
For object-attached GP datablocks, this feature would make it so that a layer can be made to be transformed by the owner's transforms. There are two potential issues that need to be worked through here: 1) issues when drawing new strokes (i.e. ensuring that the right inverse transforms are applied, and that it all works correctly), 2) ensuring that the layer order is still respected

6) Isolate Layer
A quick way to make just the active layer the only one editable. This could also be paired with a way to only show the active layer...

Medium Priority - Planned
7) Smooth Strokes
A brush-like tool to selectively remove the jitter/wobble from parts of strokes. This may end up being folded in with the "sculpt" functionality noted below...

8) Snap to Cursor / Snap Cursor to Selected / etc.
I just realised the other day that this functionality is missing

9) Duplicate Layer
A quick way to copy everything in a layer into another layer, to have a quick base to start from (e.g. as another way of doing fills for an already animated set of outlines


Planned - Initial Design Investigation Phase
10) Stroke sculpt tools
This is just basic brush-based warping and distortion of strokes. How exactly this would work and/or how it should be integrated is still to be decided (for instance, should this be a separate operator, or just another little mode?) Possibly by mid-2015.

11) Freestyle Integration
Perhaps in collaboration with Tamito, we'll try to figure something out here. From initial investigations, it seems that if we just let these strokes get added during one of the early geometry-import stages in the pipeline it might be enough to get what we want. Then again, it's likely there might be other complications I'm not aware of here yet. Anyways, it is definitely on the cards as something I'd like to see in 2015 (optimistically by the end of the year).

12) Better ways to manage the layers
What's clear from seeing several workflows is that multiple layers are often needed to fully render each character and/or prop. This presents the natural issue of how can we more efficiently manage groups of such layers?

13) Strokes being deformed by armatures/modifiers
For more "Paperman"-like goodness, it would be interesting to look into letting modifiers deform GPencil strokes too. But, then again, that would start adding a whole other level of complexity under the hood. It might have to wait until the viewport refactor requires some changes (see below).

14) Split by depth?
One (non-intuitive) issue I ran into when doing the snowman test were issues surrounding where strokes placed at different depths in 3D space didn't always get ordered in the expected ways, due to the way that layers are ordered. The simplest (to implement) solution here is to have some tools to split layers out so that they behave appropriately according to scene depth. More investigation will be needed here though. It could also be a case here that Stroke Copy/Paste is enough to render this a mere nuissance.


Longer Term - No firm dates yet

Port stroke drawing to newer OpenGL techniques (i.e. GLSL shaders + persistent vertex/geometry buffers) 
Depending on how the Viewport Project progresses, we'll eventually need to look into porting the Grease Pencil drawing code to some newer OpenGL/GLSL techniques. My current understanding is that most of the drawing code should still function fine in the interim - that is, there will be a compatability layer which emulates the behaviour of the old ancient OpenGL API's that we've been using in Blender, so in theory, the existing code should still work.

Having said that, once we have some nicer drawing code in place, with the ability to use fancier shader techniques (and hopefully with a nice system for easily swapping in/out the shaders needed), it makes sense to upgrade the Grease Pencil drawing code to a more sophisticated set of drawing techniques. One of the main benefits to come out of this is that we can finally have ways of drawing good quality lines (i.e. with properly rounded tips/corners, as thick as we want them to be, control over the hardness/softness of the line, and maybe even different types of stroke texturing).

8 comments:

  1. Awesome work with the Grease Pencil. The new features are pure awesomeness :-)

    Some further ideas for your inspiration stew.
    My secret fantasy is that at some point one could draw with the GP as fluidly as if
    with Rhonda OpenFrameworks app by Amit Pitaru, http://vimeo.com/99717328

    That'd be only a couple of (hopefully small) features off:

    * Visual indicator of where in the previous stroke the new stroke will snap to.
    * Allow rotation (with a 3D mouse, for example) while drawing, to achieve 3-axis 3D curves (not just curves on planes)
    * (And maybe) control the depth of the crusor, away from the camera with the mouse wheel or some similar gesture.

    Cheers,
    BF

    ReplyDelete
  2. this is really exciting :)
    Keep up the great work

    ReplyDelete
  3. Really Interesting Development Roadmap stage 2!
    maybe you already know about Tilt Brush application Tool but anyway i post you the link to
    "Tilt Brush"
    Tilt Brush is a Virtual Reality Tool that paints the Space all around you.
    http://www.tiltbrush.com/#intro
    scroll down to see the videos.....maybe usefull for you for GP development and new ideas Inspirations!
    Thanks

    ReplyDelete
  4. basically nice but i need
    - complex fill for speech balloons and others
    - mypaint pencil brush-looking brush for rough sketch
    - Inkscape Pencil Shapes (None, Triangle in, Triangle out and Ellipse) for ink-over-pencil
    http://tavmjong.free.fr/INKSCAPE/MANUAL/html/Paths-Creating.html#Paths-Pencil

    Thanx

    ReplyDelete
  5. WOW
    Thanks!!!!!!

    =:-)

    ReplyDelete
  6. "Better ways to manage the layers"

    It may be that the color of a shape is independent of the layer ( a layer may have different shapes in different colors) The layer is used as container, the color belongs to each shape.

    Thank you for your work

    ReplyDelete
  7. Thanks for the great and needed work on GP.

    my question is whether it will be possible to change (via python) which grease pencil data will be linked
    I can do (..)tool_settings.grease_pencil_source = 'SCENE' to set the source, but I'd like to be able to script the dropdown selection of which grease_pencil data is linked.

    I'm using it instead of bgl module to represent geometry in a more permanent way, with option to easily convert to meshes: https://cloud.githubusercontent.com/assets/619340/5602194/ce613c96-933d-11e4-9879-d2cfc686cb69.gif

    ReplyDelete
  8. Blender 2.73 - is out - very cool.
    I saw some Videos about the new Grease Pencil - also very cool.

    The first (little) Problem: The edit Tools are working - but there is no Chance to positioning the curser -the Tools are working directly from the place, where the Icons are.

    I whish, that the Grease Pencil Tools will be improved – to very cool drawing Tools in Blender – for easy (and clean) animations!!!
    Have many success!

    ReplyDelete