ON DISK
Cyber Corner
The Return of Pixel-Pro!
BY JON A. BELL
Pixel-Pro plus Cyber Paint equals great graphics! File PIXELPRO.ARC on Side 2 of your START disk.
(Editor's Note: Pixel-Pro, written by former Consulting Editor Matt Loveless, was first published in the Fall 1987 issue of START. Pixel-Pro performs image manipulations on DEGAS or NEOchrome pictures, which you can then load into CyberPaint for fascinating effects. This issue, we'll show you how to use one of Pixel-Pro's features with CyberPaint. You'll find the original Pixel-Pro program, an "Inside Pixel-Pro" text file and several other files in the archived file PIXELPRO.ARC on your START disk.)
When Matt Loveless first wrote Pixel-Pro, he had no idea that it could still be useful to ST graphics mavens three years later. But it is. Pixel-Pro contains some nifty image-twiddling features that even Cyber Paint 2.0's Pixel F/X menu doesn't have. You can use Pixel-Pro as a powerful tool to enhance still frames from a Cyber Paint animation and then reload them into Cyber Paint to play them in sequence.
In this installment of Cyber Corner, we're going to use Pixel-Pro's unusual "Grainy" feature to distort a DEGAS picture--actually, an image of a CAD-3D object. If you want to exploit the program's other features, you'll find a text file on the START disk called PIXELPRO.TXT explaining them in detail.
Getting Started
To run Pixel-Pro, boot this month's START disk; the START Menu program runs automatically. If you have a double-sided floppy disk drive, at the main screen, click on Prepare, then select "Pixel-Pro." (If your only floppy disk drive is single-sided, you'll need to borrow a friend's double-sided drive to access the second side of the START disk. ) The file will un-ARC directly onto the destination disk you specify. In a short time, you'll have the following files:
- PIXELPRO.PRG is the runnable program itself. (The source code, written in Megamax C, has been omitted from the disk because of length. You can purchase it on the original Fall 1987 START disk from Antic Publishing's Disk Desk by calling (800) 234-7001.)
- PIXELPRO.RSC is the Resource file for PIXELPRO.PRG. It must be in the same directory as the program.
- PIXELPRO.TXT is a text file in ASCII format--an edited version of Matt's original Pixel-Pro article. If you want to play with all of Pixel-Pro's features, print out a copy of this file and study it. It'll provide you with all the help you need to exploit this program's features.
- ATAKSHIP.PI1 is the sample DEGAS picture that we'll be loading into Pixel-Pro to manipulate for our animation sequence. It's a spaceship I designed with CAD-3D, using Antic Software's Future Design disk. As an added bonus, I've included the actual CAD-3D object on the START disk as ATAKSHIP.3D2 for you to play with.
Pixel-Pro operates on a pixel matrix, the set of pixels surrounding each individual pixel. Use this picture file, Atakship, to practice your Pixel special effects. |
The Program
Pixel-Pro has no drawing features of its own, nor does it create pictures. Instead, it works with any low-resolution NEOchrome .NEO or DEGAS .PI1 pictures (it works particularly well with digitized color pictures). It won't work with Spectrum 512 or any other "supercolor" paint program, nor with compressed .PC1 files.
The Grainy Feature
Pixel-Pro runs only on a color monitor. Double-click on PIXELPRO.PRG in medium resolution; when the program loads, click anywhere in the dialog box to begin. Since we don't have the space to cover the use of all of Pixel-Pro's features with Cyber Paint, we'll just cover the Grainy feature from the Effects menu this issue. For the moment, ignore the other features you see in the other menus--you can explore them later in more detail, following the instructions in the Pixel-Pro text file.
Grainy, like most of the features in Pixel-Pro's Effects menu, is based on a pixel matrix, or pixel neighborhood. To understand this, think of every pixel as being surrounded by a matrix of adjacent pixels--like a tic-tac-toe board. The pixel matrix will be either 3x3 or 5x5; in Grainy's case, it's always 3x3. Grainy takes a 3x3 pixel matrix and rotates it onto itself.
Doing It
Let's get started. To load a picture, just click on Load NEO or Load DEGAS from the File menu and then load ATAKSHIP.PI1. Once it's loaded, you can view it by clicking on View from the File menu. The picture will be displayed for as long as you hold down the mouse button. Preview lets you try an effect without permanently changing the image. Like all items on the Modes menu, you can toggle it on or off by clicking on it.
When you choose Grainy, the ATAKSHIP picture will appear, with a set of mouse-controlled crosshairs on the screen. The crosshairs enable you to select an area of the picture to work on--a rectangle within which the selected operation will occur.
First, go up to the Modes menu, and make sure Preview is toggled on (a checkmark will appear to the left of it). Position the crosshair in the upper left-hand corner of the screen, then press and hold the left mouse button down. When you move the mouse, you can drag a box down and to the right on the screen around the area you want to affect. You can abort the box at any time by clicking the right mouse button. You can also leave your picture and return to the GEM screen any time the crosshairs are active: simply click the right mouse button.
See the effect? Grainy adds a scratchy, distorted texture to your image--almost as if you're looking at it through a shower door. If you use Grainy on the same area nine times, it will rotate back to the original image.
That's what we're going to do. Toggle Preview off, and go back to your picture. Click on Grainy, then drag a box around the entire spaceship. Now, go up to the File menu and click on either Save NEO or Save DEGAS. It doesn't matter which type of file the original picture was; you can save it as either. Call the picture either 2.NEO or 2.PI1, and save it to a blank, formatted disk. You'll want to number your modified images to make it less confusing later when you're loading them into Cyber Paint.
Now, go back to your picture and repeat the Grainy procedure. Save this picture to disk as 3.NEO or 3.PI1. Repeat this procedure--Grainy, Save, Grainy--until you've cycled back to your original image. When you've successfully created eight pictures, numbered from 2 to 9, leave Pixel-Pro. Click on Quit from the File menu, but be careful: the program will exit immediately without an alert box and you'll lose any picture that's still in memory.
Enter Cyber Paint
Okay, now load either version 1.0 or 2.0+ of Cyber Paint. Create nine blank frames, then go to frame one. Go to Menu, click on Load/Save, click on Load, then click on .PI1. Load ATAKSHIP.PI1 on the first frame. Advance to frame two, then load 2.NEO or 2.PI1 from disk. Continue advancing through the frames and loading the pictures sequentially. When you've finished loading all the frames, play the animation.
Interesting, isn't it? The pixel matrix rotates clockwise to create a swimming, spiky effect to your original image. If you want, go to the Load/Save menu, click on .SEQ and save this short sequence to disk as ATAKSWIM.SEQ.
There are many uses for this PixelPro effect. For instance, if you create a densely-textured DEGAS background using Airbrush, with, say, various shades of blue on a black background, then put your image through its Pixel-Pro paces, you can create a swirling underwater effect--like plankton or diatoms spinning around. Loop this several times, then Overlay an animation such as a swimming fish and you have a fascinating, multitextured sequence impossible to create with any of Cyber Paint's other Pixel F/X features.
Conclusion
As with most graphics programs, the key to getting the most out of PixelPro and its uses with Cyber Paint is experimentation. Collect copies of your favorite low-resolution pictures, load them up and start twiddling those bits.
Former START Editor Jon A. Bell is now Managing Editor of ORACLE, The SQL Database Journal, in Belmont, CA. Matthew G. Loveless is a software documentation writer and programmer with Berkeley Softworks, Berkeley, CA.
PRODUCTS MENTIONED
DEGAS Elite, $49.95. Electronic Arts, 1820 Gateway Drive, San Mateo, CA 94404, (415) 571-7171.
NEOchrome, $39.95. Atari Corporation, 1196 Borregas Avenue, P.O. Box 61657, Sunnyvale, CA 94088, (408) 745-2000.
G1-Cyber Studio including CAD-3D 2.0, $89.95; Future Design Disk, $29.95 Cyber Paint 2.0, $79.95. Antic Software, 544 Second Street, San Francisco CA 94107 (800) 234-7001.