Hue Shift (like photoshop) Effect

Blitz3D Forums/Blitz3D Programming/Hue Shift (like photoshop) Effect

Well this behavior isn't seen in photoshop because they can do stuff like convert from RGB to HSV and back. So they can adjust the hue, without affecting the saturation or the value components of the image.

If you could find some way to split an image into hue saturation and value channels, and alter the hue channel as desired, and then recombine them, then maybe you could do what you're trying to do.

Value is easy enough, that's a black and white version of your image. Saturation... That one's not so easy to define. You can have dark pixels which are less saturated and light pixels which are less saturated. Maybe if you laid down the hue layer first, then added a saturation layer to that where white is least saturated, and then applied the value on top of that with multiply? The hue layer would be pixels that are full brightness hues, so (255,0,0)..(255,255,0)..(0,255,0) and so on.

But how do you then adjust the hue layer? Once again you seem to have the same problem with either white showing up, or ending up with half-bright primary colors.



I played around with photoshop a bit to see if I could figure out a way to get the effect you want with the color channels like you have now, but I failed there. I used the channel mixer to create a version of the image that looks like a hue adjustment of -120. So I moved the red channel to the green, the green to the blue, and the blue to the red. I had that on a layer over the original. I could then experiment with layer blending styles to try to find a way to blend between the two that would create a result that looks like a hue adjustment of only -60.

The closest I got was to set the modified layer to 50% transparency, and normal blend with the original. The result was the right hues, and the right brightness level, but they were desaturated by 50%.

Nothing else I tried worked.

I tried cutting the brightness of both layers by half and adding them and that didn't look right at all. Desaturated and super contrasty. And simply adding them didn't work of course. Nice saturation, but everythng overbrightened.

There was no point in playing around with most of the blending modes offered, since the only ones you have to play with in Blitz are multiply, add, and alpha. So those are the ones I tried to get to do the job. But no dice.