Animate an erasing of grease pencil lines

I created an 2D animation that simulates real-time handwriting on a fake chalkboard background for a title card on one of my videos. I did all the writing with Grease Pencil (and a tablet), and I used a Build modifier to keyframe it all automatically (which is quite an awesome feature, I must add !).

How can I do the opposite, which is animate the subsequent erasing of those handwritten GP lines (with a invisible “brush” going back and forth across the background, like a real chalkboard) ? The Eraser tool does not seem to work with the Build modifier (unlike the Pen tool). It just deletes whatever I select instantly, without any kind of animation.

Thanks in advance,
Daniel.

Hey Daniel! I can suggest two options

The build modifier also has a transition option called “Fade”, which will cause the strokes to be drawn out as they were drawn in, but I assume this isn’t the erasing look your going for.

And so I would suggest:
-Create a new layer
-On it draw a stroke that represents what the eraser would theoretically erase. Use a very big brush size for this and full opacity. To go higher than a brush size of 500, you can click on the radius slider and type in a value (I went with 1000). Make sure to cover all the lettering.

-then, in the layers window, mask the text layer to the new layer.

-and lower the opacity of the new layer to 0.
-Then add a build modifier, have it influence only the new layer, and set the transition to fade. You can modify the frame count to change the speed, and give it a start delay to make sure it starts erasing out only after the letters are drawn in.

chalkerase.blend (2.0 MB)

I put this together quickly. Let me know if you have any questions/follow up :slight_smile:

1 Like

Hi !

First, thanks A LOT for the help. I didn’t know GP could handle masks and all… it was under my nose all this time ! I must say it’s quite a relief, because I was about to give up !

So I read your helpful tutorial and it worked perfectly, but I do have another question for you. Do you think it would be possible, using a similar method, to leave some of the chalk markings behind “at random”, as it would if I erased some chalk on a real chalkboard ? It nevers quite disappears at the first brushing usually, and there are always some “ghost” leftovers. It may be a lot to ask for the GP tool to do, but I’m curious. My hunch is that it would take Bezier curves instead of GP lines to make it happen.

That being said, that extra FX is not such a big deal either: I would gladly use the technique you just taught me as it is, and call it a day, it does the job splendidly. Many many thanks, once again, I’m so grateful that you solved that problem for me ! :smile:

If you happen to have any ideas for that “random erasing” idea of mine, please feel free to share your thoughts with me again. (My hunch is that it would take Bezier curves and a heck of a lot of nodes instead of GP lines to achieve such an effect.)

Good night,
Daniel.