2
$\begingroup$

Newbie Question:

Below is an image texture of a brick wall with a black mortar: enter image description here

Using node editor, is there a way to change the black mortar to white without changing the original color of the wall?

$\endgroup$
3
$\begingroup$

You can use a setup similar to this answer.

Since the target color is black, you can calculate the relative length of each channel, use a Math node set to "Less than" and tweak the threshold to mask the grout part.

Then use a Mix RGB set to Mix to set the grout color (here, white)

enter image description here

Result :

enter image description here

Since the grout is not pure black, you have to tweak the Compare node threshold to get the desired effect. Too little, and you have persisting black spots. Too high, and you begin masking undesired darker colors.

enter image description here

$\endgroup$
3
  • $\begingroup$ Awesome! It worked perfectly! You're a lifesaver! Thank you very much! $\endgroup$ – Ryou Sep 14 '20 at 7:07
  • 2
    $\begingroup$ If in ain't broke, don't fix it :) .. but IMHO, strictly speaking, things would be improved with a Length node in there $\endgroup$ – Robin Betts Sep 14 '20 at 12:48
  • 3
    $\begingroup$ @RobinBetts I tried adding the vector math length node and it indeed made it easier to adjust the texture. Thank you very much! $\endgroup$ – Ryou Sep 18 '20 at 2:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.