View Full Version : HSB adjustment doesn't work right
I'm trying to adjust just the S of the HSB colorspace.
I'm setting up a sequence of squares, each with the same Hue and Brightness, but a gradual change of Saturation in 20% steps.
When I then "Desaturate" or adjust the "Hue/Saturation" sliders to -100 I SHOULD get six squares, all with the exact same HSB.
However, PS seems to be making the Saturation adjustments based on RGB, not HSB, and so I end up with sex squares of varying brightnesses.
How can I JUST change the Saturation in PS?
Thanks.
| |
Stroker
12-12-2004, 05:08 AM
A kind of easy way of doing this is with Black to Yellow (for visual reasons).
Pure Black = RGB(0,0,0) = 0% Sat
Pure Yellow = RGB (255,255,0) = 100% Sat
20% Sat = RGB(51,51,0)
40% Sat = RGB(102,102,0)
60% Sat = RGB(153,153,0)
80% Sat = RGB(204,204,0)
Put those on a layer how you want them.
Set blending mode to Sat.
Then, if you want, clip a Levels or Curves adjustment layer.
So, to desaturation the whole thing, just use the adjustment layer.
Will that do ya?
A kind of easy way of doing this is with Black to Yellow (for visual reasons).
Pure Black = RGB(0,0,0) = 0% Sat
Pure Yellow = RGB (255,255,0) = 100% Sat
20% Sat = RGB(51,51,0)
40% Sat = RGB(102,102,0)
60% Sat = RGB(153,153,0)
80% Sat = RGB(204,204,0)
Put those on a layer how you want them.
Set blending mode to Sat.
Then, if you want, clip a Levels or Curves adjustment layer.
So, to desaturation the whole thing, just use the adjustment layer.
Will that do ya? Using your numbers results in adjusting Brightness not Saturation. :(
hang on your not making sense, so it wont work...this is why...
I'm setting up a sequence of squares, each with the same Hue and Brightness, but a gradual change of Saturation in 20% steps.
ok, so adjust the saturation...but then you say
PS seems to be making the Saturation adjustments based on RGB, not HSB, and so I end up with sex squares of varying brightnesses. of course ! your changing the saturation...not the brightness as you mention...those will still be different because saturation is different from brightness ie you'll end up with different levels of grey
so what do you want do actually do?
hang on your not making sense, so it wont work...this is why...
I'm setting up a sequence of squares, each with the same Hue and Brightness, but a gradual change of Saturation in 20% steps.
ok, so adjust the saturation...but then you say
PS seems to be making the Saturation adjustments based on RGB, not HSB, and so I end up with sex squares of varying brightnesses. of course ! your changing the saturation...not the brightness as you mention...those will still be different because saturation is different from brightness ie you'll end up with different levels of grey
so what do you want do actually do? If each square has the same Brightness level, why should Brightness change if I change Saturation?
For example:
HSB -> 0,100,75
HSB -> 0,80,75
HSB -> 0,60,75
HSB -> 0,40,75
HSB -> 0,20,75
HSB -> 0,0,75
You will end up with a series of red squares that gradually become grey. As you can see, all Brightness levels are the same.
If I create an Adjustment Layer for "Hue/Saturation" and bring Saturation to -100% then each square should be the exact same as the last square (h0,s0 & b75) because neither Brightness nor Hue is changed.
Instead you end up with all six squares with Hue and Saturation values at 0, but Brightness levels are changed, ranging from 37% to 75%. This should not happen.
It seems obvious to me PS is not actually working in HSB space when I make HSB adjustments.
Do you, or anyone, know of a way to actually work in HSB in PS? Thanks.
Stroker
12-12-2004, 03:22 PM
The Eyedropper doesn't work entirely in HSB. Rather, it's got some human perception and other weird things tossed in.
For this kind of thing, don't trust the Eyedropper.
What I posted works fine for me - within certain limitations.
Now, there is a connection between B/L and Sat.
For example, Sat = 100% only when B/L = 50%.
If B/L = 75%, then Sat has a maximum of 50%.
Human perception aside, changing one can change the other.
I'll see about putting together some stuff to illustrate this.
Stroker
12-12-2004, 04:39 PM
Cman, are you using Windows?
Stroker
12-12-2004, 05:06 PM
Try this.
Do the Black <> Yellow thing.
Set to Saturation.
Now add the Lum back in.
New Layer.
Fill with greyscale using the Lum value you want.
Set to Luminosity.
I have some ideas to work out.
I'll be back to explain some junk.
ah sorry cman, misread it.
working in RGB colour space? because then HSB is a virtual measurement made from RGB values...your adjustments are also relative to the original pixel value, not the total range of that adjustment...this combined with their conversion back to RGB means that red desaturated stays grey not white, otherwise if you desaturated a photo you could end up with some very odd effects as colours percieved as strong reds, blues or whatever had max brightness would become white even though the eye doesnt see them as that bright. Kinda makes sense when you think about it.
fwiw there is a HSB plugin that used to ship with PS, that may behave more to your expectations.
Stroker
12-12-2004, 08:44 PM
Okay...
I'll be using Lum to mean B in HSB. Not proper, but it's the way I talk.
Max = Max(RGB)
Min = Min(RGB)
In HSB:
Sat = Max - Min
Lum = (Max - Min) / 2
Let's take a little slice of HSB:
http://cablespeed.com/~jlhalmich/ozone/hsbchunk.jpg
On the left, Sat is high. As you go right, Sat gets lower all the way to greyscale.
The vertical is Lum. High Lum is along the top and low Lum in along the bottom.
So, at the very tip on the left, the pure yellow is Lum=50% and Sat=100%.
However, PS's Eyedropper will tell you otherwise.
:bleh:
Again, for stuff like this, don't trust the Eyedropper.
If you were to manually extract Sat on that triangle, you would get white on the left where the yellow is, and it would fade to black as you move to the right.
Now, that triangle also shows some of the 'interdependence' of Lum and Sat.
For example, Lum=75% can have a maximum Sat of 50%.
If you raise Lum higher than that, the maximum Sat becomes lower.
The inverse is true for Lum=25%.
Once you start to understand that, manipulating Sat and Lum with predictable results becomes *tons* easier.
Then there is kind of an 'order of operations' thing.
This is kind of why I recommended using another layer to put Lum back in after your Sat operations.
Do your Sat stuff, then let PS re-adjust the Sat appropriately based on Lum.
Hmm...
Okay, I figured out how to make it work.
The problem is that somehow, by actually typing in the Saturation change, PS gets messed up.
To make this work correctly you have to let PS make the Saturation change, by using Hue/Sat on each cube.
Ironically, by doing this the Sat AND Brightness are changed. But the end result is that if you then Desaturate the image the Brightness values are brought back to equal value.
Stroker
12-14-2004, 03:03 AM
Glad you found a way that works. Kudos.
Sure is fun, isn't it?
Fly3D
12-14-2004, 05:39 AM
Stroker, I've had a few battles with HSB myself in the past. Your triangle illustration just made about the most sense I've seen. Thanks man. It's been etched into my brain for future reference.
yep cman, sorry i dont think i made that point clear....the saturation slider is a % slider...its a % of the original pixel colour...as you are selecting more than one colour, PS will average it out and adjust the sat % based on that average.
Stroker
12-14-2004, 02:01 PM
Here are two threads with lots of HSB chat:
HSB Stuff (http://www.ozoneasylum.com/23872)
development of saturation mask (http://www.photoshoptechniques.com/forum/showthread.php?t=10495)
Some info is working with HSB in PS and some is nitty-gritty nuts-n-bolts type stuff.
Thanks for the links. :thumbsup:
CGTalk Moderation
01-20-2006, 04:00 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2009, Jelsoft Enterprises Ltd.