Powering Digital Media Production ... Return to Media Workstation Home Page

Shapeshifter: An Xmorph Tutorial (page 2)
by Dr. Michael J. Gourlay

Search Media Workstation

Click here to search all Digital Media Net

 

 

 

 

BACK TO PAGE 1 CONTINUED ON PAGE 3 4

Reading image files

Xmorph file menu The next step is to choose two images, the start (or source) and finish (or destination) images. The image files must be in the Targe Truevision TGA image file format. The reason Xmorph only accepts this image file format is that it is the only common image file format which supports truecolor images with opacity. There are many image manipulation packages which convert to and from the TGA image file format, including GIMP, xv, ImageMagick, and Photoshop. Xmorph's job is not to perform image file conversion; its job is only to morph images.

Xmorph source file dialog To read the source image, select the "File" menu from the menu bar, and select the "Open source image..." entry. A dialog box will pop up asking for a source image filename. Type in "mjg-head-440x450.tga" and press the "Okay" button. An image of a human face will appear in the left image panel of the Xmorph main window.

Xmorph main window with face The image will probably be too large to fit into the original image panel, but scrollbars will appear to allow the image to be panned. Also, the Xmorph main window can be resized, and the left and right image panels can be resized individually. This allows very large images to be manipulated and viewed even on small screens.

Now read the destination image. From the "File" menu, select "Open destination image...". A dialog box will appear asking for a destination image file name. Type in "alien-head-440x450.tga" and press the "Okay" button. An image of an alien face will appear in the right image panel of the Xmorph main window.

An alternative way to read the image files is from the command line. To achieve roughly the same effect as the above steps, issue this command:

  • xmorph -start mjg-head-440x450.tga -finish alien-head-440x450.tga

Xmorph main window with two faces

One benefit of providing Xmorph with the image files at the command line is that the Xmorph main menu automatically resizes itself to fit the image files, without needing scrollbars. Another difference is that the initial number of mesh lines will be different. Whether or not this is desirable depends on the preference of the user. As will be explained soon, the number and position of mesh lines and points can be changed manually. In fact, this is the main purpose of the Xmorph graphical user interace.

Each image panel image can be dimmed. From within the image panel, select the "Properties" menu, and toggle the "Dim Image" button. The corresponding image will be dimmed. The purpose of dimming an image is to make the mesh lines and points more visible.

When an image is dimmed, only its displayed image within the Xmorph image panel is dim. When the image is morphed and written to a file, the original brightness is used.

If your display is a grayscale or pseudo-color display (e.g. if your display can not display more than 256 colors) then the images Xmorph displays will not be identical to what is stored in the image files. The displayed images might be dithered, and will have lower display quality than the actual images. The images used internally by Xmorph, however, are the full color images. This means that the image files produced by Xmorph will be truecolor images, even if your display can not show them. The benefit is that Xmorph can be used on low-quality displays yet produce high-quality image files. The image files produced by Xmorph have no relation to the display quality. In fact, a companion program to Xmorph, called Morph, is a command-line-only version of Xmorph which has no image display features at all, and can be run on machines that do not have displays. This allows morphs to be performed offline, distributed across many machines or many processors. This feature will be explained in the next section.

BACK TO PAGE 1 CONTINUED ON PAGE 3 4




© 2003, Digital Media Online, All Rights Reserved

  home      search      user forum      subscribe      media kit      contact       webmaster@digitalmedianet.com   Return to Media Workstation Home Page