3
$\begingroup$

Upon reading this post the inpaint node is mentioned.

The manual for this node is still on the "to do" list...

So, What is the purpose of this node and how do I use it?

$\endgroup$
3
$\begingroup$

The Inpaint node will extend the borders in an image into transparent or masked regions. The distance setting determines how far the edges will be extended into the transparent region. For example, in the image that follows, the background is transparent being generated by masking out a cube. Baseline image

The compositor was setup to use an Inpaint node to generate this image with the image extended into the transparent region by a distance of 100. Inpaint image

The compositor setup is shown below: enter image description here

This is useful for pixelation (referenced postreferenced post) and cleaning up edges when post processing images.


The blend file used for this example is at

$\endgroup$
5
$\begingroup$

InPainting is provided to solve problems like "wire removal" and holes created during chroma-keying as shown in the image here. To make this example clearer, I've used a fake wire (and a fake object) but in reality you'd normally use fine, chroma-keyed wires. This isn't the only way to remove wires of course, but it's a simple one.

You can use motion tracking to do the same thing - the point is when the wire has been removed you're left with a small hole in your frame. For a single image this isn't that much of an issue and could be filled in with Photoshop (later versions have InPainting as part of the healing brush), GIMP, Krita etc.

However, if this is a video you've got 24 - 30 frames for every second of footage and that's a lot of painting. As InPainting is done in the compositor, you don't have to worry, even for long sequences.

In the left image shows the "wire" in place and after chroma-key has been applied you'll see you're left with a blank space - it's shown as a black line here but it will be alpha in your blender output.

InPainting fills in a couple of pixels using the surrounding "background" and voila, your wire is removed. Note that the wider your "hole" is, the more noticeable this effect is! If you use more than a few pixels of infill, the effect is almost as irritating as the wire and your viewers won't be impressed.

As part of this demonstration I've left a little of the chroma effect visible so you can see there's no cheating. Normally, you'd look to get a perfect key.

Inpainting can also cover up a multitude of other minor sins such as control points for motion capture: use it sparingly and it will amaze.

Three stages of wire removal

$\endgroup$

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.