I've found masking can be very time-consuming and difficult to do realistically. But there is a way of doing it quite quickly and with which I've had some great results.
It requires you to add the new background on a layer over the original image and uses the darken blending mode to display the new background where it is darker than the original, while displaying the original image where it is darker than the new background. You can than add a layer mask to fine tune the results.
- Get a nice white background to the original shot
- Get your replacement background onto a new layer, make sure it's darker than the original background and lighter than the subjects
- Backgrounds can be generated quickly using a new layer, the Render Clouds Filter and some Gaussian Blur, lighting effects can be applied with good effect too.
- Set your new layer's blending mode to darken, if you got the tones right in step 2. this should be around 90% there.
- Add a layer mask and using a soft brush paint black or white to tune the results
- Sometimes it's worth putting a small Gaussian Blur on the Layer Mask (radius .5 - 1 pixels) to soften the edges.
The important thing with this approach is that it's non-destructive, you can keep tuning the layer mask and the opacity of the layer until you get an effect you like.
cheers
Dan