Advanced Tutorial:
Making Antialiased Palace Avatars
with Adobe Photoshop

Antialiasing Avatar Edges

Prop edges are hard and jaggy. But avatars can have softer edges by layering normal props over "ghost" props. The trick is to get the two props to fit together nicely. The task is easily performed in Photoshop.

At right is a photo found on the net. We'll use it as the basis for building a new avatar. We'll be using Photoshop 3.0 2.5 users can get the same results, but using 3.0 layers makes it easier to bundle the entire job into a single package.

Do you know who shot this photo? Is it a late Hurrell? If you know, please send me mail so I can properly credit it!

The first step is to expand our grayscale values. The blacks in the photo are really only about 20% gray, and gelled slightly red. This gives the photo a great hot-lamp look, but we need every bit of color depth we can scrounge for. So we expand the dynamic range using (your choice) "Adjust->Image->Levels..." or "Adjust->Image->Curves..."

layers Next, we draw a transparency mask for the main photo layer. My own preference is to use quickmask to build a selection, save the selection, then copy that saved channel to the layer's transparency mask once I'm happy with it. In this case, I painted a general body-cutout mask in quickmask, then further trimmed the transparency mask later by painting directly into the mask.

For precision, this prep work is done at the highest available resolution the original size. Downsizing to 44x44 or 132x132 size is only done after the masks are done again, in the interest of eeking-out as much picture data as we can in the limited space Palace provides us.

Once the masks are drawn and finalized, the picture is cropped tightly around the mask and resized. I add two extra layers behind the picture one, called "BG," is a clip from one of the Palace rooms GIFs, to view the avatar pic in context. The one here is from Harry's bar. The second, called "way BG," is filled with our "greenscreen" value, [R51G255B0]. The "way BG" layer is only visible when "BG" is turned off (hidden).

If that looks good, we select the front layer, containing our picture ("Foreground," "Layer 1," etc called "M" in the illustration). We call "Duplicate Layer" (on the Layers Palette) twice (Shortcut: drag the layer onto the page-turn icon at the bottom of the palette). The new front layer we name the "Hard" layer, the one behind it is the "Soft" layer. We can now hide our original picture layer ("M").

Note that we're still in RGB mode, and we still have the whole picture in both the "hard" and "soft" layers. We never really cut these pictures out we let the transparency masks do the job for us. That way, we can always change our minds.

The next step is to threshold the transparency masks of the hard and soft layers.

First select the hard-layer transparency mask. Use the "Image -> Adjust -> Levels..." command to restrict it only to values about 174 (yes, this number did come out of thin air) or higher. In other words, type "174 <tab> 1 <tab> 176 <tab>" and pinch the displayed values to black and white.

Grayscale Mask versus 1-bit Masks, Visible "Soft" Pixels

Next, select the soft-layer transparency mask. We want it to contain grayscale values from 64 to 174 less than 64 we want black, above 64 should be white. Again, use "Levels..." to do the job. The "Soft" Image will be ever-so-slightly larger than the "Hard" Image.

hard soft
Hard Layer Soft Layer
For preview purposes, we also want to set the transparency of this "soft" layer to 50%. We should now have both layers set correctly. As you can see, this isn't quite as good as a full grayscale edge from Photoshop, but not bad and much cleaner than normal jaggies. A little grace can go a long way.

PS Edge Palace Edge
Actual Photoshop Edge Ghost-Prop Edge
Next we start making copies. We will want one copy each of just the hard layer on the green background, and just the soft layer on the green background. At the same time, we'll convert to the Palace CLUT.

Make sure you've saved your work up to this point.

So for each of those layers, we show just what we need and hide all other layers. Hit "Mode->Indexed Color" and convert to the Palace CLUT (using "Custom" or "Previous." Dithering is a matter of personal taste. Make sure that when you convert the "Soft" layer, that you restore opacity to 100% before doing the conversion.

RGB unDith Dith
RGB Original No Dithering Dithered
Hit "Save As..." and save each version, hard and soft. I usually strip off all extra channels (leftover selections, etc) and save these as GIFs.

Now we will start building our collection of props. For multi-prop avatars, we tile both "soft" and "hard" images in the usual way. Note that some 44x44 cells of the "Soft" layer may be completely covered by the same area in the "Hard" layer we can just skip those "soft" props, they'll never be seen. (In the example, no ghosts are needed for the center cell, nor for the cell just to the left of center).

Pasting Avatar Tiles into Palace

The props in the "soft" layer are pasted-in and the "Ghost Prop" attribute set under the "Prop Edit" menu.

Once all the props are pasted-in, properly offset, and named, start building your avatar macro. Place all the soft props first, then the hard ones on top. Save the entire appearance as a macro, et voila!

You are anti-aliased.

Now the Bad News...

The current Palace software limits the number of props a character can wear to nine. So quick addition will tell you that in the example above, we need 16 props (two were unnessesary, remember?) for the full anti-aliased 132x132 image. It's a big av. Under today's Palace software, only the top (or bottom) two-thirds of the avatar can be worn and then user can carry no other props.

A more generous members' limit would be 20 props. That would let you do almost any kind of prop layering trick and still have space for two extra "dork" signs or handguns.

(An alternative, supported by jbum, would be bigger props)