Another way of getting one’s balls to be in good shape, is to use more points, but not too many!
Another feature that I’ve discovered in Pencil2D is you can highlight a single frame, as shown above. This makes the copying process of frames much easier.
I’ve used this to highlight the extreem, where the ball hits the surface and squashes before rebounding.
This ball is of course, perfectly elastic, not possible in reality because no actions perfectly preserve energy!
There’s a trade off between complexity of curve code and thus the space occupied by the XML code and the smoothness of the resulting curve.
But since we have 1Mb of space defined in Pencil2D, as standard, then 8.9 Kb total for the code in 2_Ball.pclx. This is a manageable file size.
The only constraint of having more plot points is that when the shape changes, squashing and stretching excepted, the changing of shape effort is directly proportional to the number of points.
Currently is is relatively easy to add points, but more difficult to remove them.
By drawing the initial drawn shapes small, as a proportion of the drawing area, restricts the number of points.
When you compare the smoothness of the animation of the .GIF file and using the play function and using the play function Within Pencil2D.
The .GIF being played using say a browser is much smoother.
What happens with the play function is that just after the bounce, with the ball squashing, for a tiny time interval both this fame and the next frame with the ball travelling upwards are displayed at the same time.
When the Ball-2.pclx is output as the .GIF file, the file consists of a series of 10 frames stored in sequence. When played back there is no processing being carried out, the frames are being displayed in sequence.
When the play function within Pencil2D is running, there are many background processes, such as keyboard scanning, reading the mouse position both to detect commands. There are also other processes of handling external files and other packages running in the background.
The best way to check the flowcof an animation is to export it to a .GIF or .Mp4 file and use a browser or external video player to play these files.
Exporting animations with sounds as an .Mp4 files is the only way to check sound synchronisation with the drawings.
The ball has no line around the shape, as would exist in a traditional hand drawn animation.
This is a stylistic choice, the line is coloured with a pink colour with an Alpha Value of zero. This means that it is invisible against the background colour.
You need a line to contain the colour. I usually call this colour in the pallet ‘Invisible’.
When defining the colour I choose a pink colour from the possible pallet, because I don’t often use pinks.