This video goes through the technique of creating a difference matte in Autodesk Smoke.
Great for accelerating jobs that may require a lot of masking and this might give you a head start.