choo-chee wrote:
still I didn't understand why rendering with alpha means the bg has to be black and cannot be kept.
Because the alpha channel is useless unless the background is a solid color (preferably white or black). Here is a render which includes the sky and its alpha channel:
Try to use the alpha channel to replace the sky with this background:
You will get a halo around the sphere because the edge pixels are antialiased against the sky. There's no way to remove the sky color from the edge, because each pixel is blended with a different color:
Here's the sphere rendered against a black background:
If you apply the alpha channel to this image and remove the black matte (Layer -> Matting -> Remove black matting in Photoshop), you can apply it on the new background:
This is exactly the same image you would get if you rendered the sphere against the pier background in the first place (with the pier HDR in the background IBL channel and the reflection, refraction and illumination channels set to "use sky").
I think tom has explained this a couple of times before. He even made a Photoshop action which applies alpha and removes the black matte in one go, it's somewhere on the think! site if I recall correctly.