Grease Pencil Refactor

With the release of Blender 2.80, Grease Pencil is no longer a simple annotation tool, but a first-class citizen in Blender.

Over the years since the greasepencil-object branch was created, a number of issues started to arise.  Some of the issues were the result of developing new features on top of the old 2.7x (and 2.6!) code, while others were related to how the draw-engine was designed time ago. A decision was taken to refactor the code to have solid foundations that would allow future growing.

It was clear that refactoring Blender’s draw-engine would be a huge task. For great achievements you need great people, and luckily Clément Foucault (creator of EEVEE) got on board! The work Clément did really pushed Grease Pencil to the next level.

The list of improvements is huge, here is an attempt to list them all.

1. Draw Engine refactor

The most visible part of the refactor of Grease Pencil is the draw-engine. This doesn’t refer to the drawing experience per-se, think of it as a render engine that takes care of displaying objects and overlays in the Viewport (and render output).

The previous draw-engine simply wasn’t designed to handle a 2D object type like Grease Pencil.

1.1 General Improvements

Pirate Scene.

It’s impossible to list all the improvements, here are some of issues that have been solved:

  • All anti-aliasing problems.
  • Artifacts combining 3D objects with Strokes.
  • Color mixing.
  • Blend modes problems.
  • All macOS incompatibilities.
  • Innumerable bugs fixed.

All drawing shaders have been rewritten from scratch, as a result the image quality and performance has been greatly improved.

Some scenes play up to 100% faster, so more complex scenes can be built.

1.2 Color Management

Grease Pencil now follows Blender’s color management and all the code has been updated to work in Scene Referred Linear color space.

Not only this means Grease Pencil objects will blend with the scene in a more natural way, but also Effect modifiers, blend modes and lighting accuracy also greatly benefit from this change.

1.3 Lighting

Light your scene in a whole new way.

Previously, a way to simulate lighting was to use an Effect modifier type Light. It worked, but it wasn’t a really good solution.

Thanks to the refactor, Grease Pencil objects are now lit by regular light objects. Responding to light color changes, opening a whole new world of possibilities for mixing 2D with 3D. Casting shadows is not yet supported, but it is planned .

1.4 New Mask system

New Mask system.

Good masking is a must for any 2D software, Blender definitely needed to improve in this area. The previous mask system was very limited:

  • It always used all layers below.
  • Anti-aliasing and blend problems led to bad quality renders.

The new system allows you to combine masks, adding a lot of flexibility and it also looks much better thanks to the new draw-engine.

1.5 Improved Effects

Using Rim and animated Blur effect.

The effect modifiers have been rewritten to improve quality and speed, while adding new functions to make them more flexible.

2. New Vertex Paint mode

Up until now, in order to have different colors a new material had to be reated for each color.

For simple scenes this was fine but for complex scenes the list of materials could grow a lot, sometimes unnecessarily, for example when the materials only slightly differ in color.

2.1 Vertex Colors

New Vertex Paint mode.

Using Vertex Colors allows you to keep a small list of materials, but have infinite colors!

Additionally, you can now have a stroke with multiple colors! This was impossible before as strokes were limited to one color per stroke. It’s also compatible with Textured Brushes so the possibilities are even greater.

This new mode is accompanied by a set of tools to improve the drawing feeling, making the artistic creation process feel more natural and familiar with other 2D painting software.

2.2 Palette Improvements

Using Palettes to define colors.

With color freedom comes the need to store palettes. Blender already had built-in support for palettes, but feature wise they were a bit limited.

The following improvements were done:

  • New default palette.
  • Extract Palette from an image or Grease Pencil object.
  • Convert materials to Vertex Colors.
  • Add-on to import palettes from Krita, GIMP, or Adobe Photoshop.
  • Improved UI for easier use.

3. Performance

The goal of the refactor was not only to improve Grease Pencil at a visual level, but to modernize the code under the hood for better playback speed and memory usage. Blender can now handle heavier scenes with the same hardware.

3.1 Faster Data Evaluation == Higher FPS

During the refactor, some issues were detected in the old implementation of the internal structures and how data was handled.

