Question on Adjust Saturation Color Shader

Started by JasonA, August 20, 2012, 09:30:51 AM

Previous topic - Next topic

JasonA

Hi all,

I have a scene where ive loaded alot of image map shaders to project on to some terrain, but I feel that they are coming out looking too saturated.    I wanted to avoid loading all my textures into photoshop repeatedly tweaking saturations and saving over and over again.   I found this node called "Adjust Color Shader" and I used a Constant plugged into it to controls its level.  Problem is, when I connect it after my shader networks, the terrain is immediately flattened. 

How can I use this node properly without killing the terrain.

ALso, I see that this node is blue in color, not red like other shaders.  What does the blue mean.  Is this a hint as to how I need to handle this shader in larger shader networks?

Tangled-Universe

#1
Little question, big answers in relation to how TG2 works.

The colour adjust node expects colour as input. Beware that expects does not mean accept. It also accepts displacement for example.
However, the node algorithm discards other info and only treats colour and also only outputs colour.
Consequently, displacement information is lost and you'll end up with a flat terrain.

So, never connect a colour adjust shader straight inbetween nodes in your main node network.
You can probably desaturate with a colour adjust shader, but I never tried that, because I only use it for changing contrast and curve of the input.
However, there are other ways I do know about.

What to do?

For every image map shader set up a surface layer and connect the image map shader as colour function to the surface layer.
Don't forget to give the surface shader a solid white colour (RGB 255, 255, 255 resulting in 1 as colour-value).
If the colour is white then the image map shader is multiplied by 1 and thus its brightness is unaffected for every RGB channel.

Hey, there's the first hint of how to selectively desaturate!

Why like this?

The surface layer input port accepts virtually everything and the output of the node is similar to the input.
Basically it means that a surfacelayer keeps the datastream intact and that the only things altered is the stuff you do with that surface layer.
In this case, adding colour.

How do I desaturate then?

1) An easy way, suitable for desaturating separate channels.
2) Another way, probably suitable for desaturating separate channels.

1) Remember that you made the surface layer pure white so that the input of the colour function is multiplied by 1.
Say that your image map is a grass texture and it is way too green.
If you adjust the surface layer's colour from pure white to RGB = 255, 128, 255 then the green channel is selectively desaturated since it won't be multiplied with 1 anymore, but with 0.5 (because ((128 - 255)/255)*100 = -50%)

2) connect a desaturate colour function node in between the image map shader and surface layer

This is a function node (blue) and basically only accepts input similar to output, although that isn't entirely true, but for now it works.

So it expects colour as input (your image map) and outputs the same colour which is desaturated.
The saturation is controlled by a 'constant colour' node and needs to have a value between 0 and 1.
Where 0 is complete desaturation and 1 is unaffected saturation (output = input).
A value of 0.5 (50% gray that is, or RGB 128, 128, 128) is 50% desaturation.

This affects all channels.

I'm not entirely sure, but maybe the trick of altering the colour in the constant colour node could also selectively desaturate a RGB channel.
I've never tested it for this function node.
But now that you probably understand the basics you can try it yourself ;)

Good luck!

JasonA

Thanks Tangled Universe! 

Im going to try it tomorrow but your response is awesome, I appreciate your explaining that in detail. 

Cheers
Jason