Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

PS question: anti-aliasing and feathering

Ricky Shaftoe
Owner, "Rickymations"
Join date: 27 May 2005
Posts: 366
06-10-2008 09:32
I've been making a few bits of clothing, and I have a question about anti-aliasing. I like to use the Pen tool to make my shapes. I have read here that I should consider changing the Path to a Selection before filling it with color, and indeed making a selection allows me to verify that anti-aliasing is on and to control the feathering setting. But my question is this: if I want to set feathering to zero anyway -- because, say, I have sharp corners I wish to preserve -- does using a Selection rather than a Path make any difference? Put another way, when I draw with the Pen tools, is anti-aliasing on by default?

I ask because when I draw two identical shapes, one with Path/Fill and the other with Selection/Paintbucket-fill, I see no difference in the result -- unless I feather.

More generally, when is it a good idea to feather when making clothes? Even at 1 pixel radius, a little feather makes edges noticeably smoother and blurrier at the same time.
Ricky Shaftoe
Owner, "Rickymations"
Join date: 27 May 2005
Posts: 366
06-10-2008 09:37
Maybe one more question while I'm at it: if one does use feathering, does it matter whether one does it on the painted layer or on the alpha channel? Up til now, I've been doing it on the painted layer. In general, I try to follow Chosen Few's basic advice on making alphas: I paint everything first, then as a final step I select the painted areas and create an alpha from them. This works fine for the simple bikinis I'm making right now. I suspect I'll have to start editing alphas directly if I want to make more complicated garments, like camisoles with varying degrees of transparency.
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
06-10-2008 11:32
Let's clarify some terminology first. You seem to be using the word "selection" with multiple meanings. On the one hand, you're talking about using paths as tools for making selections, which makes sense. Then on the other hand, you also talk about "using a selection rather than a path", which makes no sense at all in this context.

"Selection" only has one definition. It is any part(s) of the image currently chosen in isolation from the whole. The methods and tools for forming a selection are many (paths, marquees, lassos, masks, wands, etc.), but a selection itself is just one thing.

So when you say "a selection instead of a path", what do you actually mean? I'm guessing you mean either a marquee or a lasso, since those are the tools people usually stumble across first, but really, you could mean anything. Care to clarify?

In any case, I think I can still answer your questions, even if I don't know exactly what tools you were talking about.

From: Ricky Shaftoe
But my question is this: if I want to set feathering to zero anyway -- because, say, I have sharp corners I wish to preserve -- does using a Selection rather than a Path make any difference?

If you're talking about using marquee or a lasso instead of using a path, then the answer is yes, it makes a difference, albeit a slight one. I'll explain.

Marquees and lassos are pixel-dependent. They select either whole pixels or nothing at all. There's no way to do a partial pixel selection with a marquee or a lasso.

Paths, on the other hand, are vector objects, and as such, are completely independent of pixels. They can cross partial pixels all day long, and they don't care.

So, when you use a lasso or a marquee to make a selection, you're grabbing whole pixels, and then if anti-aliasing is on, blending is done in post (I think). But when you use a path, you're able to grab partial pixels, and anti-aliasing is done at the same time as the selection. The results will end up looking very similar most of the time, but you'll find that for curved and/or steeply angled selections, those made via path will almost always appear smoother and cleaner than those made via marquee or lasso, especially if there's no feathering involved. For SL clothing, those kinds of selections are quite common, so the use of paths is usually preferable.


From: Ricky Shaftoe
Put another way, when I draw with the Pen tools, is anti-aliasing on by default?

Your question doesn't really make sense as worded. When you draw with the pen tools (assuming you're not in Fill Pixels mode), you're drawing vector objects, not rasters, so anti-aliasing has no relevance. When you force those those objects to interact with rasters by converting them to selections, that's when anti-aliasing starts to matter, not before.

