You just need to render them alone. Depending on your needs you can hide everything else or create "matte" shader so that the geometry in your scene obstructs the areas where you want to hide your effects. EDIT: Pure, you beat me by one minute