Drawing 2D Animation in Blender 2.8

By Antonio Vazquez

Spring 2016, I was playing around with Blender 2.77 grease pencil when I noticed a bug in the stroke filling, so I decided try to fix it and contribute to the Blender project. Since then, I have done more than 1,100 commits for grease pencil as a volunteer and I think it’s time to write my first blog entry.

Grease pencil has something very special, because you need to keep the feeling of a 2D animation inside a 3D environment, integrating these two worlds smoothly. But this challenge makes more exciting to work in an area that can change how 2D animation will work in the future.

Christmas is around the corner and the Hero open movie directed by Daniel M. Lara is on production for several weeks already, working in a daily basis with the Grease Pencil branch.

Working in a real production is the best way to fine tune a software and find the real artistic requirements as well as to polish workflows. Therefore the Hero open movie is a perfect way to improve grease pencil.

During these weeks the Hero team has requested a lot of new features and adjustments to adapt grease pencil to the production workflow. Sometimes the changes were simple modifications of default values but other times the changes were bigger like the multi frame editing falloff.

Let’s review some of these new features and changes we have been working on. Thanks to Daniel Lara and Matias Mendiola for providing the demonstration videos of this article.

Multi frame editing falloff

When you are doing a 2D animation, it’s very common to need to redraw or touch several frames in order to get a smooth animation. You usually use the onion skinning available (I added support for more onion skinning modes too). The problem with onion skinning is that you can only “see” the animation, but you cannot edit the drawings.

The Hero team requested a way to change multiple frames at the same time, so I developed a new multi frame edition mode that allows changing several frames at the same time. You can select the frames affected using the Dopesheet. This multi frame edition saves a lot of time to animators.

After thinking about the problem, Daniel came with the idea of a falloff effect. A few tests later, and I implemented a way to calculate a smooth transition for sculpted frames. Now, if you move the stroke some units in the current frame, the previous and next selected frames will also be affected, based on an interpolation curve.

With this approach you can get smooth transitions. And by adjusting the interpolation curve, a slow in/out effect can be now easily achieved.

Modifiers

Modifiers are something we use everyday in 3D, but it’s something totally new in grease pencil.

The first step to implement this for grease pencil was to determine how to reuse the current infrastructure, while customizing it to the 2D requirements. I did an initial design and after a lot of trial and error, I got something that worked, but after some review by other developers, the initial design required some changes to keep better aligned with the general Blender modifiers design. Finally, with the help of Joshua (Leung), we got a better design and implementation.

This is the current list of the new modifiers.

Grease pencil has some special requirements that could be handled with modifiers. In some cases, however, the modifier was not modifying the stroke properties, as all 3D meshes modifiers do, but changing their look only.

To solve this “look only” modifiers, I designed the VFX modifiers, that work in a similar way to the Eevee viewport effects, affecting the look of the image of the grease pencil object. This is done using a full screen shader that works as a filter for the image. The VFX modifiers can be different for each object, so we can activate VFX blur for one object while keeping other objects sharp.

VFX Light

Since I started to develop for grease pencil, one of my first idea was to add some type of lighting support.

Lighting is a complex topic, especially when you are working with 2D elements in a 3D world. In 2D, the concepts of normals, faces and so on changes a little, so you need to find a way to mimic all these things in a 2D environment.

As real lighting was out of scope at this moment (it would require more work on Eevee which has its own priorities at the moment), I decided to implement some way of 2D lighting using a special VFX shader.

VFX can be applied to a single object and get cool effects, but this lighting has no relation with other objects. In the future, a full Eevee integration of grease pencil could be implemented, but for now, something is better than nothing.

The main problem in the development was how to manage the light position and how to convert this to the 2D world. Finally, I got an algorithm to calculate the distance to an “invisible” plane represented by the strokes and after some debugging I got a good result.

Build modifier

Build modifier is something all animators want. Here Joshua comes with a great implementation.

The build modifier allows to animate the drawing of the strokes in a similar fashion of the Build modifier for 3D objects.

Simplify modifier

The simplify process was something you think is necessary from the first stages of the design, but it was one that shows how important it is to have real talented artists working in the development process.

The initial idea of this modifier was to use the same algorithm that I’ve used in my grease pencil add-on last year. I was investigating and the most used one was the Ramer–Douglas–Peucker algorithm. This algorithm takes a line and simplify it keeping as much as possible of the original shape.