The code in charge of updating data while playback and modifiers evaluation has been rewritten from scratch to improve scrubbing and provide a better experience during animation.

In this example playback is now twice as fast.

Some of the changes include:

  • Faster overall playback speed and scrubbing.
  • Faster start of the first playback.
  • Better integration with the Dependency Graph.
  • Better memory management.
  • Better modifiers evaluation.
  • Better handling of multiple instances.
  • Faster response using brushes with multi-frame in complex scenes.
  • Lots of code cleanups and smaller improvements.

3.2 Smoother Drawing of Fast Strokes

No more jagged lines when drawing with fast gestures.

While drawing, you often do very fast hand gestures. On Linux this was not a problem, but on Windows there were some really bad artifacts.

Improving the feeling of drawing and the quality of the brushes further is a never-ending task, and it is top priority for future releases.

3.3 Stroke Quality

Smooth lines even in tightest strokes.

The artifacts when drawing hard angles are now solved thanks to new shaders, resulting in smooth lines even in the tightest strokes.

4. Sculpt & Weight Paint Tools Become Brushes

Since Grease Pencil started as a simple annotation tool back in 2.4, when features like sculpt and weight paint were added to Grease Pencil they were kind of hack to simulate that behavior rather than real tools.

With this refactor, Sculpt and Weight Paint are now real brushes. You can now link/append them just like regular brushes. They have been rewritten from scratch to improve response in complex scenes, especially when using multi-frame editing.

In Weight Paint, the painting process works the same as with meshes. The actual weight is blended with the brush weight.

5. Converting Old Files

At the beginning of the refactor analysis, there was one important design question to answer: 

Should we keep old hacks in order to support old files or should we remove them all and create a good foundation for the future?

The answer of the team was unanimous: “off with the hacks, let’s plan for a better future!”.

When you load a file, Blender tries its best to convert missing settings/features to their new equivalent (e.g. 2.7 Groups → 2.8 Collections). But sometimes there isn’t a one to one equivalent, especially if the feature has been replaced completely. In the new system, for example, the Light Effect modifier is replaced by light objects, this case needs to be handled manually.

There will be documentation available to handle the special cases where it’s impossible to automate conversion. These cases are very limited and usually can be done within a few minutes, this is a small inconvenience that will be worth it in exchange for the great improvements introduced, knowing we have a solid foundation to grow in the future.

Where to Find It?

The (massive) branch is currently under review on developer.blender.org. The review process can take from days to weeks, but it’s targeted to be part of Blender 2.83.

Thank You

This refactor is the result of months of hard work that we hope will lead to improve the artist’s workflow. Thanks to the community for their incredible support, showing what is possible to do when you put creativity first, pushing the boundaries of 2D in a 3D space.

This is just one more step (although an essential one!) of the many planned for the future, to keep the Grease Pencil project moving forward.

Finally, thanks to all members of Grease Pencil team for their hard work and especially to Daniel Martinez Lara, Matias Mendiola, Pablo Vázquez and to Clément Foucault for his amazing work that helped us so much in this insane refactor.

Antonio Vázquez
Grease Pencil project coordinator

Artwork credits:

