The Javamorph project can be found at Google Code or if you’re lucky enough to use Ubuntu it’s in your repositories so you can just apt-get it. I think it’s in the Debian Squeeze repos too.
The project homepage is worth checking out for a brief overview of how the program works and a link to a very informative pdf that explains all.
My very quick and dirty example shows me turning into my youngest brother and back again. Sorry Sam.
As you can hopefully see from the image below all you basically need to do is match up the mesh points with certain areas of each face, eyes, hair, nose etc. Once you’ve done this javamorph will do the rest of the work.
What javamorph creates is a series of images (jpegs) stored in the output folder after you have run a ‘morph’. These images show the progression from one state to another. To make that into a single animation file (in this case an animated gif) you need Gimp and importantly it’s extra package/plugin gimp-gap. So if you’ve not got these the quickest remedy is:
sudo apt-get install gimp gimp-gap
While you’re adding this great program you might also want to take the time to install gimp-data-extras to add some more brushes, palettes and gradients to your collection. You never can have enough.
So, once you’ve made your morph fire up gimp and head straight to the file menu where there is a handy entry titled Open as layers. With this you can import all your individual images as layers on the image in one command – just highlight all your images with your mouse or ctrl + a.
As you can see we now have as many layers as we do images. Why you might ask? Well because this is how the gimp animation package works – each layer is effectively a a frame in our animation. Obviously at this point you could tinker with the images to your hearts content, perhaps changing the colours or adding in some funky fades and gradients to spice things up a bit. This is just a quick and dirty tutorial though so I’ll leave the creativity to you!
So.. back to the gimp. My morph was made up of 20 images so I have that many layers. However, this animated gif will be used on a loop. That means that (if left as it is now) I’d get a nice fade to one face then suddenly straight back to the original. I don’t like that so I import the same pictures again (still using open as layers) and rearrange their order in the layers list so that one fades seamlessly to the other. Not sure that there is a quick way to do this so be prepared to be clicking the move up and move down buttons a good few times.
When you’re happy with it – you’re ready to save. Before making the gif it’s not a bad idea to save it as an xcf first. The last thing you want to have to do is arrange all those layers again! So once you’ve done that click Save as this time and change the .xcf to .gif. Once you’ve done this the export wizard will fire up. Initially it will suggest flattening the image but you don’t want that so select Save as Animation. The next popup allows you to tweak the speed between frames. The best bet really is to leave it at the default 100 initially, see what the saved gif looks like. From that you’ve a far better idea of whether to speed it up or slow it down.
Well done – you just made your first javamorph!
This was all accomplished in Ubuntu Lucid Alpha4 (technically now that’s 10.04 RC .) To achieve the same in Windows you’d need gimp-win.