Masking / Mask
What is Masking / Mask?
A Mask is a defined area within an image that controls where an edit or AI generation applies: like using a stencil to paint only specific parts of a picture while protecting everything else from being changed.
At a glance
- Also known as
- Selection maskAlpha maskInpainting maskRotoscope mask
- Used for
- Defining areas for targeted AI inpainting and regenerationSeparating subjects from backgrounds in compositingApplying colour grades or effects to specific image regions only
- Common tools
- Adobe photoshopAfter effectsDaVinci resolveAI generation platforms with inpainting toolsAutomatic subject detection tools
- Related terms
- InpaintingCompositingLayer/LayeringRotoscopingChroma keyAlpha channel
Ready to create?
Direct scenes, design characters, and ship full films
All-in-one AI creative platform with simple, transparent pricing, no speed throttles, and an infinite Canvas for max creativity.
How it compares
Compared with related concepts
Masking differs from full-image operations in its spatial precision: rather than applying a change globally to the entire image, masking constrains the operation to exactly the region where it is needed. This precision is what makes masking essential to professional compositing and AI generation refinement workflows. Without masking, every correction requires full regeneration or global adjustment; with masking, corrections can be applied surgically to exactly the area that needs them.
Think of it like…
A mask in image editing works exactly like a physical stencil: it defines the shape through which paint can reach the surface, protecting everything outside that shape from being affected. You can apply any treatment through the stencil's opening, and nothing outside it changes.
Pro tip
When using masks for AI inpainting corrections, paint the mask slightly larger than the specific problem area: including a small border of surrounding good content within the mask helps the model understand the context and blend the regenerated area more convincingly into the surrounding composition rather than producing a sharp, visible boundary between old and new content.
Types and variations
Mask types include hard masks with sharp, defined edges between affected and protected areas; soft or feathered masks with a gradual transition zone that blends the effect more naturally into surrounding content; luminance masks that are generated from the brightness values of the image itself, protecting highlights or shadows selectively; colour range masks that protect or isolate specific hues; and AI-generated semantic masks that automatically detect and outline specific content categories like people, sky, or objects.
Ready to make your first scene in Morphic?
Try MorphicCommon use cases
Masking is used for inpainting corrections in AI generation workflows to fix specific problem areas while preserving successful regions, for background replacement in compositing by masking the foreground subject, for targeted colour grading adjustments in post-production, for visual effects application to specific scene elements, for extending images through outpainting by masking the new canvas area, for replacing product labels, text, or brand elements in advertising imagery, and for any editing task requiring precision application of a change to a specific part of a composition.
Ready to create?
Direct scenes, design characters, and ship full films
All-in-one AI creative platform with simple, transparent pricing, no speed throttles, and an infinite Canvas for max creativity.
FAQs
A mask is a defined region within an image that specifies where an effect, edit, or AI generation applies. Areas within the mask receive the applied change; areas outside it are protected and remain unchanged. Masks enable precise, localised editing: the surgical application of changes to exactly where they are needed without affecting the rest of the composition.
In AI generation, masks define the specific area of an existing image that the model should regenerate: the mask specifies what to change while the unmasked area is preserved exactly as it is. This allows targeted correction of specific problem areas (a misformed hand, a wrong background element, an off-putting face) without regenerating the entire image and risking the loss of successfully generated elements.
A hard mask has a sharp, clearly defined boundary between the masked and unmasked areas: effects apply at full strength up to the edge and stop completely beyond it. A soft or feathered mask has a gradual transition zone where the effect fades out progressively, blending more naturally into the surrounding image. Soft masks are generally preferred for compositing and inpainting where sharp boundaries would create visible, unnatural edges.
Masks can be created manually by drawing or painting the region by hand; automatically through subject detection algorithms that identify and outline recognisable content; through colour range selection that masks specific hues; through luminance range selection that masks highlights or shadows based on brightness; through chroma key operations that isolate specific colours like green screen footage; and through AI segmentation tools that automatically detect and separate content categories like people, sky, or vehicles.
An alpha channel is a fourth channel in an image file (alongside red, green, and blue) that stores transparency information: which pixels are fully opaque, fully transparent, or partially transparent. The alpha channel functions as a mask that defines what is visible when the image is composited over other content. Saving a mask as the alpha channel of an image file allows it to be used for compositing in any compatible application.
Outpainting extends an image beyond its original boundaries by adding new canvas space at the edges and using AI to fill the extension coherently with the existing content. Masking enables outpainting by defining the newly added blank area as the region for the model to fill: the existing image content is masked as protected, and the new empty area is masked as the region to generate, prompting the model to extend the composition naturally from the established content.
For inpainting corrections, the mask should cover the specific problem area plus a small border of surrounding good content. This border context helps the AI model understand what the corrected area should blend with, producing a more natural and seamlessly integrated result. If the mask is exactly at the edge of the problem area with no surrounding context, the model has less information about how the regenerated content should blend into its surroundings.
Rotoscoping is the process of manually drawing masks frame-by-frame around moving subjects in video footage to create animated masks that track the subject's movement over time. Originally a hand-drawn process, modern rotoscoping uses AI-assisted tools that can semi-automatically track and mask moving subjects across many frames, significantly reducing the manual effort. The resulting animated mask allows the masked subject to be treated independently from the background throughout the clip.