This is one that I've been avoiding for some time. The main reason being that I was never entirely happy with various things in the D-Map. That is, I could get the results that I was after, but the D-Maps didn't have a level of tweakness that I happy with. As things go, the subject came up, so I finally polished it up real nice and tidy like. The result? A D-Map that I'm happy with, and yet another ramble.
I currently have no plans to put this in Tech-Slop.
********
Okay, fixing barrel or pin distortion with Displace. There are simplier versions, but I'm going to be showing my all-purpose, tweak meister dream D-Map. Not only will this fix barrel or pin, but do it in one of two ways - plus it got more tweaks! Stiffy! Err, I mean... spiffy!
Two different ways of fixing. One is to distort the corners into place. The other is to distort the horizontal center and vertical center into place.
This one is set up to distort the corners into place:
At the very bottom is Base. Very simple to do. First thing, open the Gradient dialog and make sure Smoothness is set to 0%. Very important! Then set the default colour with 'd'. Then it's time to lay down a few gradients in the seperate channels. In the Red channel, it's black to white, left to right. In the Green channel, it's black to white, top to bottom. Personally, I like to fill the Blue channel with 50% Gray.
Oh yeah, Guides are good. One all borders and in the middles. Just to help lay down the gradients.
Start a new layer and fill it with black. Grab the Radial gradient tool and set to either Lighten or Screen. Lay down a bunch of radials from the corners as illustrated in the graphic. Set this layer to Exclusion.
Now start a Curves Adjustment Layer and give it the curve on left. Note that the lower-left point is Input: 0, Output: 128. Leave the upper-right were it's at. Then drag up an anchor to make kind of a semi-ovular shape. Clip this to the Exclusion layer. I call this Curves Ad-Layer 'Tweak'.
If you stop right there and try it, it should work just fine. Sort of. In my experience, the extreme black and white is too extreme. In one large photo that I tried it on, Horizontal/Vertical: 2% was almost too much. So, the extremes have to neutralized to a degree. This is done with Levels Ad-Layer.
With Displace, 50% Gray is the middle. So, if you bring white down to a certaint point, then you will have to bring black up to the same point. In my Levels Ad-Layer, I went with 64. So, 0 + 64 = 64, and 255 - 64 = 191. I have been known to go as high as 100 (100 and 155). With the adjusted extremes, there is now more room to play with the percentages.
Okay, so that distorts the corners into place. If you want to distort horizontal middle and vertical centers into place, then invert the Exclusion layer (ctrl + i). If you do that, then you will probably have to use the illustrated curve on the right.
There are a few things to try for the various situations.
1. Invert the Exclusion layer (already mentioned)
2. Invert the Base Layer
3. Change the Tweak curve to either one illustrated
4. Use negative percentages
Messing with those things should get you the fix that you are looking for. Once you get the hang of it, it's really not that bad.
Now, if you want to have some artistic fun, get crazy with the Tweaks Ad-Layer. Or get crazy with other things. You just might surprise yourself.
[This message has been edited by warjournal (edited 08-15-2003).]