Appearance
Transfer Functions and Segmentation
Documentation · Volumes and Scenes · Code Structure
In a volume scene, Data Mapper controls how continuous values or segmentation labels contribute optical properties. Volume Settings contains the tools that change label values or exclude voxels.
Choose a transfer function
| Mapping | Input | How it produces a material |
|---|---|---|
| CLTF, Continuous Linear Transfer Function | Normalized continuous values such as intensity or gradient magnitude | Interpolates optical properties between adjacent control points. |
| DPTF, discrete value property mapping | Stable integer IDs in an eligible Mask1 or Mask2 channel | Selects the material for the exact label. An explicit entry takes priority over the default material. |
Figure 1. In the legacy channels panel, each enabled channel can carry its own mapping. The channel combination determines how the mapped materials contribute.
For an editable categorical mask, use uint8 or uint16 labels, Nearest interpolation and the StorageRange value domain. Keep label reassignment disabled so an ID stays stable across reloads. An all-zero mask is valid.
The adjacent Material document tab edits the newer document-based mapping with input bindings, materials, mapping stages and renderer validation. The Engine-KM walkthrough below uses Legacy channels, the tab shown in the rendered example. Use the runtime diagram to trace how mapping changes reach a frame.
Example 1. Refine the intensity curve
- Open Engine-KM or work on a copy of your own scene.
- Go to Data Mapper → Legacy channels → Intensity. Enable the channel and select Continuous linear (CLTF).
- Left-click a blank point on the plot to insert a node. Drag a node to adjust its position or opacity. Right-click an internal node to remove it. The endpoints remain in place.
- Compare the render once sample accumulation settles. If the histogram is squeezed into a narrow band, inspect Automatic intensity range and the scene’s manual range before moving every control point.
- Save the scene after choosing a curve that makes the expected structure visible.
The CLTF plot uses normalized intensity horizontally. Its vertical axis shows opacity. The material strips below the graph display the color and roughness associated with the curve.
Example 2. Paint and color Mask1
- Open Volume Settings → Mask1 File. Choose uint8 or uint16, click Add Mask1, and select a new INFORAW path beside your volume. An existing mask can be loaded as the Mask1 source if its source grid matches.
- In Data Mapper, add the mapping for Mask1. New Mask1 mappings start with DPTF and the Mask1Prior combination. An existing scene retains its saved mapping and combination. Add label
1with a visible material and leave label0transparent for this walkthrough. - Go to Volume Settings → Mask1 Edit → Edit Mask1. Set the active ID to
1and choose Image Brush. Paint over a visible feature. Inspect the green preview, then click Apply. Cancel Preview clears an unapplied preview. Undo and Redo act on applied changes. - Use Intensity Region when you want a connected region around a picked voxel. Begin with a small maximum region size, choose a 6-neighbour connectivity and adjust the normalized tolerance after inspecting the preview. The current mapping must give the picked seed nonzero final opacity.
- Click Save Mask1 and save the scene. If Crystal asks you to write a new INFORAW for a resized mask, inspect the reopened result because resampling can change labels at boundaries.
| If you see… | Check… |
|---|---|
| Mask1 is loaded but its color is absent | Enable the Mask1 mapping, confirm the edited label ID, and use a combination that samples Mask1. Intensity only ignores it. |
| Setting Mask1 opacity to zero still shows the original volume | Mask1Prior falls back to intensity when the mapped mask contributes zero opacity. Choose Mask1AsOpacity if the mask should gate visibility. |
| No seed is selected in the brush or region tool | Start on a currently visible, undeleted voxel. Temporarily adjust the mapping if it hides the intended region. |
| Label edges blend or IDs appear changed | Check that the mask uses Nearest, StorageRange and no label reassignment. |
Example 3. Delete a full-depth region
- Open Volume Settings → Rectangle volume deletion and select Select rectangle.
- Drag a rectangle in the render viewport. Verify the red preview and selected voxel count. The selection covers all voxel centers inside the perspective frustum, or the orthographic prism, within the active volume. This includes hidden voxels behind the visible surface.
- Click Delete selected voxels, then inspect the result from a second angle. A changed camera or viewport invalidates the preview, so select the rectangle again after changing the view. Use the deletion panel’s own Undo or Redo if needed.
- Click Save deletions. Keep the resulting
.vdeland its XML reference together. The original intensity and mask data stay available. Reopening requires the same source and grid geometry.
Painting a mask changes labels and can change appearance through DPTF. Rectangle deletion excludes selected voxels from rendering before mapping and has its own history.