In any case, yes, anti-aliasing is on by default when you convert a path to a selection. However, the default will be overridden by whatever setting you used last. So if you turned AA off the last time, and you want it on next time, make sure to turn it back on. Don't use the ctrl-click shortcut. Go back through the dialog and make your changes.

From: Ricky Shaftoe
I ask because when I draw two identical shapes, one with Path/Fill and the other with Selection/Paintbucket-fill, I see no difference in the result -- unless I feather.

Depending on the exact size and shape of the selection, there may or may not be a difference. Here's an example in which you can clearly see a difference:



There are two things to notice here. First, the path-generated circle is slightly smaller than the marquee-generated one. It's about 14.5 pixels across (at normal magnification). Notice the piexels along the right hand side are lighter in color than those on the left. That's because they were only partially selected.

The marquee-generated circle, though, is perfectly symmetrical. Since marquees are pixel-dependent, it was not possible to make one 14.5 pixels across. The only options were 14 or 15. I happened to choose 15.

Which circle is "better" would obviously depend on your needs at the time. If 14.5 pixels (or more accurately, the blended color-based illusion of 14.5 pixels) were a must, then the path would be the better option. If pixel-level precision, and perfect symmetry is needed, then the marquee would be the way to go. Make sense?

The second thing to notice is that there's a bit less "bleed" around the edges in the path-generated circle. This, I presume, is the result of the difference in the order of operations I mentioned earlier. The marquee-generated circle is composed of whole, solidly colored, pixels before AA is applied. Thus, it takes several rows of color-blended pixels to smooth things out. But since the path-generated circle is blended pixels right from the start, less further blending is needed.


From: Ricky Shaftoe
More generally, when is it a good idea to feather when making clothes? Even at 1 pixel radius, a little feather makes edges noticeably smoother and blurrier at the same time.

I think you answered your own question. If blurring will detract the look you need, don't feather. If it will enhance it, then do feather. There can be no rulebook of yes/no circumstances. It all depends on what you're making at the moment, and your own sense of aesthetics.


From: Ricky Shaftoe
Maybe one more question while I'm at it: if one does use feathering, does it matter whether one does it on the painted layer or on the alpha channel? Up til now, I've been doing it on the painted layer. In general, I try to follow Chosen Few's basic advice on making alphas: I paint everything first, then as a final step I select the painted areas and create an alpha from them. This works fine for the simple bikinis I'm making right now. I suspect I'll have to start editing alphas directly if I want to make more complicated garments, like camisoles with varying degrees of transparency.
From: someone


Good question. The instructions in the sticky were written for (hopefully) greatest ease of conceptual understanding. Most people tend to find it easier to think of the subject of the image as its own entity, as a starting point, rather than as an ending-point product of transparency and opacity. Therefore it's easier to explain the concept of the alpha channel as something to be added on at the end than as a means in and of itself to define the subject of the image, if that makes sense.

The only drawback to this order of operations is that it enables haloing. Hence we get into long discussions about the best ways to eliminate halos, and
de-haloing" steps are even written into tutorials. What we don't talk about as often is the fact that if you go the other way around, as you're proposing here, there will never be any halo to worry about in the first place. It seems your understanding is evolving past the tutorials, and that's great.

The answer to your question is it depends on what you're doing in each image. Sometimes it's better to do your feathering (or grading or blending, or whatever else you might do to transition smoothly from opacity to transparency) on the alpha channel, and sometimes it's better to do it in the color channels. Just as before, there's no permanent yes/no answer here.
_____________________
.

Land now available for rent in Indigo. Low rates. Quiet, low-lag mainland sim with good neighbors. IM me in-world if you're interested.
Ricky Shaftoe
Owner, "Rickymations"
Join date: 27 May 2005
Posts: 366
06-10-2008 15:12
Hiya Chosen,

As usual, your reply is clear and educational -- a far more enlightening reply than I expected! Thank you for taking the time to write it.

