Winmorph User's Guide

What is morphing ?

Getting started.

Creating a morph.

Morphing.

Changing the resolution.

Morphing testpictures.

Morphing a whole animation.

Warping.

Displaying the animation.

FLI

GL

MPEG

AVI

Configuring WinMorph.

The size of the points.

Changing the colors.

About WinMorph.

Registering.

Disclaimer.

Bugs.(?!?)


Creating a morph.

Loading an existing morph.

Creating a new morph.

Editing a morph.

EditWindows.

Loading a picture.

Selecting a frame to be edited.

Configuring the windows.

Stretching picture to the window.

Viewmap.

Editing points.

Adding a new point.

Selecting a point.

Moving a point.

Deleting a point.

Editing triangles.

Adding a new triangle.

Moving a triangle.

Deleting a triangle.

Playing the morph.

Generating frames by interpolation.

Saving the morph.


What is morphing ?

Morphing means tranforming one form into another. When this form is a three-dimensional polygonmesh, like the T2000 in the film "Terminator 2", the morphing is referred as 3d-morphing. Another type of morphing, which you have seen for instance in Michael Jackson's musicvideo "Black or white", is done with pictures. Because pictures have only two dimensions, this kind of morphing is called 2d-morphing. 2d-morphing has become very popular in commercials.

Despite 3d-morphing has one dimension more compared to 2d-morphing, they both function similarly. In both of them, every point in the starting form's surface should have a corresponding point in the final form's surface and vice versa. In another words there should be a bijection between the surfaces of the two forms.

Usually the bijection is achieved by dividing the forms into polygons. Each polygon then has a relation to one and only one polygon of the other form. This kind of relation requires that the starting form equals the final form in number of polygons. Eachpolygon of the starting form is then gradually tranformed into its related polygon of the final form. This transformation changes both the shape and the color of the polygon.

How does WinMorph work ?

WinMorph creates only 2d-morphings. In morphing it uses triangles to approximate a correspondance between the starting picture and the final picture. Triangles are easier to handle than n-sided polygons and I don't know if it's even possibly to morph with n-sided polygons.

Winmorph also does image warping. In warping the pictures don't get mixed, only the first picture is used. The program still requires you to load the final picture, sorry about that.


Getting started.

You should now be in Windows to be able to run WinMorph while reading this document.

- Click on the starting window and select on the menu File|Open Picture

- Load the file girl.bmp

- Click on the final window and select File|Open Picture

- Load the file cheeta.bmp

- Click on the result window and select File|Open Picture

- Load the morphfile Girlchta.mrf

Now the morphfile is loaded and it's shown in both starting and ending windows.

- Click on ToolBoxes 'single frame'-editbox and type number 7.

The 'single frame'-editbox is the clear space between 	the '<'- and '>'- buttons.

- Press the 'Morph'-button

Now WinMorph starts the morphing. You can see the results in Result-

window. You can size and move the window if you want too see it better.

With 320x200 picturesize the morphing takes about 17s in my 386/33.

You can stop the morphing with ToolBoxes Stop-command.

As you can see, the Morph-command in ToolBox morphs only single frames.

If you want to morph all the frames , you should do the following:

- Select Animator|Morph on the menu and press Ok.

Now the program starts morphing the whole animation.The morphing takes

about five minutes, so be patient and watch the girl slowly turning into a tiger.

- Go to Dos

- Go into directory where you have your pictures.

You can do this by simply going into root directory and typing

DIR /s 00000000.tga

This shows where you have your pictures and then just CD there

- To see the animation, you need aaplay.exe and dta.exe.

Aaplay is AutoDesks PD-program for viewing the FLI-animatiofiles.

Dta means Dave's Targa Animation and it's used for converting

the targa picturefiles into FLI-animationfile. It's shareware.