The first implementation of the modifier worked using the RDP algorithm, but after several weeks, the Hero team requested a more simple way of “cleaning” the drawings, so I had to implement a simple way to remove a point for every 2 points. Finally, I added a parameter to apply recursively the fixed simplify logic to speed up cleaning.

This new simplify fixed mode was something that as developer I have never thought, but for artists, it shows up as a natural requirement for production workflow.

Offset modifier

To be able to move some strokes of the same object in a free way was something that came to my mind thinking in how to move the eyebrows of a character without affecting other areas.

To solve tasks like this, the offset modifier is a great tool because you can filter by layer, pass index or vertex group, so you can apply any type of transformation to selected areas of the drawing or create cool effects as showed in the following video.

Update: Shader FX

Other changes

There were a lot of things that were modified during these past weeks that are not visible but have a lot of impact. Here, Joshua did a great job refactoring the code to use the new depsgraph and align some parts to be ready to merge with 2.8 branch. I know these are not fancy areas, but we must thanks Joshua for his excellent work again. It’s never too much to remind that he is the original developer of grease pencil in Blender, and none of this would be possible without his work.

When?

Blender 2.8 beta in August! If you compile Blender yourself, you can already try the new Grease Pencil, as it is currently being developed on separate branches (the main one being greasepencil-object).

We have done more things, and keep improving it every day. Stay tuned for more news!

Cheers,
Antonio

Grease Pencil Developers:
Antonio Vazquez (@antonioya_blend)
Joshua Leung (@aligorith)

Artists:
Daniel M. Lara (@_pepeland_)
Matias Mendiola (@mmendio)

