Nutty Photoshop: Using floating selection quirks to my advantageSep-7-06, 5:32 pm by HanfordFile under: Photoshop, design, Adobe This odd little Photoshop trick that I've used for a long time just came up the other day while I was working on my new game, and I thought I'd blog about it. It uses an obscure side-effect of floating selections to make filling in the gaps of semi-translucent images a bit easier and without a lot of steps. See this broken button here?
The trick I'm about to demonstrate will let me fill in gap in this button without copying, without pasting, without creating a layer, without using the clear command or delete key, and without any precise measurements, and hopefully without me using any more italics. So, let's begin. Let's say I have this button that I need to make wider:
If I had the original shape in a vector layer with a gradient fill style, a bevel style, and a glow style applied to it, I could just edit that and I'd be in business. But becuase I was lazy or Firefox crashed my machine before I could save, the original is long gone. So I only have the 32-bit bitmapped data to work with. So I have to do it the hard way. And becuase it has a semi-transparent glow on it, it's not quite as simple as it would otherwise be. The first bit is pretty simple. Use a selection to move the "cap" over a bit:
To fill the gap in, I make a selection of the body of the button. I'm not being real precise here or trying to be accurate with the width of the selection:
I use the Move tool and hold down ALT (or the Mac equiv) while dragging to create a copied floating selection to fill in the gap:
But since my selection was a little bigger than the gap, the glow is stronger where the selection overlaps the original.
Now here's where the floating selection trick comes in. To get rid of the overlap, I select the marquee tool and I hold down ALT before selecting in order to turn on Subtraction mode. I then drag out a selection marquee to deselect the overlapping part of the floating selection:
As soon as I release my mouse button: Presto! The overlap mysteriously vanishes and the selection now fits perfectly:
Again, I never copied or pasted, I never created a layer, and I didn't even use the clear command or the delete key. Everything happened in one layer, with just a few steps. So what happened? Why this worksThe magic is all in the last step, and it works becuase Photoshop allows the editing selections while they're floating. Try this: Use the marquee tool to select some art. Then use the ALT key (or the "subtract from selection" button on the option bar) to remove part of the selection. Doing this will only affect the selection:
It behaves like I'd expect it to, and the Subtraction selection mode is really handy to modify selections. But now let's try something different. Reselect your art and then use the Move tool to move it. The selection will contract to fit your art, and the art is now "floating". Now go back to the Marquee tool and try using the ALT key on the selection again, just as before:
Now the exact same operation actually makes the art outside of the selection disappear, becuase the art is now floating. When you subtract from a floating selection the unselected art disappears. It's just the way Photoshop works. In the button example above, I'm exploiting that behavior to trim off the extra overlap of my floating selection in order to make it fit. Anyone know of other neat uses for the floating selection's quirks? Let me know! Also, check out my other Photoshop tricks in the Articles section of my main site. Okay, back to business. Feedback - 7 responsesDisplayed newest to oldest. Leave a comment.pritam wrote: Jan-31-10, 9:46 pm how can we define a floating selection? (BetaComment) David wrote: Sep-10-07, 4:55 am Reading this about a year after the comments were made... I'd just like to add to the last comment: the reason is probablydue to the "Feather selection". I wont explain it further, try for yourself :) Hanford wrote: Sep-7-06, 9:00 pm I tried it again several times, this time using Scale instead of Free Transform, and still got the same results. I dragged the right handle and applied the transform, and just like before both the right side and the left side (whose handle I never touched) were slightly distorted like seen above. Can you try it with a heavy glow on a black background, like above? It seems like the left-hand edge is always going to be messed up like that when using a scale becuase of how Photoshop messes with the transparencies of scaled edges .... eric.dolecki wrote: Sep-7-06, 8:20 pm I wish I could show you - I use the technique all the time myself and get no glitch. That includes shapes with glows, etc. I don't use Free Transform scale, but the "regular" one. Hanford wrote: Sep-7-06, 7:01 pm Eric, That doesn't quite work ... at least when I try it. Scaling (via Free Transform) is sub-pixel accurate, so it's hard to match it up perfectly ... and even when I do, I get errors on the glow. Notice on the image below, I never touched the left-hand side of the selection when I scaled it, yet the glow is a different strength:
I threw it on a black background to make it easier to see the glitch in the glow. The glitch is subtle, but it's there. eric.dolecki wrote: Sep-7-06, 6:04 pm This is easier: band select the middle section, use up&down keys to trim selection. you should now just have the center part selected. Now scale it to the right, and it will snap to the section on the right. Much quicker and you don't need to worry about overshooting :) Leave a commentComments are displayed on posts and visible to all site visitors. |
|
I design things in Silicon Valley; mostly consumer electronics media players. Perhaps I can design things for you. Check out my UI Portfolio. When I'm not making things for other people, I'm usually making video games. more
Please use our contact form.
|
|
To make a selection a floating selection, select it, then move it with the move tool but don't deselect. (BetaComment)