57 comments
  1. I imagine you’re using something similar to Lumo: Illumination for Cel Animation for rim light. Or am I wrong?

    http://ivizlab.sfu.ca/arya/Papers/ACM/NPAR-02/Illumination%20for%20Cel%20Animation.pdf

    https://www.youtube.com/watch?v=BlU49dJhfcw

  2. Is there any intention to use a system for raster design? Vectors are powerful, but sometimes what you are looking for is really rasterization.

  3. I really wonder why you don’t use brushes through Boolean operation. Including rubber.

    I also think curves like NURBS could be used. In fact, it would be interesting to use them as a kind of visualization method. Do you want polygons (preferably using N-Gons)? Then select polygons, and the object will be transformed into polygons. Want NURBS curves? Then select curves, and the object will be transformed into curves again.

  4. Have you heard of Siggraph’s 2018 StrokeAggregator tool? It would be a very interesting tool for Grease Pencil.

    https://www.youtube.com/watch?v=yFJYwkS-hhI

  5. Any interest in using Eb Synth with the GP in the future?

    https://www.youtube.com/watch?v=0RLtHuu5jV4

  6. Do we can already use curves as strokes, besides only poly strokes?

  7. Very excited by all this. Thank you for all your great work.

  8. Does anyone know if there is any way in grease pencil gradient color mode to control where the transition from one color to another would be with a line that I draw so that I have control over where exactly I want the transition to be? So for example if I would have a square within a bigger square with a different color and want a gradient transition between the colors only on one of the sides of the smaller square.

    • I realized that my example was stupid so let’s say that the side of the smaller square where the gradient transition is going to be has a curved form or something where I want the transition to follow line.

  9. So.. I have been playing with Grease pencil for the last few days, finally got the concept of all the layers, material in it etc… I jumped to 2.83 beta which is just better in every aspect – lines, sensitive to light etc.

    Here are my conclusions.
    The tool has great potential – just applying noise modifier on a static image brings it to life. Draw a soldier and use couple of array modifiers and boom – you have an army.

    The ability to move layers within grease pencil and also animate them is genius.

    But there are also some problems that I consider blocker for most of my work – no shadows. if you use it it 3d space where everything is reacting to light it just looks like a sticker over everything.
    if you use array modifier and stack object one behind another then you need to make layers a 3d rather than 2d positioned in space – but by doing so you run into z-overlap issue, which effectively destroys the workflow – you need to manually adjust a gap between all strokes, and this is just painful and time consuming.

    Then there is an issue with placing it behind transparent things like glass – it just disappears in cycles. in workbench it just appears in front of everything.

    So for now looks like I will draw on ipad and export pngs.. just to avoid glitches and make good use of shadows.

    But I really really hope to see these issues fixed in future.. the concept so far is great!

    So short summary:
    – please let’s do the shadow things! like there is on png sequences.
    – if set to 3d space, z-overlap fix could be auto-appiled

  10. Oh, Wow! I just decided to do a project with grease pencil and I literally ran into all of the problems this article says will be fixed in the future! What a relief and I’m super excited to see it! Good job, friends!

  11. Looking forward to using it so much but as soon as I make a mark in Draw mode Blender crashes. On Mac OSX Date 2020-03-09 17:43 v 2.83 Alpha, Hash be2e41c397ba

  12. Whoa, just got it from experimental branch and the speed up in playback is mind blowing! Gonna try the rest now.
    Thank you so much to everybody who worked on this!

  13. Looks like the patch landed today, so it might turn up in tomorrow’s daily build, i suppose? Not sure if that’s how it works. Today’s build definitely doesn’t include the GP refactor yet cos’ “Light” will be removed from the effects and it’s still here.
    Btw, this refactor will be totally awesome!!

  14. Is there a way to test these features out in the 2.83 alpha?

  15. My grease pencil objects look like drawing planes with emission slot connected. Regardless of the environment light, they stay the same. Any type of the given lamp does not effect them at all. What am I doing wrong.

  16. Amazing work, thanks so much!
    I can imagine that the refactor means there is much more planned for grease pencil, which seems to have taken off in development terms at a remarkable rate.
    Keep it up, I can’t wait to switch from my current expensive and or lacklustre platform(s) over to blender for a full intergrated workflow from boards to effects and possibly even editing…. Why not ?
    If you can keep/make the UX as intuitive and straight forward as possible that would be awesome…. love your work.

  17. I’m a newcomer to the Blender world and I’m just loving this stuff… Thanks to the entire community.

  18. Looks awesome !! Thanks to all the team working on this !!

  19. i am 2d animator also
    and here blender is surprising me
    its a amaaaazing & excellent tool for 2D animation
    thanks Blender

  20. To artists, coders appear as magicians. We have no idea how your sorcery works, but we thank you for being the wizards that you are. This particular work of magic brings tears of joy to our eyes.

    You guys are amaaaaaaaazing! Thank you so much.

  21. Thanks, I can see myself ditching OpenCanvas for this for most drawing and sketching. :)

  22. I think the grease pencil tool can refer to the vpaint software. Although grease pencil is great! But it needs to be stronger! video link:https://youtu.be/Xk1_CugdytI

  23. Great to see palettes getting some love, and great job overall!

  24. Smooth strokes on Windows platform! Yesss! and 3d lighting!! Double yes! These developers are developing greatly!

  25. Two things irritate me all the time when I use GP.

    1. Many times I accidentally press spacebar and the Playhead starts to play in the timeline. If we can lock the Playhead in frame zero/ or in the current frame ( the frame we draw in ) , it will be much better.

    2. The same happens with the 3D viewport. I always work in an Orthographic top view angle. I don’t want to change that angle. But the perspective mode comes in between the mouse operations and disturbs my workflow. An option to lock and unlock a specific view angle will be very nice.

    • There’s a work around for this (3D viewport), you can set up a camera and lock the transform properties, then go to view on the side bar and turn on ‘Lock camera to view’ this should stop your mouse from accidentally changing the view.
      If ‘spacebar’ for play bugs you, you can assign a new shortcut for playing your timeline so that you don’t accidentally start playing your animation.

  26. This is incredible ^^

  27. What I most want is mypaint’s “Pick Stroke and Layer” (W key) feature. Could you please add it?

    • Yep, I was thinking the same as this is crazy useful in MyPaint. “w” is already assigned to toggle selection mode, but having this shortcut anywhere on the left side of the keyboard (for right handed users that is) would veeeery cool.

  28. Oh, gracias Antonio!!!, and of course thanks to all the Team.
    I can’t believe it’s above one year (and a month) I was attending the GP Training in Amsterdam with Matías and how the Tool has evolved since then. It’s awesome!
    Keep doing it! Thanks and more thanks!

  29. I can’t find most of the features described here in the recent 2.82 release. Are those features still exclusive to a specific branch? If that’s the case it would probably make sense to point that out in the blog post. Otherwise people interested in those features will be disappointed after installing 2.82.

    • Yeah, it would make sense to, for example, add a section titled “Where to find it”, with all those details… Oh, wait…

    • It still a seperate branch. In the where to find it section you can read about it. It is planned for 2.83.l

  30. Amazing work everyone!

  31. Thank you guys a ton .
    Grease pencil is a huge part of my life and work since 2.79.
    I already made videoclips, tutorials and now I’m using it in a live action film mixed with animation (using in pre production unfortunately, because painting is still a pain in GP) , but I feel that it no longer will be the case. So I will suggest on my next project.
    Thank you, thank you…. thank you ❤❤❤✌🏽

  32. Thank you guys a ton .
    Grease pencil is a huge part of my life and word since 2.90.
    I already made videoclips, tutorials and now I’m using it in a live action film mixed with animation (using in pre production unfortunately, because painting is still a pain in GP) , but I feel that it no longer will be the case. So I will suggest on my next project.
    Thank you, thank you…. thank you ❤❤❤✌🏽

  33. Still in dire need of a “blob brush” like Flash’s brush tool, and a hard eraser that “cuts” strokes (boolean) rather than just popping points and stroke segments!

    I love Grease Pencil but can’t clean up sketches without a boolean eraser, and it’s very difficult to paint without a brush tool. In all of these great process videos appearing lately I can see other animators are struggling with the same problems…

  34. Thank you so much for your hard work. When do you think it’s doable to release? GP is a very important part of my workflow. :D

  35. Very excited by all this. Thank you for all your great work.

  36. So is this present in Blender 2.82 or future?

  37. Fantastic!
    Can you please restrict the GP stroke to a “devoted” surface to facilitate drawing on different planes in space? So if i am drawing on a transparent plane 50′ ft away and then 100′ away, I can choose which surface to put my stroke on even if they overlap? .. sorry to ask here, this never gets answered in .
    Thank you

  38. TY so much for the hard work!

  39. Awesome job guys, this is the kind of news we like to hear and hopefully we’ll see it spread in all parts of Blender.

  40. I would like to thank all the GP’s developers… I’m able to provide for myself and survive as an artist due to blender and grease pencil.

  41. thank you guys, this looks amazing, keep doing the great work youre doing!

  42. Thank you Antonio! Thank you Clément!

In order to prevent spam, comments are closed 15 days after the post is published.
Feel free to continue the conversation on the forums.