2
$\begingroup$

I had to correct parts of an animation. Which i solved by partial renders.

Those patial images have a large black areas for the black areas i would like to show the original image.

I kinda wonder if i do this correctly, because splitting rgb channels count their value compare it against a real low value.. isnt ideal (in terms of speed), i think blender can do this faster with a proper node group. How should a corect node group look like ?

enter image description here

$\endgroup$
3
  • 1
    $\begingroup$ Hindsight: Why didn't you render the corrected images to rgba, then you could simply overlay them with the alpha? Also: Less than 0.00000000 is never going to happen, since your minimum value is 0. So either input 0.00000001 or use a greater than 0 and swap the mix inputs. $\endgroup$
    – Leander
    Jun 11 '18 at 11:37
  • $\begingroup$ its 0.001 or so (pure black is zero), the idea was to work with alpha's but not all frames rendered OK, black seams to do the trick now, but i find this a strange setup, i know black isnt green as in green screen, but isnt there a simple way to replace by color ? $\endgroup$
    – Peter
    Jun 11 '18 at 11:46
  • $\begingroup$ This should be your setup for black. I find it simple enough, you don't need to manually add the channel values. There is a keying node, but that would be totally overkill. It is very strange that rendering with didn't work. That is the part of your workflow which needs improving. Otherwise you can also just use a mask if your rectangle is always the same. $\endgroup$
    – Leander
    Jun 11 '18 at 12:07
1
$\begingroup$

You can use the Distance Key compositor node (found under the Matte menu). This calculates a "distance" in color space from the specified color - which, in your case, you should set to pure black. You can set the Tolerance to a suitably small values eg, 0.001, and Falloff low for a sharp edge.

compositor

Using the Color output from the node will give you an image where the 'background' is converted to Alpha (which you should be able to simply 'Alpha Over' to overlay it over your original render) whereas the Matte output can be used as a Mix factor as you have used in your question.

$\endgroup$
3
  • $\begingroup$ strangely my node setup worked better, as some did render correct and had a transparant borders. Perhaps call me stupid but i thought there would be simply Green screen node. $\endgroup$
    – Peter
    Jun 13 '18 at 8:59
  • $\begingroup$ @user3800527 You may need to adjust the settings for your particular case (eg, lower Falloff) - depending on your source images. This is kind of a simple Green Screen node - but allowing for different definitions of ‘green’ (in your case ‘black’) and how sharp the cutoff edge should be (which can be dependent on antialiasing of your source image). The best results should be produced by using the Matte output with other nodes (such as Dilate/Erode and Blur) to manipulate the mask to produce the best edge cutoffs for your situation. $\endgroup$ Jun 13 '18 at 9:14
  • 1
    $\begingroup$ hm ok, i was experimenting with mate as well, never used it and ended up with my workaround, despite your answer didnt work in my case in general it would so i will accept your answer, people into similair problems can try out both methods and check what works for them. $\endgroup$
    – Peter
    Jun 13 '18 at 9:19

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.