50 comments 38,832 Views
  1. Very cool coding Antonio. Nice work.
    These will be some very nice tools for animators.

  2. Is it still possible to draw GP on mesh object surface instead of flat plane?
    It is important for workflow of some addons. Python API for GP will be updated?

    • Of course, you can draw GP strokes on mesh surface. From what I tested, there was absolutely no feature lost between 2.7x and 2.8x. Just features additions.
      The UI changed but you can still define Stroke Placement before drawing in GP branch.

  3. Looking really good thanks for all your efforts 🙂

  4. This is fantastic! Thank you for all your efforts. It looks real nice. I can’t wait to start using all this, although I’m just a hobbyist.

  5. Incredible, keep up the great work!! I’m really looking forward to multiframe editing 😮

    • And I hope that multiframe editing can be used for any kind of animations.

      As I was just yesterday looking to find a way to use the 3D manipulator tool to adjust bone rotations as the graph only gives the ability to multiframe adjustment in local rotations only.

  6. Yall should stop using this god awful inferior animation program

  7. Pretty much takes the cake for the worst interface

    • I think they’d welcome suggestions from insiders like you seem to be, it’s an open project, so please detail what aspects you don’t find ok and talk with the devs.

  8. Amazing!
    Thank you so much for this …..Great Work!!
    I made some Physics simulations experiments with GP drawings ofcourse -(after converting to curve-mesh -made parent or adding a Mesh-Circle adjusting to GP drawing and made Parent and so on and Used Rigid Body Tools add Active -Passive and also using Constrrains (Limit -Rotation,Location,Scale X,Y,Z axes) and it works really good! bud with some problems because the PS is 3d!
    Maybe Another and Better faster solution could be if possible to integrate Box 2d Physics into Blender 3d and using it for Grease Pencil Drawings !!??
    http://box2d.org/
    also the possibility to bind a GP drawing into Blenders Particle system and using a mesh as emiter spawning the GP drawing

  9. That offset modifier volume effect was just too cool, love all the work but that had me scratching my head for a minute til I figured out what you are doing 😀 All lovely things to see developing, thank you for all that you are doing!

  10. In lieu of merging with master, please release a build of the greasepencil-object branch!

  11. Really great work man. Seriously you guys are amazing. Keep on it because you’re changing the future.
    I got some notes for you as always it’s kinda hard to keep track of everything that I have sent you kkk.

    Your such an inspiration I can’t wait to get my hands on it and play with it like everyone else.

    Your AMAAAAAAAAAAAAAZING!

  12. Wooooooooooooo very very nice !
    Where can I download this version to test?

  13. Would be nice to have a way to create more geometric drawings in order to create flat characters. I would pay for that. 🙂
    What do I need to do?

  14. Very nice!

    Here is what I need in the rest:
    * layer blend mode (imitation of multiple exposure in cel animation)
    * light glow modifier (imitation of transmitted light in cel animation *)

    * example (Japanese): http://notes.futonweb.net/post/95638163333/anime-optical-test

    • more clarification:
      layer blend mode -> linear dodge blend with color multiplier
      light glow modifier -> same as Fog Glow in compositor nodes (COM_GlareFogGlowOperation.cpp).

  15. How about mixing other 2D objects, including images and videos with 3D? This is useful for 2D video creators (which trending on YouTube) like Kurzgesagt and makes making complex transition easier, without using another apps. But, there are problems such as trimming difficulty, audio arrangement complexity and more. I hope you can discuss this with me and implement this feature if fine.

    Thanks.

  16. It may only be me, but the Community Blender website doesn’t seem to be listing the latest code.blender news items

  17. I was animating in adobe animate for 2D. But this update wil let me switch back to blender. I use it for 3D and from now on for 2D to. Nice update good coding Antonio! 🙂

  18. Thank you for sharing on this amazing work. I am really looking forward to 2.8.

  19. how do I can get the Blender 2.8 with Grease Pencil and all functionalities mentioned here? I download but is different.

    • The code is not merged in 2.8 yet, so you must download the source code and compile yourself.

      • Where can we find the source code to do that? I REALLY what to try this out 🙂

  20. 1. Could I configure blender UI to be grease pencil format only, like I click blender and it opens ready to use in grease pencil??

    2. These updates seeme pretty awesome for character creation and character development, but what about backgrounds and landscapes?? Can depth an distance be automatically be determined in our background layers. And could the light modifier be locked on any point of the background, in case we wanted to have the passing light effect as a character walks past a light pole for example. I’d love to see how we can make the best of 3d in our 2d worlds.

    3. When! I can’t take it!! This is so amazing!!! Thanks you guys!!!!!

    • The idea is to have a template for 2D animation with a full customize interface.

  21. Woooooaaaaaaaaa!!!!
    Super impressed!! Thank you thank you for making this!
    The multi-frame editing falloff especially was jaw-dropping!
    I’m constantly surprised at the new 2d animation tools you guys come up with!
    Loofing forward to the hero short and also using the new greasepencil features!

  22. I love it!!! Thanks a lot for sharing it and the job behind.

  23. I’m really digging all the modifiers now interacting with the Grease Pencil! I’m sharing this right now with my animation group !

    One question though: does the modifier affects all the frames in the animation or simply one specific frame?

    • Depend of modifier, it can be filtered by Layer, Vertex Group and Pass Index. To make by frame, you can animate the visibility option and create any effect you want.

      • What is the trick to get the modifiers panel to show? I’m not seeing them.

  24. In 2.79 Grease Pencil could easily draw a stroke on a 3D object. You could even parent a gp stroke to a bone. Problem was that when you added gp strokes on a mesh (for example a stroke on hair (polymesh) of a character) and the mesh had to bend. The gp stroke would not follow the mesh. Will this be fixed by gp in 2.8? Gp strokes would be an object, so I could in theory apply a shrinkwrapmodifier.

  25. Great work as usual! Would the Eevee lighting integration allow for rim-lighting / edge-only shading? I could see that as being a very useful alternative to the radial point light.

  26. The interface UI definitely needs to get simpler and more standardized like TVPaint or AnimateCC, but wow…once that hurdle is passed this has the potential to be the biggest disrupt in Anim-Tech since Lucas sold Pixar to Steve Jobs. Thank you so, so, so much for doing this.

  27. Hi Antonio, thank you for the amazing job you are doing. I have two questions:

    1) Will it be possible to export the new Grease Pencil Blender Object in .obj, .fbx etc?
    2) I downlaoded the Blender 2.8 beta but I cannot find the new Grease Pencil tools — when will it be possible to try it out ?

    Thank you so much once again.

  28. Wonderful. Amazing. Very, very cool.

  29. Hey everybody!
    First allow me to thank every one for this huge thing that _as an artist_ I can’t but value it and expect a very amazing future for it in the 2d industry.

    Next- I’ve been using blender 2.79 grease pencil in my day job for a while now, and based on this article here are my suggestions:

    *stroke grouping would be a life saver, and my approach for it would be almost exactly the same way around blender except for when you right click on a group all of it would be selected and handled as an object, and if you want to edit a group you can simply press D+G to get into it and all other objects would be faded.

    * A shortcut for flipping the canvas is a must too, I don’t know how can you work around this but its very important for an artist.
    *instead of having to interpolate after blocking, why not a simple check box to do it for every selected keyframe, and when you are not satisfied with the results you can simply uncheck that box.

    * this feature would be smart for an animator to keep his timeline\dope sheet organized. the ability to highlight a bunch of keyframes and change their color, not the color of the keyframes themselves but the background behind them.

    * in the grease pencil layers section, grouping layers in folders would be great,

    * I hope that there is a way to make a sequence out of multiple grease pencil data-blocks!
    *I hope that I can simply choose a premade color palate from any grease pencil data block

    since grease pencil is indeed a vector based tool, why don’t you consider making libraries for cliparts (which can use the groups suggestion I made above) this way we can add say a tree to a list in which we can see it as a thumbnail and reuse it later in our project.

    * why can’t I extrude in grease pencil edit mode!

    * I know this may not be the way grease pencil is meant to be but why not adding a pen tool.
    * last but not least, if there is a check box beneath the layers section, if active you can only edit (sculpt) highlighted layer\s, if not, then it will act the same way it is now!

  30. ps:
    blending modes in layers
    layer masks!
    clipping masks
    remove doubles in strokes
    hide strokes not the whole layer

    I don’t know if I’m going too far with this but here is an idea anyways:
    why not making a grease pencil mode in which there is three sub-modes : object mode, edit mode and sculpt mode, In grease pencil’s object mode you can select a whole object ( linked lines) and move it at once without having to deal with all the lines and points, edit mode is to control the density of lines and to have extra control on everything, sculpt mode is sculpt mode!

    one more idea:
    when interpolating from a shape to another, sometimes things don’t go as we want them to, If you can add markers and link them to points in both keyframes so the interpolating is guaranteed as we like it, it will give us a new level of control.

  31. OOOOkay!
    After putting my hands on 2.8 grease pencil build! OMG you guys nailed it!
    You’ve put an amazing effort making grease pencil integrated in blender, It feels very native and every thing makes sense.
    some of my suggestions don’t apply any more, others do.

    I was happy to see vertex group menu in grease pencil, it would be amazing if you make shape keys for making more than one shape into the same layer and call it when need it. this can be useful for things like lip syncing and more.

    cheers

  32. Will we be able to deform GP drawings with an Armature?
    Using even only envelope skinning would be great, and a game changer.

  33. layering needs little more work for 2d animators, like we do in moho and toon boom harmony also the color fill needs work, but i didn’t use the 2.8 these suggestions are based on 2.79, hoping a lot from 2.8 as i want to completely switch myself to blender from moho and toon boon harmony.

  34. Tried the build on Graphicall, so much potential. Some requests from a 2D animator:

    Deformation, using an armature or curves.
    Mirror modifier
    Masking (one layer can mask another layer)

  35. I would like to see a layer switch to be able to swap drawings of hands (or mouths for lipsync). Moho does this very well and it’s a huge time saver when scrubbing the timeline to do lipsync. It is also common in Flash and Toon Boom. I can’t see myself doing much 2D animation in Blender without this function.

  36. I do interpolate sequence a lot and it always resize the drawing.
    is there a way to prevent resizing on grease pencil sequence interpolation?

  37. Extremely excited for this update but i have some questions.

    -Can the new grease pencil be rendered with along with a 3D environment to combine 2D cell animation and 3D animation into one? As of 2.79 it can only be rendered through openGL, so will there be an option to make it render along with the 3D ray tracing render?

    -Will there be fixes to the current stroke thickness limitations, like how the thickness can only go up to 10 and how the thickness doesn’t zoom as you would expect and instead stays the same size relative to the screen rather than the environment as you zoom in and out.

    -Will there be implementation of different stroke corners and caps to put rounded corners and caps on stroke points

  38. AWESOMENESS OVERLOAD…

    MIND BLOWN !!!!!!!!!!!!!!

  39. Will all the grease pencil updates be active in the beta or will we have to wait for October to try these out? also will there be any demos from the team working on the hero project or other similar projects to detail all the changes made to the tool? Very interested in combining 2d animations with these 3d environments. I have been trying to animate a project but all my test footage looks very flat. The hero video inspired me to add my 3d models into my animations but it is very slow would appreciate seeing a professional workflow with the new tools.

  1. Leave a Reply

    Your email address will not be published. Required fields are marked *

     

share this story on