Get Final Alpha

From Terragen Documentation from Planetside Software
Revision as of 01:18, 18 May 2011 by JavaJones (talk | contribs)
Jump to: navigation, search

Get Final Alpha

Provides the "Final Alpha" of the current Render State. The Render State is affected by any shaders which were called before this function is called, among other things.

Final Alpha is the value of the surface to be output to the image's Alpha channel (or Alpha element). Alpha is similar to opacity, but for the purpose of compositing the rendered image with other images such as a background plate. The alpha may be different from the opacity, especially where a fully opaque object (opacity of 1) is rendered with an alpha of 0 to allow a background image to show through in a composite.

In Terragen, alphas and opacities have 3 channels to represent potentially different opacities in the Red, Green and Blue channels of an image. This is necessary to correctly composite media with wavelength-dependent scattering or absorption, such as planetary atmospheres and coloured glass.

Although Final Alpha is defined to include atmosphere contributions if they have been applied, in practice Get Final Alpha will always provide the alpha of the surface prior to atmosphere due to the places where you can use it. Future changes to the renderer may expose contexts where functions can be used after atmosphere.

The Input connection is not used by this node.

A single object or device in the node network which generates or modifies data and may accept input data or create output data or both, depending on its function. Nodes usually have their own settings which control the data they create or how they modify data passing through them. Nodes are connected together in a network to perform work in a network-based user interface. In Terragen 2 nodes are connected together to describe a scene.