Anti- Anti-Aliasing

What is "anti-anti-aliasing"? We made it up! In Director, it is the problem of importing a Photoshop image with a nice feathered edge and upon putting on the stage with background transparent ink, seeing an augly halo of light grey pixels.

Here is an assortment of remedies...


Date:    Mon, 12 May 1997 17:46:36 -0400
From:    Romeo Alaeff 
Subject: Re: How to get rid of the white borders around sprites
Another thing you can try in photoshop:
  1. cut and paste image to a white background.
  2. save the selection to an alpha channel.
  3. deselect all
  4. go to alpha channel, choose ADJUST, THRESHOLD from IMAGE menu. Clik OK. (this should give an aliased image in the channel)
  5. Duplicate this channel (#4).
  6. Turn this alpha channel copy into a selection & then go back to RGB image. (The selection should pass through the middle of the image's anti-aliasing.
  7. SELECT-INVERSE to select the background.
  8. Fill with key color from 256 color palette you will be using.
  9. Select INVERSE again.
  10. FLOAT this selection and select LAYER-MATTING-DEFRINGE (1 pixel).

    OR

    you can contract the size of either the alpha-channel or the selection by 1 pixel-this selects the image on the inside of its anti-aliasing. Choose SELECT-INVERSE and fill with key color.


Date: Fri, 17 Nov 1995 15:06:00 -0800 (PST)
From: "Mentzer, Mark" 
Subject: Anti-Anti-Aliasing in Director
I think I've come up with the easiest solution to the dreaded white line around irregular objects (shapes) in Director. It's based on a lot of the suggestions I've seen from other users. This is based on Photoshop 3.0. Getting your designers to design the individual objects which will be brought into Director on black backgrounds or backgrounds which is the basic color of your background is difficult because if the items are on layers in Photoshop they can't see the whole picture. So the steps are as follows:
  1. Have your designers create their objects on seperate (transparent) layers.
  2. Choose a layer which has an object to be brought into Director.
  3. Select the transparent background with the Wand tool.
  4. Do--Select Inverse. (Now you have your object).
  5. Do--Copy (Command-C).
  6. Do--New (Command-N). (Photoshop will automatically have the proper dimensions).
  7. Select the best representation of your background color of your original file using the Eyedropper tool.
  8. Use the Paint Bucket tool to fill the transparent background with the new color you got by doing step 7.
  9. Do--Paste Layer.
  10. Do--Flatten Layers.
  11. Select the background color using the Wand tool.
  12. Do--Select Inverse. (Now you have your object which is anti-aliased on the background color instead of white.
  13. Do--Copy.
  14. Go into Director and paste your object into a cast.


Date:    Wed, 23 Aug 1995 07:56:00 CDT
From:    gwg@MCS.COM
Subject: Tip for avoiding those white anti-aliasing outlines
I've gotten so many useful ideas from direct-l, and from the director web page, that I thought I should contribute one... A solution to the age old question... how do we avoid those nasty white outlines that come in with anti-aliased images?

Here's the trick.. (using Photoshop.. other tools may also be suitable)

  1. Have your graphic artist create the image on a pure _black_ background.
  2. Index and dither the image to 256 colors.
  3. Select the pure black surrounding the image, and replace the selection with pure white.

Now, the image is anti-aliased to black, but is surrounded with pure white outside the anti-aliasing. With matte-ink, the white will turn transparent, and the image will appear on screen smoothly anti-aliased.

FYI, the key here is the anti-aliasing to black. If the image is created on a white background, then indexed and dithered, then the background white is used in the anti-aliasing. So when you display the image with matte ink, only the pure white is transparent -- the anti-aliased off-white fringe shows.

Garret Gengler
gwg@mcs.com


I create, for example, my "background" in one Photoshop layer and my "object" in another. I "Save Copy As..." two PICTs -- one with the background only, and one with the background composited with the object.

Now do a Difference calculation between the two PICTs and put it in a new channel in the original Photoshop 3 file. Go to that channel. Select all. Using the magic wand (set to *not* antialias, and a tolerance of 0), Command-click to deselect the black around the object. Then, use the rectangular selected tool to select a square the encompasses the area of the irregularly-shaped selected area.

That gives you the area that you need to copy to put into your cast. Note it horizontal and vertical locations, and use it as a guide to put in this "composite" object.


Date:    Tue, 14 Nov 1995 11:26:55 EST
From:    John Dowdell <71333.42@COMPUSERVE.COM>
Subject: Re: Slow PC response
Laura Bond-Harris writes on Nov 13
"I don't want to use anti-aliasing for text ..., I want to use it for non-rectangular sprites that I want to make matte and then anti-alias to remove any white/background edges. This is the technique I've had to use before to get a clean overlay. And yes, I know it eats up time, but it is sometimes faster to overlay a small area of the screen, rather than replace the whole background. (Also, I would probably anti-alias a small piece of text if it let me prevent reading in total backgrounds constantly.) Anyway, sorry to hear it's not here."
ack! eek oof ouf! If the goal is to remove the "halo" that sometimes surrounds imported irregular bitmaps, Laura, then there's a fast way to do it at designtime that will save you clock cycles at runtime:
  1. Bring in a non-rectangular bitmap from Photoshop or wherever, one that has its outline blended to the white background.

  2. In Director's Paint Window doubleclick Marquee tool to select all, copy to clipboard.

  3. While still selected, use "Lighten" effect from menu a few times to move colors to white. Number of times will vary with image; we wish to turn those near-white edge pixels to pure white.

  4. Use Lasso Tool in "shrink" mode to select just the remaining colored pixels.

  5. Use "Darken" effect from menu to move these pixels back to black. Use "Repeat Effect..." keyboard shortcut until these colored pixels are full black.

  6. Fill in any internal areas with black brush... if you had specular highlights from a 3D rendering, for instance, then those internal pixels might be inappropriately white. We'll only fill areas that are black. Once done, you'll be left with a choked outline of the artwork.

  7. Paste original bitmap from clipboard using "Lightest" ink from the Paint Window's Tools section. Only black pixels will be replaced with original color. You'll have effectively choked out those blends-to-white along the edges, and will have crisp edges suitable for realtime compositing.

The sequence is speedy once you've done it a few times... fun!