1-D Transfer Function (Colourbar)
Fig. 14 Two 1-D transfer function (colourbar) actors.
Overview
The 1-D transfer function actor provides a configurable colourbar. It maps scalar data values to colours using a so-called colourmap. It is used in combination with data actors such as horizontal cross-sections, volume rendering, isosurfaces, or the geometry actor. Multiple transfer function actors can coexist in a scene, each assigned to a different variable.
The colour map is defined using one of three methods: HCL, Predefined, or Editor, selected via Colourmap type. The scalar range, value transformation, and display options are shared across all three.
HCL Colour Maps
HCL-based colour maps use perceptually uniform colour transitions, well suited for scientific visualization. The implementation follows the specification introduced by Reto Stauffer. Available subtypes are Diverging, Qualitative, Sequential single hue, and Sequential multiple hue. We recommend using the HCL Wizard to design palettes interactively and copy the resulting parameters into Met.3D.
The Clamp HCL colours option controls how out-of-gamut colours are handled during HCL-to-RGB conversion. Clamping avoids black regions caused by HCL values that result in invalid RGB values, though it can slightly reduce perceptual linearity near the colour map boundaries.
Predefined Colour Maps
Met.3D includes a collection of predefined colour maps. If you followed the installation instructions, the scientific colour maps by Fabio Crameri are available, which are designed for perceptual uniformity and colour vision accessibility. The lightness and saturation of any predefined map can be adjusted independently, and an opacity ramp can be applied across the colour map range via the alpha parameters.
Editor
Fig. 15 Colour map editor with configurable colour and alpha nodes.
The built-in editor allows defining a fully custom colour map in RGB or HCL colour space. Colour nodes are added by clicking on the upper preview bar, and each node’s colour can be adjusted with the controls on the left. Opacity is controlled separately via the graph above: clicking adds an alpha node, which can be dragged horizontally to a data value position and vertically to set the opacity level (top = fully opaque, bottom = fully transparent). Nodes are deleted by right-clicking them. The lower preview bar shows the combined colour and opacity result.
Note
In Editor mode, Reverse range and Transformation are not available.
Range and Value Mapping
The Minimum value and Maximum value properties define the scalar range shown on the colour bar. The Steps parameter controls the number of discrete colour levels. A low step count produces a visibly stepped appearance while a high count approximates a continuous gradient. Values outside the defined range can either be shown in the colour of the nearest end of the bar (Extend below minimum / Extend above maximum) or rendered transparent.
A non-linear Transformation (Linear, Logarithmic, or Exponential) can be applied to the value-to-colour mapping, with the base configurable for log and exponential modes. The colour map direction can be flipped with Reverse range, and the alpha channel can be toggled on or off with Opacity.
Labels and Appearance
A Description string (e.g. the variable name and unit) is displayed next to the colour bar. For vertical orientation, Flip description label moves it to the opposite side. If the data values need to be displayed in different units than the data itself, Label value scaling multiplies all displayed tick values by a constant factor. The number of tick marks and tick labels, their spacing, and font properties are all configurable in the Labels section.
Orientation and Position
The colour bar can be displayed in Vertical or Horizontal orientation, and its position and size in the viewport are set via Viewport position and size using normalized coordinates (0-1).