Texture Map (Spatial Transfer Function) ======================================== .. _fig_texturemap_actor: .. figure:: ./figs/transfer_function_texture_map/actorref_texturemap.webp :figwidth: 100% :align: left :alt: Texture map actor rendering a texture bar and a textured cross-section. A horizontal cross-section visualized with the texture map actor. Denser hatching indicates regions of a higher value (here: higher ensemble probability of high winds). The texture bar (right) shows the texture progression from minimum to maximum value. Overview -------- The texture map actor is a variant of the transfer function that maps scalar data values to **texture patterns** instead of colours. Rather than a palette of colours, the user defines a set of images (minimum two) which represent different levels of a scalar field. As the data value increases from its minimum to its maximum, the rendered pattern transitions through the loaded texture sequence, with neighbouring textures blending into one another within a configurable interpolation range. The actor works in combination with the :doc:`horizontal cross-section ` or :doc:`vertical cross-section `. .. note:: All loaded texture images must have **identical dimensions**. Loading images of different sizes will be rejected with a warning. Loading Textures ---------------- Textures are loaded via **Texture levels → Load**. A file dialog opens where multiple image files can be selected at once. After selection, a reordering dialog allows dragging the images into the desired sequence. The first image in the list corresponds to the minimum data value, the last to the maximum. At least two images must be loaded. The paths of all loaded images are stored in the session configuration and restored automatically on reload. **Mirrored repeat** controls how the texture tiles when it extends beyond the image boundary. With mirroring enabled, neighbouring tiles are reflected. Value Range and Interpolation ------------------------------ The **Minimum value** and **Maximum value** properties define the scalar range over which the texture sequence is spread. The number of tick marks on the texture bar adapts automatically to the number of loaded texture levels. **Interpolation range** controls the width of the transition zone between successive textures, expressed in data units. A small value produces sharp boundaries between texture levels; a larger value creates a gradual blend. A value of 0 represents on interpolation being performed at all. **Clamp maximum** determines how values above the maximum are rendered. When enabled, the outermost texture is applied to all out-of-range values rather than leaving them transparent. Alpha Blending -------------- Because many useful textures are monochromatic (e.g. black hatching on a white or transparent background), the actor provides flexible alpha blending controls: * **Mode** selects which image channel is used as the alpha (transparency) mask: the image's own alpha channel, or one of the red, green, or blue channels, or the greyscale average of all three (RGB average). Choosing **None** disables alpha masking entirely and renders the texture as-is. * **Invert alpha** flips the channel used as the mask, which is useful when the texture uses black to denote the structure and white as the transparent background. * **Constant colour** replaces the image's RGB colour with a single user-defined colour. When enabled, only the alpha mask from the texture is preserved; the structure is filled with the chosen colour. This is the recommended mode for hatching or stippling overlays, as it allows the colour to be adjusted without regenerating the texture images. * **White background for bar** renders the texture bar legend on a white background, which can improve legibility when the textures themselves contain transparent regions. Texture Scale ------------- The **Scale** property controls the physical size of the texture pattern in the scene, expressed in degrees of longitude. The texture height is scaled automatically to preserve the image aspect ratio. A higher scale value produces larger, coarser tiling; a smaller value produces finer, denser repetition. Use **Decimals** to set the number of decimal places available for the scale value. Labels and Appearance --------------------- The texture bar shares the same label and layout options as the standard :doc:`colourbar `: a **Description** string, configurable tick counts, font properties, and orientation (**Vertical** or **Horizontal**). Position and size in the viewport are set via **Viewport position and size** using normalised coordinates. Usage Notes ----------- A common meteorological application of this actor is **significance hatching**: a horizontal cross-section is coloured by a data variable using a standard transfer function, while a second variable (e.g. a statistical significance measure or an ensemble agreement field) drives the texture map. Denser hatching textures are assigned to higher significance values. Other examples include mapping categorical land-use or surface-type indices to representative texture patterns (e.g. stipple for ocean, dense hatching for forest), or using synoptic symbol textures to annotate feature regions.