I'm using a sky texture for environmental lightning. It gets rendered as background when I do that. Can I prevent it from rendering, but still use it for environmental lightning?
You could disable Sky in Properties > Render Layers > Layer:
With Sky enabled:
With Sky disabled:
Another way is to set the Alpha to Transparent in Render settings > Shading:
This will give the same result as disabling Sky in Render layers > Layers.
For cycles you could set the Film to Transparent in Render settings > Film:
With Transparent disabled:
With Transparent enabled:
In Cycles can do that by using the Light Path node set to Is Camera Ray (You have to invert it otherwise it renders without affecting the lighting of the scene. The inverse of what you want.):
In Blender internal, you have to set the alpha to the sky, then you can put anything you want into the background. To render the sky as alpha:
- Under the Shading tab of the Render panel, set alpha to Transparent.
- Under the Output tab of the Render panel, set Output to PNG with RGBA
In the compositor, use the Mix node to add a background color/image: .