Stone Design Forums

Discussion for all things pertaining to Stone Design software
It is currently Thu Jun 20, 2013 12:42 am

All times are UTC - 7 hours




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: TIFFany basics: the magic wand
PostPosted: Mon May 24, 2004 7:41 pm 
Offline
User avatar

Joined: Mon Mar 15, 2004 5:56 pm
Posts: 252
Location: Durham, NC, USA
The magic wand in TIFFany is very flexible and powerful, much more so than Photoshop's "tolerance"-based magic wand tool. But it can be maddening to people who aren't used to it. Hopefully, I can save people some aggravation and explain what the tool is really trying to do and some tricks to get what you're expecting a little easier.

Overview

Technically speaking, the magic wand is a tool to create a bitmap marquee. It doesn't choose a region defined by a piece of geometry like a rectangle or spline marquee. It actually picks the pixels and how much they're picked (more on this later) according to the four criteria in the Magic Wand inspector: Hue, Saturation, Brightness and Transparency. Notice that these are the values that we use to define a color.

When you click on a spot in your image, that sets a baseline color. The criteria in the inspector sets the amount deviation from that color and all the pixels in that range are ten selected. You're basically filtering for color.

The Inspector

Now I think I was first confused about why there were two arrows/brackets in each of the sliders in the Magic Wand's inspector. The slider brackets set percentage values for tolerance and intolerance. The left bracket sets how much a value can vary from the one you picked and still be included in the selection. The right bracket sets how much will not be allowed into the selection based on how much it deviates from the picked color. For example, if you set the Brightness slider to 10 for the left bracket and 15 for the right, any color that is less than 10% brighter or darker than the color you clicked on will be part of the selection. Likewise, all colors that are more than 15% brighter or darker will be left out. If both were set to the same point, say 10%, the closest 10% are in, everything else is out (talking about brightness only). You can't set the intolerance to a lower value than the tolerance because then they would be fighting over the same pixels.

Like Photoshop But So Much More

This last example is how Photoshop's magic wand tool works. It assumes a value for tolerance relative to the picked color and everything outside of that tolerance range is excluded. This means that it gets you crisp areas of color without any smooth transition, and you can't control how it blends out. By making the tolerance 10% and the intolerance 15% in the first example, the pixels in between these values are partially picked. This means that, in that first example, if you use the simple paint tool to color the selected area bright green, the closest 10% to your original picked point would all be bright green. Makes sense, they're selected and they were painted. Obviously the pixels that are more than 15% brighter or darker than your original pick won't change color; they were excluded and are not part of the selected area. That leaves all the pixels that were between 10% and 15% different from the picked color.

The In-between

If they're not really included and not really excluded, what happens to them? Those pixels would get some green. The pixels that are 11% different will turn more green than the ones that were 14% different. The ones that are off by 11% are almost in, and the ones off by 14% were almost completely out. So instead of a crisp, possibly jagged line where the selection ends, you have a smooth gradient where the green is blended out. You can use this to your advantage to make much more subtle and convincing changes to an image without something popping out as looking "tinkered with."

Putting It All Together

So that was one slider, and there are four of them. It can be hard to juggle all those tolerances and exclusions. So don't!

Caffeine uses the example of a bright red car in their user guide. Let's say you know you want to pick all the red there, no matter if it's in shadow, in the sun, with glare off its surface, etc. You want red. So you set the Hue slider to something like 10% tolerance of the point you pick and exclude any colors that are more than 15% off the red hue you select. If you do the same with brightness, 10% inclusion, 15% exclusion, it's going to leave out the highlights and shadows you want on the car body. However, instead of including nearest 10% in terms of brightness, you can include all of the reds no matter their brightness. When I say all, I mean 100% tolerance for red brightness: darkest to lightest. By sliding the left-hand tolerance bracket for brightness up to 100, there is no exclusion. So if you want all that red, no matter how bright or how saturated it is, set the tolerances for everything else to 100, and they're out of the way. Now you can get the hue just right and get everything you want and nothing you didn't. If you need to, you can slowly start to exclude some areas of brightness, saturation or transparency by sliding them to the left a little.

In real world examples, this is usually how it goes. There's one main color criteria you're aiming for, and the others you want out of the way. However, you usually need to exclude a little bit (meaning, push the sliders to the left a little bit) from the other color criteria to get the best selection.

The Extremes

The most extreme settings should help demonstrate how this works while you're trying it.

If you push all the sliders to the right, you pick all the pixels. If you push all the sliders to the left, you usually only pick that one pixel you clicked on. In the first case, you've set the relative tolerance to 100%, in the second, you pushed the tolerance to 0%. If you push the left-hand bracket of each slider all the way to the left and the right-hand brackets all the way to the right, you partially pick all the pixels: 0% tolerance and 0% exclusion means that a gradient is placed on everything but nothing changes completely.

Try testing these examples and use the plain color action on the selection to see the gradients and the extreme examples I just mentioned. the last one with tolerance and intolerance both set to 0 is interesting, kind of a bug really.


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 25, 2004 8:36 am 
Offline

Joined: Wed Mar 17, 2004 5:58 pm
Posts: 51
Location: Port Angeles, WA
Thanks, Joel! That was quite the wand tutorial, and will definitely save me some frustration next time I try to use it :).


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 25, 2004 3:23 pm 
Offline

