|
Main Tutorials - Main IFXCurrents - Main |

Tutorials for ImageFX for the Amiga
|
All contents are Copyright - 1999, 2000 by Nova Design, Inc. All rights reserved. These documents may not be reproduced by any means without the express, written, permission of Nova Design, Inc. Copyright - 1999, 2000 by Nova Design, Inc. It is often helpful to hear what other users are doing with an application. If you would like to ask other ImageFX users about techniques and uses of ImageFX you can subscribe to Nova Design's ImageFX mailing list by going HERE and following the "Membership/Subscribe" link. The ImageFX Currents Tutorials have been put into this HTML archive by the following individuals (Listed in alphabetical order):
Logo illustration by Kermit Woodall AutoFX, the Sorcerers ApprenticeBy Dave Matthews One of the most powerful features of computers is their ability to automate tedious tasks. This is in fact, why the first computers were invented, and although this sounds obvious, we often overlook this in the press of getting the job done, and do things the old fashioned way, by hand, as it were. As you know if you've read many issues of Amazing Computing, I use Aladdin 4D, Nova Design's wonderful 3D modeling and animation program, to create images and animations. While Aladdin 4D allows you to render directly to the Amiga anim 5 format, this may not give the best results. For best quality, it is better to render your frames as 24 bit pictures, and then assemble them later. This is called post processing, and with the right software, allows far more control and better quality in the final animation. In my case, the right software is ImageFX, also by Nova Design. ImageFX allows you to paste a series of frames together into an Amiga anim, but more importantly, allows you to control and tweak many aspects of the final animation. One of the things I need to control when assembling 24 bit color frames into an animation is the palette. This is especially important when the final animation is going to be 256 colors or less. Having fewer colors to work with means more care must be exercised is choosing which colors to use. Early Amiga animation software used a 'global' palette for the entire animation. In other words, for a 16 color animation, all the frames would use the same set of 16 colors. Newer software added the option for each frame to use it's own palette. This is more flexible, and can look better for low color animations, but takes more processor power to play back, and is less compatible with older software. Let's say we want to make a 16 color animation, using a global palette, out of our 24 bit frames. It would be simple enough to load each frame and manually make the desired changes, but this would be tedious and slow for more than a few frames. Far better to let the computer do what it's good at, automation. While there are a number of ways to accomplish this in ImageFX, we're going to keep this simple, for now, and use AutoFX. AutoFX is a batch processor meant for making an easy way to automate repetitive task in ImageFX. In fact, AutoFX is a visual programming tool for making Arexx scripts, which is the heart of ImageFX's power. AutoFX allows you to build a script by selecting commands from a list. AutoFX lives in ImageFX's Toolbox, under the Hook button. The AutoFX interface is fairly simple. On the left is the File requester section, where you select the sequence of images you want to work with. When you have all the files selected the Add File(s) button in the top center will copy these names into the box on the top right. You use the Buttons in the Operations area to build your script. The buttons are intuitive, perhaps with the exception of the "Move Command(s)" button. The "Add Command..." button allows you to select a command from a requester, and will place the command in the box to the right. "Remove command(s)" removes the selected command. You use the move button to rearrange the sequence of commands in your script. Highlight the command (you can highlight multiple commands if you like) you wish to move with the mouse. Click on the "Move Command(s)" button. A horizontal line will appear in the list. Simple move the line using the mouse to where you want the command to be moved to, and press the left mouse button. Once you have built your script, (don't forget to save the script via the right mouse button Project Menu) press the Begin button, and ImageFX (and Arexx) will follow the command in the list, applying them to the pictures you selected. If an error happens, ImageFX will pop up a cryptic "failed: RC=nnnn" message box, which usually isn't very helpful, unless you know your Arexx return codes, I guess. The most common errors I ran into were running out of disk space, memory, or forgetting to set a valid destination directory when I ran the script. O.K., so we've selected the sequence of frames. Make sure the button underneath the Image Files windows on the top right is set to main buffer. You can load pictures into the swap and alpha buffers as well (next time we'll use the swap buffer for compositing purposes), but for now, we just need the main buffer. Now, select "Add Command(s)" and from the requester that opens, select Load.ifx. The will appear in the right hand box. Load.ifx will load the the pictures you previously selected into the buffer, starting with the first image of the sequence. Now, we've got our 24 bit frame loaded into the buffer. Next we want to turn it into a 16 color image. For this, we will use the Render_Amiga.ifx command. This will take the 24 bit color image in the buffer, and render it to an native Amiga mode. Finally, we need to add one more command. The whole point to this is to create an animation, so we will add the SaveRenderedAs_Anim.ifx command. This takes the rendered images, and compiles them into an Amiga animation. O.K., that's it. You've just written your first AutoFX program. Now hit the Begin Button. The first thing you should see is the Amiga Render Module Settings window. Here you tell ImageFX how you want your animation cooked. You can select the Dithering, Screen mode, resolution, and number of colors, and whether you want the palette locked. See Figure 1. ![]() Once you have the settings correct, click on Okay, and a file requester will pop up, giving you the opportunity to select the destination and filename of the animation. Click the OK button, and the magic happens. Each image in the sequence will be loaded, rendered to the desired format, and appended to the animation. All you have to do now is wait. I'm sure you'll find that, once the initial setup was done, AutoFX made the tedious task of loading each 24 bit frame, remapping it to an Amiga resolution, and compiling it into an Animation far easier and faster than doing this by hand. But wait, there's more... At this level, AutoFX is easy and powerful. However, it is by no means perfect. Using the generic commands right out of the box, so to speaks, works well for many situations, but is somewhat inflexible, and can lead to problems. For instance, using this technique on a particular sequence of frames I had rendered in Aladdin 4D resulted in, not the breathtaking animation I was expecting, but a solid black nothingness. #$%#@! It took me a while to realize that the first few frames of the animation were black. the Render_Amiga command was creating the palette for the whole animation from the first frame, and since I had the palette locked, and the first frame was black, well, you can see the problem. In order to deal with this, and other problems, we will need to dig into the actual code of these AutoFX Arexx commands. But that's for part 2 of this tutorial. So I'll see you then. As always, you can reach me via email at: DaveSMatthews@netscape.net If you have an idea for an article or tutorial please drop an
email to the current editor
of these tutorial pages. Links: |