Replacing a Background in an Image - Nano Banana 2
Look at the subject and work out where its light came from: which side is bright, how hard the shadow edges are, what colour the highlights carry. Then write the new background so it can produce exactly that. A subject lit hard from the upper left needs a background with a plausible hard source on the upper left — a window, low sun, a lamp out of frame. Drop that same subject into soft overcast woodland and no amount of edge work will save it.
This is why the prompt for a background replacement should spend most of its words on light and distance rather than on scenery. “Softly lit office interior, large window out of frame to the left, shallow depth of field, cool daylight” is a working instruction. “Modern office” is a wish.
The fix is to repaint the transition rather than cut through it. Mask a band that includes both the subject’s edge and a little of the new background, and let the model resolve the boundary with the new colours present. The same applies to spill: if the old setting was strongly coloured, that colour sits on the subject’s edges and shoulders and has to be repainted, not erased.
A subject with no relationship to the ground floats, however good everything else is. If the subject’s feet, base or shadow were part of the original scene, the new background needs a matching contact shadow beneath them, going the right direction and the right softness. Ask for it explicitly — a soft contact shadow under the subject, falling to the right — because a background generated on its own has no reason to include one.