Masks

Invisible shapes that hide the 3D objects behind them, so a real table or a doorway can appear to stand in front of your character.

What a mask is

A mask is a shape you cannot see. It has no colour and casts no picture of its own. Its only job is to hide every 3D object that is behind it, as seen from the camera. Where the mask covers an object, you see the background instead.

In 3D programs this is called an occlusion mask. "Occlusion" means one thing blocking the view of another.

The typical use is Augmented Reality. In AR your 3D objects are drawn on top of the camera picture, so they always look as if they stand in front of everything real. A character that walks behind your real sofa is still drawn over the sofa. Put a mask where the sofa is, and the part of the character behind it disappears. It now looks as if the sofa is in front.

The same trick works on filmed footage: a 3D object placed in a recorded room can pass behind a real pillar if a mask stands where the pillar is. See Environment Recorder.

The two masks

AssetShapeUse it for
Box MaskA box.Tables, walls, door frames, boxes, screens. Anything with flat sides.
Circle MaskA ball.Round things: a ball, a head, a lamp, a round pillar seen from one side.

Both come with Naomi and are free. You find them in the Assets library, in the Default section.

Use a mask

  1. Open the Assets library and tap Box Mask or Circle Mask in the Default section.
  2. The mask appears in the scene. You see its handles, not its surface. If you see nothing, hold the pie key, touch the view and choose show effectors.
  3. Select the mask and move it to where the real object is. Use translate and rotate in the pie menu. See Selection & moving objects.
  4. Choose scale in the pie menu and stretch the mask until it is about the size of the real object. Drag one coloured box of the gizmo to stretch in one direction only.
  5. Move a 3D object behind the mask and look from the camera. The covered part is gone.
Tips

The mask only has to match the real object from where the camera looks. It does not need to be exact everywhere. For a complicated object, use several masks side by side.

What you can do with a mask

  • Animate it. A mask takes keyframes like any object. If the real object moves in your footage, move the mask with it.
  • Switch it on and off. On the Node card in the Inspector, the Active switch turns the mask off and on. Flipping it adds a key, so a mask can work for only part of a shot.
  • Attach it. With a Parent Constraint a mask can follow another object. See Constraints.
  • Copy it. Select it, hold the pie key and choose selection..., then duplicate.

Limits

  • A mask hides 3D objects only. It does not change the camera picture or the filmed footage behind them.
  • It hides what is behind it. An object in front of the mask stays fully visible. If nothing disappears, the object is probably closer to the camera than the mask.
  • There are two shapes, a box and a ball. You cannot draw a mask freehand or turn your own model into one.
  • A mask has no soft edge. The cut is sharp.
  • Masks are made for AR and for filmed footage. In an ordinary scene what shows in the hidden area depends on the background, so check the result in your view before you rely on it.

What next