(You should use version 1.6 because version 1.8 leaves the frames

uncompressed and my fli-viewers didn't like it. )

- type

DTA /FFgirlchta.fli 00*.tga

This assumes that dta.exe is somewhere on your directory path.

You should try to look for a switch to force DTA to compress the files.

It takes a while to map the colors and create the animation.

- now type AAPLAY GIRLCHTA.FLI and get impressed

- You can now delete the TGA-files, they are no longer needed.


Creating a morph.


Loading an existing morph.

You can load an existing morph by selecting a menucommand File|Open. In the lower left corner there is a listbox, which shows the type of the file to be loaded. If the type is a bitmapfile, you should change it to morphfile.

Creating a new morph.

You can create a new morph by selecting File|New. Winmorph then asks you how many frames you want in your morph. Usually adequate number of frames is between 15 and 30.


EditWindows.

Loading a picture.

To load a picture to an active editing window, select File|Open Picture from the menu.

 Selecting a frame to be edited.

You can edit only one frame at a time in a window. The number of the selected frame is shown in the windowtitle of the editwindow. The framenumber can be decreased or increased with ToolBoxes '<' - and '>' - commands. You can also set the framenumber directly by typing the it in ToolBoxes 'single frame'- editbox and then pressing the 'Set Frame'- button.

 Configuring the windows.

All commands for configuring the windows can be found in Config|Window. The commands have an effect only on the active window.

Stretching picture to the window.

WinMorph can show pictures in two modes. The picture can be stretched into window or it can be shown with the  scrollers.

When WinMorph is in Stretch To Window-mode, picture is resized every time the size of the window is changed. If you want to zoom in the picture, simply drag the window bigger. No scrollers are needed because the whole picture is visible

If stretch-mode is not selected Winmorph uses zooming resolution set in Config|Window as a viewing resolution. If the resolution is larger than the window size, the window uses scrollers.

Viewmap.

WinMorph uses additional bitmap,viewmap, to store the zoomed picture. This is done to speed up the redrawing of the window. The zooming and conversion to screen has to be done only when the viewing size is changed. If you have problems with the shortage of free memory, you can prevent WinMorph from using the viewmaps.

WinMorph uses dithering when it has to show truecolor pictures in 256-color screens. The resulting picture has a uniform palette. If you are viewing truecolor bitmaps in 256-color screen the rendering can take a while. Still it is faster than the original Windows function.


Editing points.

Points connect triangles to each other.

Adding a new point.

If you push the right mousebutton and there aren't any points under the pointer, a new one is created. The point is placed in the same place in all frames.

Selecting a point.

To select a point you have to place the pointer on it and press the left mousebutton.

Moving a point.

To move a point you simply drag it to it's new place.

Deleting a point.

Select the point and press 'Delete'-key.


Editing triangles.

The triangles don't have to cover the whole picture.Where there are holes, WinMorph just leaves them as is or copies the background into them, if the backgroundpicture is loaded.

Adding a new triangle.

Press the right mousebutton on a point you want to be in the triangle. The point gets crosschecked. Do the same to other two points and you get a triangle. To remove a checkmark from a point just press the right mousebutton on it again.

Moving a triangle.

To move a triangle you have to move it's points.

Deleting a triangle.

To delete a triangle, select one of it's points and press 'Delete'.


Playing the morph.

By playing the morph you can check if there are any errors in the movement of the points. The playing shows a sequence of frames like in an animation.The start and end frames are entered in ToolBoxes 'To'- and 'From'- editboxes. Pressing the 'Stop'-button stops the playing.

Generating frames by interpolation.

Easiest way to design a morph is by designing the first and the last frame and generating all the other frames between them by interpolating. Interpolating is done by entering the two frames to be interpolated by in the ToolBoxes 'To'- and 'From'- editboxes. Pushing the 'Interpolate'-button starts the interpolation.

WinMorph allows you to design every frame individually. This is useful feature when the path of a point is not straight. It increses the workload but the designing becomes more flexible. You can move the point in a middleframe and then interpolate from the first to the middleframe and from the middleframe to the last frame.


Saving the morph.

To save a morph select the menucommand File|Save.


Morphing.

Changing the resolution.

If you want to change the resolution of the animation, select the menucommand Animator|Set Resolution. When you have changed the resolution, you should render again all earlier frames, because they don't have the same resolution.

Morphing testpictures.

When you want to test your morph, you can morph only selected frames. In ToolBox, there's is a 'Morph'-button, which renders only the frame entered in 'single frame'- editbox. If you want to morph a series of frames, use the Animator|Morph From..To-coomand in the menu. The morphing can be stopped by pushing the 'Stop'-button.

Morphing a whole animation.

Having finished designing the morph, you can start morphing all the frames. Select Animator|Morph From..To from the menu. You can stop the morphing by pressing the 'Stop'-button.

Warping.

Warping uses only starting picture instead of mixing two pictures. In other ways it's similar to morphing. I added this feature to WinMorphing because it was so easy to implement. All commands for warping have a corresponding command in morphing, so in order  to do warping look instructions for morphing and select allways 'Warp' instead of 'Morph'.


Displaying the animation.

WinMorph only generates a serie of truecolor TGA-files. You have to use some other program to convert them to one of the animationfiletypes. You will also need a program to view the resulting file. In the following I have listed some animation fileformats. Feel free to use any of them.

FLI

This filetype is used by Autodesk Animator and it's the most common one. Autodesk provides a public domain FLI-viewer Aaplay. It can handle only 320x200 animations. There's also a Windows-version called Waaplay capable of playing bigger FLIs.

There's a shareware FLI-maker named DTA. DTA comes from Dave's Targa Animation. Version 1.6 converted my animations without flaws but the new v1.8 leaves the pictures uncompressed if there is no gain in compressing. However, it seems that the resulting FLIs are not compatible with AutoDesks FLIs.

GL

Sorry, I don't have nothing to say about this. Just that this format exists.

MPEG

This fileformat uses JPEG-compression to squeeze the pictures a little smaller. I don't think there is any public domain MPEG-converters but Xing has a PD- viewer for Windows. Xing has also a MPEG-converter, but it isn't PD.

AVI

This animationformat is used by Video for Windows.


Configuring WinMorph.

In the following I have listed the possibilities to configure WinMorph the way you like it.

The size of the points.

You can change the pointsize by selecting Config|Point Size. Useful pointsize is somewhere between 0 and 5.

Changing the colors.

You can change the colors of the points,triangles and selected points. All commands for changing the colors are in the menu under Config. This command is useful when your points vanish in the picture because they have the same color.


About WinMorph.

Registering.

Winmorph v1.0 is shareware. You are allowed to copy it, distribute it, upload it to BBSs, and use it. You may not, however change or alter the files in any way.

If you find this program useful please 20 US$ or 100 Fm to address shown below. Don't forget to inform me who you are.

Marko Marjamaa

Yliopistokatu 16 / 107

90570 Oulu

Finland

If you want to contact me via Internet, my Email address is

mama@phoenix.oulu.fi.

The archive should contain the following files:

WINMORPH.EXE

BC30RTL.DLL	( DLLs for Borlands OWL-window library)

OWL31.DLL

TCLASS31.DLL

GIRL.BMP	(Examples)

CHEETA.BMP

GIRLCHTA.MRF

VANISH.MRF

VANISH2.MRF

If any of these files are missing, then you have an incomplete copy of WinMorph 1.0 and should contact the author to receieve a full copy.

Disclaimer.

WinMorph v1.0 is supplied as is.  The author disclaims all warranties, expressed or implied, including, without limitation, the warranties of merchantability and of fitness for any purpose. The author assumes no liability for damages, direct or consequential, which may result from the use of WinMorph v1.0


Bugs.(?!?)

- When you have entered a number in ToolBoxes editboxes, it is the active child. Still according to it's titlebar it isn't active. If you try to zoom the editwindow, the message goes to ToolBox and nothing happens. In fact, all menucommands go via ToolBox.

- If the result window isn't using a stretch-mode, part of the picture is not visible and you're morphing, the invisible part of the picture isn't rendered. There's nothing wrong with the morphed picture, you just can't see all of it. To repaint the picture you have to change it's size from Config|Window.