[Is your keyboard burning?]
Chris's ColorWorks Power Tips- by Chris Wenham

ChOps and Shadows

What are ChOps? In 'pixel-pusher' speak it means "Channel Operations", which is the process of multiplying, adding, subtracting or otherwise comparing the pixels of two images together. The ability to do channel ops often makes or breaks a good photo imaging program since so many highly advanced techniques can only be done with them.

To start us off we're going to try an effect that comes from multiplying shadows into a picture. Have you ever seen the front page graphic for the OS/2 Zone magazine and wondered how the lettering was done? Well.. I don't know if this is the same technique they used or not, but it sure as heck looks like it to me. What we want to do is create shadow and highlight for the shape, then multiply them into the background canvas using a channel operation. It's not so bad as it sounds... really... like when have I ever lied to you?

Start with a new canvas and throw up a simple figure to begin with, in this case I used a circle.

[Starting circle]

Make a duplicate of it -- actually make two (ctrl-ins on the first canvas, then shift-ins twice to paste two copies onto the Desktop). Go to the first and blur it out nice and fuzzy using a blur filter like the custom one Imran Javaid suggested in last month's article (I used 3 passes) so it now looks a bit like this:

[Blurred circle]

Next we want to use the full canvas tool with mask mode on to select that whole canvas and drag-n-drop it onto one of our duplicates. Go to Edit.Float Merge Control... and pick Subtract Abs(A-B) from the drop-down list. We're now subtracting the floated shadow from the duplicate we made of the original. Position it so it's offset down and right a couple of pixels, paste the floating image, then invert that whole canvas so that it now looks like this:

[Shadow multiplier]

What you have is the shadow multiplier; to create the highlight you do exactly the same process as before but this time with the second duplicate you made. Here we're offsetting up and to the left the same number of pixels as before. Your highlight multiplier should look like the shadow multiplier except for the fact that the shadows here are on the other side (where the imaginary light is shining).

For the last stage we need to pick a background. This usually needs to be one with lots of grey values, or midrange color values so they don't interfere with our shadows and highlights. For this example I picked the skin texture found in last month's PowerTips column. Go to your shadow multiplier, float the full canvas (or just a rectangle with the shadow part if you think you're good enough) and drag-n-drop it to the background. Go to the Edit.Floating Merge Control... again and this time set the Use Floating Image control to If Darker. Position the shadow, then paste it. Your canvas should now look a bit like this one:

[Background with shadow multiplier]

To put the highlights in we need to be a little more crafty. We invert the destination canvas first, then drag-n-drop the highlight multiplier into it (using the "If Darker" floating merge control), position it, paste it, then invert it back to get our final image. By inverting the canvas before and then after we drop the highlights on we're making sure they'll turn out white while the shadows remain dark.

[Final image with shadow and highlights]

Nifty, eh?

All Quiet on the Western Front

Much to my dismay we didn't get any readers questions or tips in time for this article and Joe Anybody is visiting his mother for a few weeks so he's no good for help either. Wish me luck for next month's PowerTips though, folks, coz I'm going to be hunting down the leanest, meanest, most texturdly textures I can rip, beg, borrow or steal for an all-out texture/palette/graphics-state blowout. Just in time for you to create the most eye-wrenching Christmas Cards your sweet Aunt Tilly ever saw!


Chris Wenham is a Team OS/2er in Binghamton, NY with a catchy-titled company -- Wenham's Web Works. He has written comedy, sci-fi, HTML, Pascal, C++ and now writes software reviews.

[Index]  [® Previous] - [Feedback] - [Next ¯]

[Our Sponsor: Shenandoah Equipment Co. - Lifetime warrantied name brand memory.]


This page is maintained by Falcon Networking. We welcome your suggestions.

Copyright © 1996 - Falcon Networking