Getting Background _and_ alpha for later composiiting in one pass

Ok might be doing something wrong. I want to output environment and the forground (including alpha) in one pass
For later readjust lets say the sky with a different exposure than the foreground

this is what I’ve learned so far:

  • exporting an environment as a pass result in an antialiased line where the foreground met, wich is impossible
    to composite (black fringe where both aa passes met)
  • using object id (assigning the same id to all foreground objects) is a solution as long as your foreground object
    does not feature transparency.

life would be definitive easier if the alpha value in the compositor would exclude the backgorund without activating transparency… but chances are big I miss something obvious.