From: Chosen Few
Let's clarify some terminology first. You seem to be using the word "selection" with multiple meanings. On the one hand, you're talking about using paths as tools for making selections, which makes sense. Then on the other hand, you also talk about "using a selection rather than a path", which makes no sense at all in this context
....
So when you say "a selection instead of a path", what do you actually mean? I'm guessing you mean either a marquee or a lasso, since those are the tools people usually stumble across first, but really, you could mean anything. Care to clarify?


Ah, apologies for my sloppy terminology. I'm not using a marquee or lasso; I am using the Pen Tool only, to make a Path. Primarily I was asking about the difference between (1) using paths as tools for making selections, and (2) using the path and "filling it" directly, without making a selection out of it. But now that you mention it, I'm certainly interested in how the marquee tools behave too.

From: someone
Paths, on the other hand, are vector objects, and as such, are completely independent of pixels. They can cross partial pixels all day long, and they don't care.


Yep, this I understood, sort of. I actually started using Illustrator before Photoshop a few years ago, to illustrate a text-based adventure game I made. That's one reason I'm reasonably comfortable with the Pen tool. I like vectors! :)

It's your next couple points that I really was confused about -- e.g., this one:

From: someone
When you draw with the pen tools (assuming you're not in Fill Pixels mode), you're drawing vector objects, not rasters, so anti-aliasing has no relevance. When you force those those objects to interact with rasters by converting them to selections, that's when anti-aliasing starts to matter, not before.


That gets to the heart of my confusion. I didn't know if anti-aliasing had any relevance to a vector object. Now I know the answer: it doesn't.

I wasn't specifically asking about marquee-generated selections, but I loved your illustration. I'm going to fire up PS and play with a few of my own, following your example.

From: someone
Which circle is "better" would obviously depend on your needs at the time. If 14.5 pixels (or more accurately, the blended color-based illusion of 14.5 pixels) were a must, then the path would be the better option. If pixel-level precision, and perfect symmetry is needed, then the marquee would be the way to go. Make sense?


Yep!

From: someone
The second thing to notice is that there's a bit less "bleed" around the edges in the path-generated circle. This, I presume, is the result of the difference in the order of operations I mentioned earlier. The marquee-generated circle is composed of whole, solidly colored, pixels before AA is applied. Thus, it takes several rows of color-blended pixels to smooth things out. But since the path-generated circle is blended pixels right from the start, less further blending is needed.


Again, makes sense.

From: someone
I think you answered your own question. If blurring will detract the look you need, don't feather. If it will enhance it, then do feather. There can be no rulebook of yes/no circumstances. It all depends on what you're making at the moment, and your own sense of aesthetics.

Heh, I'm glad to hear that answer. I was doubtful that there was one "best practice," and you confirmed my intuition.

From: someone
Good question. The instructions in the sticky were written for (hopefully) greatest ease of conceptual understanding. Most people tend to find it easier to think of the subject of the image as its own entity, as a starting point, rather than as an ending-point product of transparency and opacity. Therefore it's easier to explain the concept of the alpha channel as something to be added on at the end than as a means in and of itself to define the subject of the image, if that makes sense.


Yep, I think your instructions are great as is. I actually walked thru all four methods to make sure I "got" it. You gotta walk before you run, y'know?

From: someone
What we don't talk about as often is the fact that if you go the other way around, as you're proposing here, there will never be any halo to worry about in the first place. It seems your understanding is evolving past the tutorials, and that's great.

Cool. Yeah, after making about 20 pieces of lingerie, each slightly less bad than its predecessor, I think I'm ready to experiment a bit more. Above all I just need to practice.

Incidentally, I'm using Photoshop CS3 Extended, with Robin's template for working with her 3D model. It's saving me some time and upload fees. The 3D preview isn't great -- it doesn't help me perceive differences in feathering, for example -- but it's good enough that one can spot bad seams and (mostly) correct them on the fly.