Skip to content

How do I check whether foreground objects stay in front of the character?

Use the source to establish which object is in front of which part of the performer at each overlap. Compare the approach, maximum cover and reveal in the output. A new face or jacket appearing over a desk that should hide it is a depth-order failure, even when the desk and character look plausible in separate crops.

PROTECT THE REST OF THE SCENEAISwapLab team · Editorial methodUpdated 4 min read
Try the workflowExplore 67 Image Skills4.44 free welcome credits · No subscription
Article workflow: Identify the specific overlap boundary; Inspect both sides of the boundary in motion; Choose acceptance or controlled boundary work.
Workflow diagram: Identify the specific overlap boundary → Inspect both sides of the boundary in motion → Choose acceptance or controlled boundary work. Read the article for evidence and limits.

Judge a moving boundary, not just the presence of two objects

A foreground plant, rail, table or another person's arm can obscure different body parts as the camera and performer move. The source defines that local relationship; a single universal foreground/background label may not cover the whole shot. Generative replacement can redraw an edge or reveal a body part that should remain hidden. This procedure inspects the scene relationship. It is not a claim that the person selector supplies a persistent rotoscoping mask or controls every occlusion boundary.

What to do next

  1. 01

    Identify the specific overlap boundary

    Choose one obstruction that matters to the action and follow its edge in the source. Record which body part it covers before, during and after the overlap. Confirm that the original footage makes the relationship readable. A dark sleeve beside a dark chair can be ambiguous, so use several neighboring frames rather than guessing from their most confusing instant.

  2. 02

    Inspect both sides of the boundary in motion

    Locate the same action in the result and watch whether the foreground edge still covers the expected person region. Check for a jacket drawn on top of the desk, a missing finger, a see-through railing or a boundary that changes attachment as the body moves. Follow the reveal as carefully as maximum cover, because a correct disappearance can be followed by the wrong identity or an invented limb.

  3. 03

    Choose acceptance or controlled boundary work

    Apply the shot's written requirement at normal playback size as well as close inspection. If a critical interaction fails, use a different source or a separate editor with suitable masks/layers and verify its final moving boundary. FFmpeg documents compositing operations, but using an overlay alone does not automatically determine correct foreground order in arbitrary footage. Keep any manual repair distinct from the original generated result.

A concrete example

Illustrative depth review: a seated presenter reaches behind the front edge of a desk. In the source, the desk hides the lower jacket and briefly hides the reaching hand. In the output, the jacket sits over the desk front while the hand is hidden correctly. Record the jacket/desk boundary failure even though one occlusion is right. A full-face likeness review or an attractive still after the hand returns would not answer whether this physical overlap is acceptable.

Foreground relationship worksheet

EventExpected cover from sourceOutput check
Approach deskJacket passes behind front edgeNo jacket drawn over desk
Maximum reachDesk hides part of handNo see-through surface or disappearing extra parts
Hand returnsOriginal boundary clears naturallyCorrect hand and intended character revealed

Allow depth order to change when the source hand crosses the desk

A hand can begin behind a desk edge, rise above its top and then rest on the front surface. Write those three source states with the visible boundary evidence at each transition. A rule that the desk must always cover the hand would be wrong for this action, even though it is appropriate at the start.

Compare the output against the time-specific states: behind while concealed, in front when visibly raised over the edge, and correctly contacting the surface when resting. If the hand remains hidden after the source clears the desk, record lost reveal. If it appears over the desk before clearance, record premature layer change. If the transition itself is unobservable, leave that correspondence uncertain. A controlled external repair would need a changing mask/layer relationship and review of the complete motion, not one static foreground overlay. This hypothetical protocol makes the changing scene order explicit without suggesting a native rotoscoping feature.

Before you call it ready

  • The obstruction and covered body region are named for the relevant interval.
  • The source makes the intended order assessable rather than merely assumed.
  • Approach, maximum overlap and reveal all receive a check.
  • Any repaired moving boundary is reviewed in the final export and disclosed as finishing work.

When to stop or choose another method

Stop treating a repeatedly wrong boundary as a problem solved by a clearer portrait. If the exact obstruction is essential, use a method that can retain and verify its layers. For a hand directly covering a face, follow the specialized hand-over-face diagnostic; for a generic room object, retain this scene-order review rather than expanding into an unrelated anatomy checklist.

Sources

Your video. Your characters.

Choose a scene, check the people, then add your photos.

Try the workflow