Joined: Mon Mar 15, 2004 3:55 pm
Posts: 112
Location: Houston, TX
That was great, Joel! If you have more, keep 'em coming, please! If you get me and many others over the hump of understanding Tiffany, I think you'll generate more sales of it. ;)


Top
 Profile  
 
 Post subject: Examples to come
PostPosted: Wed May 26, 2004 11:21 am 
Offline
User avatar

Joined: Mon Mar 15, 2004 5:56 pm
Posts: 252
Location: Durham, NC, USA
I tried to be fairly precise with my words, so it reads like a legal document. :lol: :roll:

I'll try to put together some examples of this stuff with screenshots or a PDF with the process tonight. I think it's much clearer when you see certain settings for the magic wand and you see the results in the image side by side, especially when you're dealing with the more complex stuff.

There are some other tricks like using the undo action with a brush so you don't have to nit-pick about exactly what's selected.

Later....


Top
 Profile  
 
 Post subject: Quick Examples PDF
PostPosted: Wed May 26, 2004 6:50 pm 
Offline
User avatar

Joined: Mon Mar 15, 2004 5:56 pm
Posts: 252
Location: Durham, NC, USA
I've attached a few quick examples showing uses of the Magic Wand tool. I picked a simple gradient sky background and used the Simple Paint tool to show how pixels were picked.

You can see on page 2 that the first guess of using just one factor didn't do a perfect job. Page 3 shows that using different values of inclusion (tolerance) and exclusion (intolerance) creates a different result. In this case, the result s somewhat speckled because the pixel gradient in the sky has sensor noise in it. The last example gets you pretty close to getting all of the sky and none of the buildings. It could have been tweaked to get a smoother line between them. In fact, I would usually try to overdo the selection area just a little. I'll explain why in a bit. Notice how this last example uses just a tiny bit of intolerance with the hue variable and uses a lot of the brightness variable.

Remember where you click to mark the basis of the magic wand selection makes a difference. If I click lower, I will start to miss the darker blue at the top of the picture. If I click up in the darkest, bluest sky at the top, I miss the light sky against the buildings. I picked somewhere in the middle of what I wanted. It can take an extra attempt or two to get it right but can save yourself some frustration by paying attention to this.

Another tip: if you pick a few too many pixels, don't bother tweaking the magic wand settings much. Use the Undo action and the brush to "erase" the previous action from these few unwanted spots. You might hide or turn off the selection area when you do this.

You can spend 20 minutes trying to get just the right settings for the magic wand. Try using a few other tools like these to fix up the loose ends instead. It's like breaking down a complex problem. You can try to solve it in one big gulp, or you can break it down into a series of simpler problems that are easier to swallow. :)


Attachments:
TIFFany_Magic-Wand.pdf [758.43 KiB]
Downloaded 599 times
Top
 Profile  
 
 Post subject:
PostPosted: Wed May 26, 2004 7:58 pm 
Offline
User avatar

Joined: Mon Mar 15, 2004 8:45 am
Posts: 140
Location: Minnesota
Well, here are my baby steps on this process. I noticed that you have the colors pallet open to the HSB sliders in your images... are you using the magnifying glass selector to find the differences between the different regions of the area you want to select so you can make the wand adjustments?

By the way, thanks for all the time your putting into this! :D


Attachments:
TIFFany_wand_tries.pdf [684.91 KiB]
Downloaded 620 times
Top
 Profile  
 
 Post subject:
PostPosted: Thu May 27, 2004 10:53 am 
Offline
User avatar

Joined: Mon Mar 15, 2004 5:56 pm
Posts: 252
Location: Durham, NC, USA
I realized in a nother thread here how I almost gave up on TIFFany, and could have used something like this. Caffeine's tutorials do help quite a bit too.

I only had the color picker open to choose the green. Green only because it would make the selection fairly obvious. The examples were quick and dirty. I didn't used the magnifying glass to spot colors or anything. In some cases I click two or three times until I got a better exmple, but overall, not much effort. A little goes a long way with regard to those tolerance/intolerance numbers, which is why, along with having a lot fo close control, you can't get too persnickety about getting exactly what you want. You can always pull back a bit with undo.

Is that Rhapsody or OS X Server 1.0?! :D


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 27, 2004 11:33 am 
Offline
User avatar

Joined: Mon Mar 15, 2004 8:45 am
Posts: 140
Location: Minnesota
Joel wrote:
Is that Rhapsody or OS X Server 1.0?! :D


Those shots were taken with Mac OS X Server 1.2 v3 (which is Rhapsody 5.6), but that version of TIFFany is the same one I'm running on my ThinkPad which has Rhapsody DR2 (which is Rhapsody 5.1) on it.

For those who are interested in Rhapsody, I have a major subsection of my site devoted to Rhapsody (here), which just happens to be made using Create (5.x and 10.0) on Rhapsody systems. :D

I remember seeing some pages on the Caffeine site that demoed how TIFFany worked and I'm most likely going to print out the manual that came with 3.5.

I'm trying to get as good with TIFFany as I am with Photoshop (which may take some time I see). I'm also trying to get good enough to do a write up on TIFFany (and PixelNhance) for an upcoming NeXT eZine... something which you seem far more qualified to do than me I might add (hint, hint ;) ).

The OPENSTEP and Rhapsody versions of TIFFany3 are pretty much like the Mac OS X version, and the TIFFany2 version for OPENSTEP and NEXTSTEP (2.4 was released for free for users of those systems) seems to have much of the same foundational stuff as the current version. So this seems like the perfect place to learn. :D


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group