×
Menu
Index

1.9. Sprites

 
Sprites are images that can be moved around, scaled or rotated in the same way as a figure. A sprite is actually a type of figure segment and so lines, circles or other sprites can be connected to it by editing it in the figure builder. A sprite image can be created in a graphics application or downloaded from the web.
 
  A sprite can be loaded into the frame editing area by clicking 'Load Sprite Image' in the File menu. Image formats that are supported are Bitmap, GIF and PNG.
 
Using large sprite images can cause lag when moving figures.
 
 

Transparency

Sprite images support transparency in PNG and GIF images. If transparency is found in the image then it will be used. This makes it possible for parts of the image to be semi transparent and also can make the edges of the sprite appear smoother. PNG images with transparency can be created in graphics software such as SketchPad or Gimp.
 
The glass is an example of a semi-transparent Sprite loaded from a PNG file
 
If a Bitmap image is loaded, or transparency is not found in a PNG or GIF image, then sprites are displayed with a transparent background determined from the colour of the bottom-left pixel of the sprite image. If you don't want any transparency then simply set the bottom left pixel to any colour that doesn't appear in the rest of the sprite image or add a vertical or horizontal line of that colour to the left or bottom of the image.
 
                 
Left: How a Bitmap image looks in Paint. Right: How it looks in Pivot.
The problem: The bottom left pixel is black, so all black pixels are transparent and everything else is opaque.
 
               
Left: How a Bitmap image looks in Paint. Right: How it looks in Pivot.
The solution: A line has been added below the feet so that the bottom left pixel matches the background.
The background has been changed from white to green to avoid the eyes becoming transparent.
 
 

Joining Sprites

The figure builder makes it possible to join sprites together into a single figure, which can be saved as a single STK file.
 

 

It is also possible to join sprites together using the join feature in the main animation window to create realistic stick-men or other objects that can be moved in the same way as a figure. Note that this method was common in previous versions of Pivot but is more complex compared to creating multi-sprite figures in the figure builder and the resulting figure cannot be saved as a single STK file. The method is demonstrated in the following video.
 
 
The first step for doing this is to create your sprite images and load them into the frame editing area.
 
The second step is to reposition the handles so that the sprite joints are at the right places.
  This can be done by clicking the edit button to open the sprite in the figure builder and adding new lines to the locations of the new joints/handles. You can then set these lines to zero thickness and set all but one to static so that only the two new handles are seen. Then use the origin tool to move the origin point to one of the new handles.