Nutty Photoshop: Using floating selection quirks to my advantage




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?

Photoshop trick: Button image with cap moved over
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:

Photoshop trick: Button image
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:

Photoshop trick: Button image with cap moved over
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:

Button with body selected
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:

Button with body copied

But since my selection was a little bigger than the gap, the glow is stronger where the selection overlaps the original.

Button selection with overlapping glow
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:

Removing a part of the selection
As soon as I release my mouse button: Presto! The overlap mysteriously vanishes and the selection now fits perfectly:

The final button
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 works

The 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:

Subtracting from a 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:

Subtracting from a floating selection
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 - 10 responses

Displayed newest to oldest. Leave a comment.
globe life insurance phone number wrote:   
This website features certainly changed my own perspective with this issue. There's no manner I would've pondered it in this way easily we hadn't find your blog post. All I used to be executing seemed to be driving the web we uncovered your blog post website a sudden our landscapes possess improved. Very good on you, gentleman!
globe life insurance phone number
no exam life insurance quotes wrote:   
Nice post. We appreciate you taking the time to distribute these records very beneficial!I’m continue to anticipating a few interesting views through the aspect in the upcoming submit cheers.
no exam life insurance quotes
life insurance quotes online wrote:   
This blog has got surely transformed my own point of view within this theme. There is absolutely no technique My spouse and i would've contemplated that by doing this only had not encounter your site. Many I used to be doing appeared to be touring the web we identified your blog and every one of an unexpected this ideas include modified. Beneficial on you, dude!
life insurance quotes online
Hanford wrote:   
To make a selection a floating selection, select it, then move it with the move tool but don't deselect. (BetaComment)
pritam wrote:   
how can we define a floating selection? (BetaComment)
David wrote:   
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:   
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:   
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:   
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:

Photoshop reply
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:   
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 comment

Name:
Website:
Comment:

Email:
Captcha:
Select the icon of the Sun from below:

           

           

 

This site is mostly about

Video Game Design

User Interface Design

Creative & fun stuff

 

Your Host

I'm Hanford Lemoore. My parking skills are unparalleled.

I make things. From consumer electronics, to video games, to theme park attractions. Perhaps I can make things for you! Check out my portfolio.

When I'm not making things for other people, I'm usually experimenting.

 

Contact

Follow me on Twitter.

Message me on Facebook.

Email me using my contact form.

 

RSS 2.0

 

maquettegame.com

tikiroom.com

junkyardclubhouse.com

monolux.com

 

   


Copyright 2012 Hanford Lemoore | Blog | About | Portfolio | Contact
Powered by Olark