   Creating good color key images
  Hi, are there any tips on how to create images that look decent when color keyed? I'm talking about getting rid of the ugly stairs that usually appear around the antialiased edges of a digitally drawn image, those which the color key cannot remove.   
  Well obviously if an image has anti-aliased edges then you can't get it to look good with a colour key because that only works on a single colour. If you want decent looking images either use an alpha channel (i.e transparency) or don't use anti-aliased images.If you already have anti-aliased images you could try using an image editing program like PhotoShop or GIMP and play around with certain colour thresholds to try and remove the smooth anti-aliased edges and get a hard edge.   ;  Using HLS-based (hue-luminosity-saturation) keying is far superior to RGB-based keying in many cases (such as in the case of superimposing a transparent surface on another or removing "antialising" artifacts - which is essentially the same thing). You'll want to write your own shader to do that. See here for some code on how to convert from RGB to HLS color space and back.Basically you take your source image that needs keying, convert each pixel from RGB to HLS, check if the hue component is in a specific range (eg your key color etc). If it is, take the hue of the corresponding pixel on the target image and place that in the source image (leaving luminosity and saturation in tact). You might try blending the values for a less subtle/more artsy effect. Then convert the new HLS value back to RGB space and place it in the final image.A possible caveat is choosing the hue range - it's quite easy to create bleeding if the range is too large or if the colors in your image are very close hue-wise: eg a red shirt on human skin can be a real bitch to key using HLS while it might be less prone to bleeding using RGB and a tolerance threshold. I'm guessing that since you're already talking about keying, you've given this some thought, though.If you've never heard of HLS color space, poke around a bit in Photoshop. Then try adding a transparent glassy effect on another image (eg a glass cover on a another surface): for instance try superimposing the following jar on another image using the blue background as reference:http://www.houseofcans.com/images/products/gh3f1068.jpg   ;  But if you're going to go all fancy and use HLS-based keying (btw, i didn't even know that existed) then why not just use full alpha blending instead. It's not like hardware these days can't support it. Unless the OP is programming on a portable device or an really old computer.   ;  irreversible I assume means the app (photoshop/gimp) or your own written solution converst a RGB image to HLS does the color->alpha tranparent (with mipmaps) + then converts it back to RGB+A (alphachannel)   ;  If you can pre-create alphamaps then that is far more suitable for realtime application. I'm not sure what the OP's intent/application is, but for any case other than pre-creating resources and storing them on the hard drive (which would make adding an alpha map much easier and faster to load) I'd advise using color space conversion.   