The RISC User Morpher

by Colin Cassidy


Anybody who has seen Terminator 2 will have been impressed by the stunning computer-generated special effects. Perhaps the most memorable is the ability of the liquid metal android to change into any character or object with which he comes into contact - a process which in computer terms is called morphing. A simpler type of morphing takes a 2 dimensional image and distorts it until it looks like something else. One television advert, for example, shows a snail metamorphosing into a frog! Morph will enable you to create similar animations yourself.

This application accompanies the article on morphing in RISC User 7:2. As this help file only explains how to use the application, you might like to read the article to find out how morphing itself works.

CREATING A SUITABLE SPRITE FILE
To create a sprite file suitable for Morph, firstly ensure that both sprites you want to use are the same size and in the same mode. You can use ChangeFSI to do this. Then open a Sprite file window by clicking on the Paint icon on the icon bar. You can close the Create new sprite window as you won't be using it. Now drag your edited sprites into the Sprite file window, and save them by clicking Menu over this window and choosing the Save option. You can then drag this new sprite file onto the Morph icon on the icon bar.

USING MORPH
Although morphing might sound very complex, Morph is actually very easy to use. To jump in at the deep end, though, double-click on Morph to install it on the icon bar, and then drag a sprite file containing two sprites, the same size and in the same mode, onto the Morph icon on the icon bar. These sprites will then appear in seperate windows on the Desktop.

You can now start to place control points on the sprites. Click Select over the first image, and you will see a point appear at that position in both windows. Clicking Select again will draw a line between the first point and the new point. Clicking with Adjust on any of the points in either of the windows will highlight the point, and the line it controls, in that window, and the corresponding point in the other window. For example, if you create a point over an eye in the first window, you can then drag, using Adjust, the corresponding point in the second window, perhaps moving it onto a different facial feature such as a nose or ear.

HIGHLIGHTING AREAS
You can 'cut out' a specific area of the first sprite, to morph into a different object in the second sprite, by clicking Select at key points around the area. This will create a set if lines that surround the area, and you can then move the points and lines in the second sprite by dragging them with Adjust. When you have finished marking an area, hold down the Ctrl key and press Adjust to tell Morph that you want to start a new set of paths.

SAVING THE CONTROL POINTS
Once you have finished placing the control points, you can save a CPoint file by clicking Menu over the window and choosing the Save points option. You will then be able to edit them at a later stage, without having to recreate them from scratch.

CREATING THE ANIMATION
Once a set of control points has been placed over the sprites, Morph is ready to create an animation. To do this, use the Save animation option from the main menu to designate a place for the animation to be stored (ideally on a hard disc). It is necessary to do this before any processing takes place because, in an attempt to conserve memory, Morph saves each frame as soon as it has been created. Thus make sure that you have enough free space on your disc or hard drive to hold the entire animation.

Next, open the Statistics and Create Animation windows, again from the main menu. The former give an estimation for the size of the completed animation, and the latter enables the length of the animation to be altered. Generally speaking, you should opt for as many frames as you are likely to be able to squeeze into memory or onto disc, but remember that a 1Mb computer may only have 600K to 700K of free memory in the Desktop. The Create Animation window also gives the option of using delta compression on the animation. Unfortunately, delta compression (which stores the differences between frames) does not work well with morphing, and so a compression of only 10% to 20% can be obtained. Against this, the extra processing required considerably slows the speed of the playback. 

To create the animation, in the Create Animation window simply select how many frames you want the animation to consist of, and whether you want the output compressed, and then click on the Start button. Morph will multi-task as it creates each frame, and you have the option to either pause or abort the process at any stage.

The time Morph takes to create an animation depends on several factors, including the size of the sprites, the number of control points and the number of frames. Simple animations should take around 5 to 10 minutes to generate, while very complex animations could take well over an hour.

PLAYING AN ANIMATION
Once an animation has been created, it can be loaded (memory permitting) by double-clicking on its icon. The Viewer window is multi-tasking, but only really runs smoothly in the sprites' native screen mode. Clicking Menu over the Viewer window allows you to change the playback speed of the animation, and to alter the the amount of time the program waits before playing the animation again.

Alternatively, there is an option for a single-tasking display (which automatically selects the right mode). When single-tasking, the numeric keypad can be used to alter the playback speed: 9 is flat-out while 0 will stop the display altogether. You can then single-step through the animation by pressing any key other than Space. Pressing Space or any of the mouse buttons will return you to the Desktop. 


 Copyright RISC User 1993
