1
$\begingroup$

Can I use blender to take an existing jpeg image and mask certain areas out of that image?

I'm still very new to Blender and I've searched this topic, but all Q&A's seem to be about masking objects in a 3D setting. I'm wondering about masking a certain part of a 2D image so that I can use the image as a background on an animation, such that the elements of my animation show "through" the masked out areas.

Any help would be appreciated. Thank you for reading.

$\endgroup$
  • $\begingroup$ You can also paint an alpha channel into the object's image texture slots. Another crude way is to heavily subdivide the mesh and delete all the faces you want to have masked out. $\endgroup$ – 3pointedit Oct 17 '16 at 23:02
  • $\begingroup$ Why don't you use Photoshop for masking? That could be easier and perfect than any others. I always prefer Photoshop for this kind of editing. $\endgroup$ – Danisa Rais Jan 17 '17 at 9:51
3
$\begingroup$

Blender's compositor can be used to mix together video and still images. The render output of a 3d scene doesn't have to be used in the compositor, any image or video can be input and placed on top of another using a mix node.

A transform node can move and resize the image. A mask can then be used to cut out part of the image you are adding, box and ellipse mask nodes are available in the compositor, you can also create odd shaped masks in the UV/Image editor which can be animated if you want the mask to move or distort over time.

sample compositor

$\endgroup$
1
$\begingroup$

1 - Import your photo as "Image as planes", create an object for masking purposes and assign him the "Wire" maximun display; set a rendering size (maybe the same as the photo), create a camera, set it to "ortographic view", clear her position and rotation (ALT G, ALT R), move it on the Z axis to have it over the photo (distance doesn't matter in ortographic view, control the size of your camera view with the "ortographic scale" instead).

enter image description here

2 - Press numpad 0 to enter camera view, adjust the mask, assign the mask to layer 2, create a new render layer, assign layer 1 to render layer 1 and L2 to RL2; assign an emission material to both the object (cycles) or shadeless (BI), intensity 1, color of the mask pure white, turn off any kind of lighting and render the scene.

enter image description here

3 - Switch to the compositor, duplicate the render layer node and set his output to Render Layer 2 (the mask). Use this output to control a "set alpha" node. Normalize is for assuring that black is pure black and white pure white; Invert to invert the effect of the mask; Fast Gaussian blur to have some "Feather edges" effect.

Works also with movies and animated masks!

enter image description here

$\endgroup$
-4
$\begingroup$

This is probably a problem you can solve using the compositor. Although I would do the "masking" using GIMP and save the modified image as a PNG for use in the compositor.

https://www.blender.org/manual/compositing/introduction.html

$\endgroup$
  • 1
    $\begingroup$ I don't think this really answers the question unless you specify how you do this in the compositor. $\endgroup$ – Ray Mairlot Sep 16 '16 at 19:33
  • $\begingroup$ @Mutant Bob, OK I will give both the compositor and GIMP a try. I always think the more techniques I learn the better. Thank you so much for posting the link. $\endgroup$ – JakJak Sep 16 '16 at 20:24

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.