The bitmap node stores three-dimensional arrays of values. As the name implies, the intended use is to store bitmap data, i.e. images. In a 3D-graphics system, images are usually used to texture surfaces, so storing color data used for texturing is a common use for the bitmap node. It can also be used to store other arrays of data needed to describe surface features, for things like displacement mapping, and of course any application-specific data that is best expressed this way.
Bitmaps are often used as look-up tables for other operations, such as the texturing mentioned above. Since these operations often need to use a relatively small amount of samples to cover a large screen area, filtering techniques might need to be used to reduce artifacting by interpolating values between the ones present in the bitmap itself.
In their most general form, Verse bitmaps are three-dimensional "cubes" of samples (often called "pixels"), with independent sizes in each of the three dimensions: width, height, and depth. They can be restricted to only two or one dimension(s), which is frequently useful. Such a restriction is done by setting the size in the required dimension(s) to one, and must be done from the end of dimension list. So, a 2D bitmap can only be created by setting the depth to one, not e.g. the height.
Coordinates are in a "screen-like" space, with three axis called x, y and z. The pixel at (0,0,0) is the leftmost, topmost, and foremost pixel. Figure 2-3 shows the coordinate system used for bitmaps. The Z, or depth, axis, is intended to go "into" the document, making this a right-handed coordinate system. The number of pixels contained in a bitmap is unknown when the node has just been created; it must be set by the application, before any pixels can be stored in the bitmap. The width, height and depth of a bitmap are colletively referred to as the bitmap's dimensions.
Data in a bitmap node is arranged into layers. A single layer stores a full three-dimensional (or restricted, see above) image. All layers in a node have the same size, that of the node itself. This size can be re-set at any point, making all the layers grow or shrink as needed. Shrinking a node after data is been supplied will effectively crop the layer data, permanently losing the data that falls outside the new size. Layers have names that must be unique within the node, and a type that is one of the following:
Table 2-9. Bitmap Node Layer Types
| Name | Enum Value | Value Type | Value Size, bits |
|---|---|---|---|
| B_LAYER_UINT1 | 0 | uint16, packed | 1 |
| B_LAYER_UINT8 | 1 | uint8 | 8 |
| B_LAYER_UINT16 | 2 | uint16 | 16 |
| B_LAYER_REAL32 | 3 | real32 | 32 |
| B_LAYER_REAL64 | 4 | real64 | 64 |
Integer values are interpreted as being in the range of zero to one by dividing with the maximum value for the respective sizes. Floating point values are not clamped to any range.
![]() | Expressing Color |
|---|---|
Since layers only provide a single value per pixel, you cannot express a typical RGB image using a single layer. Such images are stored by splitting them into three layers, one for each of the color components. |
The B_LAYER_UINT1 format is slightly special, since there is no 1-bit integer type defined in Verse. As we will see in subsequent sections, pixels in a 1-bit layer are expressed using the bits of a single uint16 value.
The smallest individually addressable part of a bitmap layer is a tile. A tile is simply a small flat (two-dimensional) square of pixels in the XY plane of a bitmap layer. The current standard tile size is 8x8 pixels. This size is fixed and the same for all Verse programs, it cannot be changed by client programmers. Tiles make bulk transfer of bitmap data in a network more efficient, by reducing addressing overhead.
Each layer is split into tiles by simply dividing it into squares of 8x8 pixels, beginning in the top left corner. This creates a "tile coordinate system". If the bitmap's dimensions are not integer multiples of the tile side length, eight, there will be tiles with only partial coverage of the bitmap. Any pixels in a tile that fall outside of the bitmap itself will not be stored by the host, and should transmitted as zeroes when transmission is at all required. Applications should not read them.
Each tile is addressed using its tile coordinates in 2D, plus a Z coordinate that locates the tile in the third dimension if applicable. For a 2D bitmap, Z will always be zero. Note that there is no tiling in the Z direction; a tile is a 2D flat 8x8-pixel square, with depth=1.