Desaturate a material/texture
3dOutlaw
Posts: 2,479
I want to take the output of a couple of the Visual Style shaders, and "desaturate" them, so that they render with less color. (for personal use of course)
Whats the best way to do that? I want to be able to save them, so I can use them on other characters. I cant find a setting in the Surface Editor to do it, so I was thinking added a brick in the Shader Mixer, right before the last brick, but which brick, and how to save that back as a new Shader is beyond me...?
Any thoughts?
Comments
Use a Binary Operation brick to take the dot product of the final colour with (0.3, 0.59, 0.11) and feed the result (which should be a plain number, despite the P (for point) on the output) into your root colour brick. If you want to partially desaturate, use a Mix brick to blend the dot product with the original colour.
Here's the Mix brick added, with Alpha controlling the strength of the effect
This is perfect Richard, so now after adding that...how do I store it, so I can use it as a material from my content lib?
Apply it to a surface, then save a Shader Preset for that surface. You can also save the brick layout from the Shader Mixer File menu.
OK, so I got a Shader Preset for a surface, but these shaders would apply to any surface. Do you know of a way to save them as a shader preset that would apply to the "selected surface"? I tried toying around with the Script itself, where it said Case "SkinTorso", and applied the settings, but the loop is calling that routine, and I tried a lot of things, and it either applied to that one surface, or to the whole figure. :(
A Materials preset is for applying to certain named surfaces, a Shader preset is for applying to any selected surface on any selected item. Both will save brick layouts.