2
$\begingroup$

I have a texture I want to change the colour of but I only want the 'coloured' part of the texture to change. In the example I want to change the colour of the green paint to another colour whilst keeping the original colour of cracks and dirt of the wall.

Altering the hue affects the whole texture and makes it look wrong, so how can I alter the hue of a specific colour or range of colour?

-Thanks!

texture

$\endgroup$
2
  • $\begingroup$ Easiest way would be to change it in an image editor. $\endgroup$
    – scurest
    Commented May 26 at 17:12
  • $\begingroup$ Any way to do it within blender? Just to keep everything quickly editable and flexible without having to jump back and forth between different software? $\endgroup$
    – spiffy14k
    Commented May 26 at 17:56

3 Answers 3

3
$\begingroup$

Like advised in the comments, I think a proper image editor would give better results more easily. Plus, using nodes will add some compute time.

But it is possible to achieve some decent results with Blender's shading nodes still. There are two things to do: recolorize, and make a mask to delimit the area of action.

Recolorizing is easy, mostly just using the Mix node set in Color mode and Hue blending is often all that's needed:

enter image description here

Making a mask to chose where to recolorize is the tricky part, as Blender doesn't have a specific node for that. And while you can use more nodes to try and make your own color based filter, it remains a bit clunky to use. Here i shamelessly reproduced a setup from this video: HOW TO Color Mask in Blender Shader⬅️ No Photoshop Needed! - YouTube

enter image description here

enter image description here

It's better, but still annoying compared to what you could do in an actual photo editing program with more complex effects, selection masking, painting and whatnot.

$\endgroup$
2
$\begingroup$

Others have answered this perfectly well, and more thoroughly than this. As they say, you need some sort of measure of 'distance' from the colour you want to change, to modulate that change.

This post is just to suggest that often, for convenience, a good measure of distance is Distance itself:

enter image description here

Here. distance from the dominant green:

enter image description here

$\endgroup$
1
$\begingroup$

If the hue of the color you want to change is different enough from the hue of the color you want to keep, you can try a setup where you use a Separate Color node set to HSV. You can then plug the Hue output into a Color Ramp and try to isolate the hues like in the following example:

separate by hue

This hue separation you can then use as a mask to change the hue of the green part by plugging it into the Fac of a Hue/Saturation/Value node:

change hue

Or you use it as factor in a Mix Color node to color the green part with a different color:

mix color

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .