Animate drawings with Pencil2D
Run It
Pencil2D always displays the onion skins of the last or next five images. To change this, go to Edit | Preferences and select Tools. To define how many previous images Pencil2D displays, add a number for Number of previous onion frames shown; similarly you can define the Number of next onion frames shown. (Pencil2D automatically extends the timeline up to 10,000 frames.)
You should now have created several frames where the ball slowly drops from the top to the bottom. To view the animation, select the first frame. Then press Ctrl+Enter or click the right arrow triangle in the timeline. Depending on how many images you have created, the animation may be over fairly quickly. This changes if you enable the curved arrow in the timeline or select Animation | Repeat. During playback, Pencil2D will repeat the animation until you press the corresponding button or Ctrl+Enter to stop it again.
The playback speed can be controlled using the fps input box on the timeline's right side. By default, the animation runs at 12 frames per second (fps). You can experiment with lower or higher values for your ball. Then make sure that your last frame is visible on the drawing area.
Transparency Report
Many scenes consist of several objects (e.g., the ball could fall on a wall). Pencil2D supports layers so that you do not have to repaint the background in each single image. Layers work like slides, which the tool simply superimposes on top of each other.
To create a new layer for the wall, choose Layer | New Grid Layer and assign a name such as Background. Pencil2D now adds a new line to the timeline. Click the Background layer. Everything you paint from now on is assigned to this layer.
Use the Polyline tool to draw a line under the ball from left to right. If you play the animation now, the ball drops onto the line. To include a photo of a real wall, use File | Import | Image to load an image on the currently active layer.
In the timeline, you will find several small boxes, each representing a single image. Pencil2D displays each of them until a new frame follows in the line. Try this out by selecting the middle of the animation with the . and , keys and then creating a new frame with F7. Paint a yellow sun with the brush. The sun will appear in the second part of your animation (Figure 7).

To delete a single frame, select the corresponding layer on the timeline, then select the corresponding frame, and select Animation | Remove Frame. Unlike clicking on the trash can icon, Pencil2D deletes the entire image rather than just clearing the drawing area.
Stackable
Pencil2D superimposes the drawings in the layers in the order in which they appear in the timeline. In Figure 7, all drawings in the Background layer would appear above the ball. You can change the order of the layers by dragging the name of a layer up or down to the desired position. During fine-tuning in particular, it can sometimes help to hide a layer. Simply click on the dot in front of a timeline name.
Thus far in my example, I've worked with bitmap images (i.e., with pixels). Pencil2D also has vector layers. One vector layer is automatically created by Pencil2D; others can be created by selecting Layer | New vector layer. These layers work like the image layers, but you can only draw lines and geometric shapes. In return, all objects can be moved and distorted individually later. To do this, click on the respective line with the Move tool. The object can be scaled using the handles that then appear and moved to another position using drag and drop (Figure 8).
If you want to share your animation, create a video by selecting File | Export. The Movie sub-item saves the animation as an MP4 file; alternatively, Pencil2D supports exporting to an animated GIF.
« Previous 1 2 3 Next »
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you've found an article to be beneficial.
News
-
The GNU Project Celebrates Its 40th Birthday
September 27 marks the 40th anniversary of the GNU Project, and it was celebrated with a hacker meeting in Biel/Bienne, Switzerland.
-
Linux Kernel Reducing Long-Term Support
LTS support for the Linux kernel is about to undergo some serious changes that will have a considerable impact on the future.
-
Fedora 39 Beta Now Available for Testing
For fans and users of Fedora Linux, the first beta of release 39 is now available, which is a minor upgrade but does include GNOME 45.
-
Fedora Linux 40 to Drop X11 for KDE Plasma
When Fedora 40 arrives in 2024, there will be a few big changes coming, especially for the KDE Plasma option.
-
Real-Time Ubuntu Available in AWS Marketplace
Anyone looking for a Linux distribution for real-time processing could do a whole lot worse than Real-Time Ubuntu.
-
KSMBD Finally Reaches a Stable State
For those who've been looking forward to the first release of KSMBD, after two years it's no longer considered experimental.
-
Nitrux 3.0.0 Has Been Released
The latest version of Nitrux brings plenty of innovation and fresh apps to the table.
-
Linux From Scratch 12.0 Now Available
If you're looking to roll your own Linux distribution, the latest version of Linux From Scratch is now available with plenty of updates.
-
Linux Kernel 6.5 Has Been Released
The newest Linux kernel, version 6.5, now includes initial support for two very exciting features.
-
UbuntuDDE 23.04 Now Available
A new version of the UbuntuDDE remix has finally arrived with all the updates from the Deepin desktop and everything that comes with the Ubuntu 23.04 base.