|
|
FEBRUARY 12, 2002 The Complete Guide to Creating Photoshop Filters
Appendix 1: 3D Effects in the Filter Factory Here's a tutorial whose main purpose will probably be of little use to most of you. Sound enticing? Well, even if it won't be of direct use to you, you can still learn something from it about Photoshop's Filter Factory.
[an error occurred while processing this directive]
We're going to use the Filter Factory plugin to create a 3D effect on an image. Now, before you get all excited, I'm not talking about the kind of 3D used in movies like Final Fantasy. To accomplish that kind of 3D, all you have to do is go out and buy a 3D program, work in it for about 72 million hours and then shoot yourself when all anybody can say about it is that the lip sync was off. No, what I'm talking about is oldee-tymee 3D, the kind where you have to wear special red and blue glasses to get the effect. (I told you this would be of little use to most of you.)
The basic function I'm referring to is a channel shift. To turn a 2D image into a 3D image, all you have to do is shift the red channel to the left. Well, that's not really all you need to do, but that's at the heart of it. A bit about 3D There's very little you need to know about the way 3D works. Basically, if you have glasses that have the red lens on the left side (as most do), then you want to shift the red channel to the left. With the other kind of glasses the opposite is true. The amount of red channel shift determines how near or far an object or layer appears to the aided eye. The more shift, the farther away it looks. The less shift, the nearer it looks. (No shift at all is about as near as you can get.) One important consideration is just how eye-popping you want your 3D image to look. If you really care about the 3D, you should work on a grayscale image. If you really care about the image, you can leave it in color, but it just won't appear to pop as much. I'll show you how to do it both ways, along with examples. (By the way, it would probably help if you had some 3D glasses for this tutorial. Make sure the red lens is on the left. If it's not, well, uh, turn the glasses around. If you don't have them, you can find them on the Web through a number of sources. Just do a search on any search engine for "3D glasses." I found mine at a local Barnes & Noble. They were included free in a children's book about dinosaurs. As an added bonus, the glasses themselves are shaped like a dinosaur, and they're made out of green and purple foam. Now, special glasses like these will cost you a little extra, but you can find the theatrical-quality glasses for about $0.50 each, or less in larger quantities.) For my example, I'm going to take an image and create three separate layers. Each one will be a part of the scene that will be farther away than the next. Take a look at the image below.
Here you see two dancers and a wall in the background. My goal will be to make the wall look pretty far back, and then bring the dancers up close to the viewer, with the dancer on the right being in the absolute front. How? Very simple: varying degrees of red channel shift. First you're going to want to mask off your subjects and put them into their separate layers. If, like me, you're using a single image and pulling your subjects off the background, you're going to wind up with some transparent (or white) areas in your background. You'll need to use some skill to fill those in, or else you're going to get ghost-like leftovers from the subjects you're pulling out. (Definitely do not leave the original subjects in the background, or the whole effect will be ruined.) After you have all of your layers created, it's time to get into the Filter Factory. We'll begin with the formula for shifting the red channel and then apply it to each of our layers. The concept is that we're going to take every red source pixel and move them to the left (in other words, along the x axis). Filter Factory is tailor-made for a simple operation like this. Here's how it works. When you select Filter Factory (Filter > Synthetic > Filter Factory), you're presented with an interface with several confusing-looking elements?Maps 0 through 7 and some text fields labeled R, G, B and A. These look confusing, but they're not difficult. The "Maps" are actually sliders that assign values to your formulas, with values ranging from 0 to 255. The R, G, B and A fields represent your red, green, blue and alpha channels, respectively. As I say, we're going to use these controls to move our red source pixels along the x axis (left). So, in the field labeled R, type in this formula: src(x+ctl(0),y, 0) and leave the other fields alone.
What in the bejeepers does this mean? "Src" means "source pixels." The "x+ctl(0)" means we're going to move our pixels along the x axis by a number of pixels equal to the value of the first slider. (There are eight sliders numbered 0 through 7.) The "y" by itself means that we're going to leave the y axis alone. And the "0" is simply a redundant (but necessary) way of telling Filter Factory we're applying this formula to the red channel. (Zero is just a number Filter Factory understands as meaning "red." I don't know why.) Got it? Even if you don't, type in the formula as I gave it to you, and then try playing around with the top-most slider (the first slider in the "Map 1" zone). See that? Kind of magical, isn't it? The further to the right you slide the slider, the more the red channel moves. So now you have your very own filter. Select "Make" to turn it into a filter that you can use over and over (saving it into your "Plug-Ins" folder). Choose "Save" to save the actual formula you created so that you can look at the formula in the future, if need be. To use it right away, you'll need to quit Photoshop and relaunch it. You don't need to do this just yet, as Filter Factory will remember your settings for this session. Part 2 of the actual tutorial: applying your filter So now that you have your filter, all you need to do is apply to each of your layers separately. We'll begin with the background, which I want to look pretty far away. So I select Filter > Synthetic > Filter Factory and move the slider to about 20. This will cause a significant shift in my red channel, which, as we've learned, will make the background look farther away.
For my left dancer, I'm going to use a more moderate value, such as 5. My subject happens to be small and wearing red, so the image isn't going to look perfect no matter what value I assign. But 5 is pretty good.
Then, for my right dancer, I'm not going to apply any shift at all. If I wanted to be tricky, I might mask off her left hand separately and assign it and the dancer herself separate values, but I'm not going to do this.
Voila! Our 3D picture is done. Now just strap on those glasses and take a gander. If you move your head left to right, you'll actually see the background moving, while the foreground remains still. Ooh. The grayscale approach I mentioned that grayscale images really pop better than color images. So, if you're more interested in the 3D effect than maintaining the color of your image, go ahead and convert your RGB image into a grayscale image. Then convert it back into an RBG image and follow the steps above. There's no difference in the process, just in the quality of the end result.
Alternate methods There are other ways to do this. You could manually insert a second image into your first image's red channel. I don't like this method. It requires two photographs taken at slightly different angles. The other method is to use a filter that's already included in Photoshop (Filter > Other > Offset). To use it, select your red channel, and then apply the filter, using a negative value. (Such as -10 to move the red channel 10 pixels to the left). The limitation of this is that it only works on background layers. Maybe there's a way to get it to work on regular layers, but I like the Filter Factory approach better anyway. Note that the "+" sign is not the only operator you can use. You can also use, for varying effects, subtraction (-), division (/) and multiplication (*). You can even use sliders in conjunction with each other (src(x+(ctl(0)*ctl(1)),y,0). This will allow you to go beyond the 255 value limit, as the result of ctl(0)*clt(1) can be anywhere from 0*0 to 255*255. Part 1: Introduction to Basic Operations in Filter Factory Part 2: Convolving Pixels Part 3: Geometric Expressions Part 4: Conditional Statements Appendix 1: 3D Effects in the Filter Factory Appendix 2: More on 3D Effects Appendix 3: Customizing Your Filter Interface Complete: The Whole Thing on One Giant Page! Further Resources: I've tried to make this series as accessible as possible for you folks without any programming background. If you'd like to take the Filter Factory even further or just learn more about the guts of Photoshop, there is a highly technical instructional document that you can find at http://www.thepluginsite.com/knowhow/ffpg/ffpg.htm. I highly recommend it. For me, it's been a great source for experimentation, even if, at first, I didn't understand everything that the author was talking about. Prev 1 2 3 4 5 6 7 8 9 Next Related sites: Creative Mac Digital Media Designer Digital Producer Presentation Master The WWUG Related forums: [an error occurred while processing this directive]
|