4
$\begingroup$

In compositor I want to apply color balance node only on a part of image for which I have a mask. I have issue with combining original image with modified part so that a colors aren't mixed together but they're replaced (in place of the mask) How can I achieve this effect?

$\endgroup$
0

2 Answers 2

2
$\begingroup$

Based on the information in your question I am assuming you already created the mask.

Instead of combing the two results after you have colored corrected the one you could restrict the color correction to a specific region.

To do this feed the mask into the Fac Input of the Color Balance Node.

enter image description here

You can also use an image as a mask. Plug the image into the Fac Input of the Color Balance Node. Note that white means apply, black mean ignore. THis mean that the color balance will only be applied where the image is white. In my case I had to invert the colors to only apply the color balance on the scribble.

enter image description here

$\endgroup$
5
  • $\begingroup$ Thanks! I don't know how but I quite forget to factor in color balance node. I was mixing original image with modified. I thought I could replace part of image with one of the blending type from color mix node.. But it seems that there's no "replace" blending type in color mix node $\endgroup$ Commented Mar 2, 2014 at 23:27
  • $\begingroup$ @user2694295 You could do it that way if you used the Mix blend mode with a B/W mask as the mix factor. However it's better to use the factor on the color correction node. $\endgroup$
    – gandalf3
    Commented Mar 3, 2014 at 0:32
  • $\begingroup$ @gandalf3 you could, but the method I posted is better because it limits the computation the desired area. No need to compute pixel that will get thrown out anyway. $\endgroup$
    – Vader
    Commented Mar 3, 2014 at 0:36
  • $\begingroup$ @Vader I agree 100%, but I thought I would add that mix can be used to "replace". $\endgroup$
    – gandalf3
    Commented Mar 3, 2014 at 0:38
  • $\begingroup$ @gandalf3 okay. fair enough. $\endgroup$
    – Vader
    Commented Mar 3, 2014 at 0:39
1
$\begingroup$

Vader's answer is better in this case, however it is possible to do this using the mix node by using the mask/black and white image as the mix factor: (click for full size)

enter image description here

This works because the mix factor is controlled per-pixel by the black and white mask.
White = mix factor of 1 and black = mix factor of 0. So the bottom input will be used where the mask is white and the top input will be used where the mask is black.

Split view of the mask:

enter image description here

$\endgroup$
2
  • $\begingroup$ Thanks for that! I've not ever been 100% sure how mix blend type works, until now... One question to be sure: Putting mask as factor to mix node would be working only with BW image? Or if I connect RGB image as a factor to mix node, values of black and white will be determinate from the rgb color values? Actually if I do that, it does not work as far as I connect colored image $\endgroup$ Commented Mar 4, 2014 at 23:30
  • $\begingroup$ @user2694295 It will convert the RGB information to BW (you can get the same result by using an RGB to BW node) The mask does not have to be completely BW, but remember that the brightness is what sets the mix factor. So 50% gray is a mix factor of 50% (or .5). $\endgroup$
    – gandalf3
    Commented Mar 5, 2014 at 21:12

You must log in to answer this question.

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