These descriptions indicate the number of bits per pixel occupied by each channel.
Macros | |
#define | BMM_CHAN_NONE 0 |
#define | BMM_CHAN_Z (1<<GB_Z) |
The size is 32 bits per pixel. More... | |
#define | BMM_CHAN_MTL_ID (1<<GB_MTL_ID) |
The size is 8 bits per pixel. More... | |
#define | BMM_CHAN_NODE_ID (1<<GB_NODE_ID) |
The size is 16 bits per pixel. More... | |
#define | BMM_CHAN_UV (1<<GB_UV) |
The size is 64 bits per pixel. More... | |
#define | BMM_CHAN_NORMAL (1<<GB_NORMAL) |
The size is 32 bits per pixel. More... | |
#define | BMM_CHAN_REALPIX (1<<GB_REALPIX) |
The size is 32 bits per pixel. More... | |
#define | BMM_CHAN_COVERAGE (1<<GB_COVERAGE) |
This provides an 8-bit value (0..255) that gives the coverage of the surface fragment from which the other G-buffer values are obtained. More... | |
#define | BMM_CHAN_BG (1<<GB_BG) |
The size is 24 bits per pixel. More... | |
#define | BMM_CHAN_NODE_RENDER_ID (1<<GB_NODE_RENDER_ID) |
The size is 16 bits per pixel. More... | |
#define | BMM_CHAN_COLOR (1<<GB_COLOR) |
It is a 24 bit RGB color (3 bytes per pixel). More... | |
#define | BMM_CHAN_TRANSP (1<<GB_TRANSP) |
It is a 24 bit RGB color (3 bytes per pixel). More... | |
#define | BMM_CHAN_VELOC (1<<GB_VELOC) |
It is a Point 2 (8 bytes per pixel). More... | |
#define | BMM_CHAN_WEIGHT (1<<GB_WEIGHT) |
It is a 24 bit RGB color (3 bytes per pixel). More... | |
#define | BMM_CHAN_MASK (1<<GB_MASK) |
The 4x4 (16 bits = 1 word) pixel coverage mask. More... | |
#define BMM_CHAN_NONE 0 |
#define BMM_CHAN_Z (1<<GB_Z) |
The size is 32 bits per pixel.
This is the channel that would be used by a depth of field blur routine for instance. The Z value is at the center of the fragment that is foremost in the sorted list of a-buffer fragments. The Z buffer is an array of float values giving the Z-coordinate in camera space of the point where a ray from the camera through the pixel center first intersects a surface. All Z values are negative, with more negative numbers representing points that are farther from the camera. The Z buffer is initialized with the value -1.0E30.
Note that for non-camera viewports (such as Front, User, Grid, Shape, etc.) the values may be both positive and negative. In such cases the developer could add a large value onto all the values to make them all positive. This is because positive versus negative doesn't really mean anything. It is just the distance between values that matters.
As noted above, the Z values in the A buffer are in camera space. The projection for a point in camera space to a point in screen space is:
This function is supplied by the RenderInfo data structure which can be obtained from the bitmap output by the renderer using the function Bitmap::GetRenderInfo(). Note that this outputs a Point2. There is no projection for Z. As noted before, the Z buffer just uses the camera space Z.
Z-buffer depth, float
#define BMM_CHAN_MTL_ID (1<<GB_MTL_ID) |
The size is 8 bits per pixel.
This channel is currently settable to a value between 0 and 8 by the 'Material Effects Channel' flyoff in the Material Editor. A plug-in material can generated up to 255 different material ID's (since this is an 8-bit quantity). This channel would be used to apply an effect (i.e., a glow) to a specific material.
ID assigned to the material via the Material Editor.
#define BMM_CHAN_NODE_ID (1<<GB_NODE_ID) |
The size is 16 bits per pixel.
This channel would be used to perform an effect (for example a flare) on a specific node.
ID assigned to node using the Object Properties / G-buffer ID spinner.
#define BMM_CHAN_UV (1<<GB_UV) |
The size is 64 bits per pixel.
If you have UV Coordinates on your object this channel provides access to them. This channel could be used by 3D paint programs or image processing routines to affect objects based on their UVs. The UV coordinate is stored as a Point2, using Point2::x for u and Point2::y for v. The UV coordinates are values prior to applying the offset, tiling, and rotation associated with specific texture maps.
UV coordinates, stored as Point2.
#define BMM_CHAN_NORMAL (1<<GB_NORMAL) |
The size is 32 bits per pixel.
Object normals are available for image processing routines that take advantage of the normal vectors to do effects based on curvature (for example), as well as for 3D paint programs. The normal value is at the center of the fragment that is foremost in the sorted list of a-buffer fragments.
#define BMM_CHAN_REALPIX (1<<GB_REALPIX) |
The size is 32 bits per pixel.
See Structure RealPixel. These are 'real' colors that are available for physically-correct image processing routines to provide optical effects that duplicate the way the retina works.
Non clamped colors in "RealPixel" format
#define BMM_CHAN_COVERAGE (1<<GB_COVERAGE) |
This provides an 8-bit value (0..255) that gives the coverage of the surface fragment from which the other G-buffer values are obtained.
This channel is being written and read with RLA files, and shows up in the Virtual Frame Buffer. This may be used to make the antialiasing in 2.5D plug-ins such as Depth Of Field filters much better.
Pixel coverage of front surface
#define BMM_CHAN_BG (1<<GB_BG) |
The size is 24 bits per pixel.
If you have the image color at a pixel, and the Z coverage at the pixel, then when the Z coverage is < 255, this channel tells you the color of the object that was partially obscured by the foreground object. For example, this info will let you determine what the "real" color of the foreground object was before it was blended (antialiased) into the background.
RGB color of what's behind front object
#define BMM_CHAN_NODE_RENDER_ID (1<<GB_NODE_RENDER_ID) |
The size is 16 bits per pixel.
The renderer will set the RenderID of all rendered nodes, and will set all non-rendered nodes to 0xffff. Video Post plug-ins can use the Interface::GetINodeFromRenderID() method to get a node pointer from an ID in this channel. Note that this channel is NOT saved with RLA files, because the IDs would not be meaningful unless the scene was the one rendered.
System node number - valid during a render.
#define BMM_CHAN_COLOR (1<<GB_COLOR) |
It is a 24 bit RGB color (3 bytes per pixel).
Color returned by the material shader for the fragment.
#define BMM_CHAN_TRANSP (1<<GB_TRANSP) |
#define BMM_CHAN_VELOC (1<<GB_VELOC) |
#define BMM_CHAN_WEIGHT (1<<GB_WEIGHT) |
It is a 24 bit RGB color (3 bytes per pixel).
It is the fraction of the total pixel color contributed by the fragment. The sum of (color *weight) for all the fragments should give the final pixel color. The weight ( which is an RGB triple) for a given fragment takes into account the coverage of the fragment and the transparency of any fragments which are in front of the given fragment.
If c1, c2, c3.. etc are the fragment colors, and w2, w2, w3... etc are the fragment weights, then:
The purpose of the sub-pixel weight is to allow post processes to weight the conribution of a post-effect from a particular fragment. It may also be necessary to multiply by the fragment's own transparency, which is not included in its weight. Note that for fragments that have no transparent fragments in front of them, the weight will be equal to the coverage.
The sub-pixel weight of a fragment.
#define BMM_CHAN_MASK (1<<GB_MASK) |
The 4x4 (16 bits = 1 word) pixel coverage mask.
Subpixel mask