Transparency is a seemingly simple and powerful visualization technique to facilitate the understanding of complex geometric structures. However, to do so accurately, and at highly interactive frame rates, is challenging. 

That is why we’re excited about VTK’s new WebGPU deep framebuffer. It collects translucent rendering fragments in one geometry pass, then composites them in depth order, preserving relationships that VTK’s default OpenGL transparency averages away. For nested scans and intersecting simulation surfaces, this gives us a clearer way to explore how the pieces fit together.

Transparency in VTK’s OpenGL backend

VTK’s OpenGL backend offers two approaches to order-independent transparency. The default, selected by UseOIT, accumulates an alpha-weighted average of the translucent colors and computes the combined opacity. It processes the geometry in one pass and uses a fixed set of image buffers. Because the color accumulation does not recover depth order, a fragment behind a surface can contribute as strongly as an equally transparent fragment in front of it. The result is stable under changes in drawing order, but can flatten the distinction between internal and external surfaces.

Depth peeling recovers that ordering. It renders the translucent geometry repeatedly, retaining the next layer at each pixel on each pass. VTK uses dual depth peeling when supported, collecting layers from both the front and the back of the depth range. An earlier post, VTK Technical Highlight: Dual Depth Peeling, explains the algorithm and its improvement over single depth peeling. That work was later extended to interleave translucent surfaces with volume rendering, as described in Rendering translucent geometry intermixed with volumes.

A side-by-side computer graphics comparison of a 3D teal teapot on a dark background, each adorned with a gold, organic-shaped ornamental surface relief. The left view is labeled "teapot - displaced shape VT," and the right view is labeled "teapot - final surface VT/ displacement."
The Boston Teapot CT scan contains a lobster model inside the enclosure. Left: OpenGL weighted average OIT. Right: OpenGL depth peeling, with a maximum of 64 iterations and an occlusion ratio of zero. Both captures use the same geometry, camera, lights, colors, and opacities: 0.16 for the enclosure and 0.85 for the inner model. The teapot shell uses isovalue 50; the lobster uses 65. Connected components separate the enclosure from the interior model.

Weighted average OIT makes an image independent of drawing order, but that does not make the composition correct. Once depth has been discarded, averaging cannot distinguish a surface in front from the same surface behind. Peeling retains that distinction by revisiting the geometry for successive depth layers.

Preserving depth with the deep framebuffer

The WebGPU deep framebuffer records translucent fragment colors and depths in per-pixel lists. A later resolve sorts the retained fragments and composites them back to front over the opaque image. A surface in front attenuates the contribution behind it, as ordinary alpha composition requires. Weighted average OIT cannot recover this result in general because it has already discarded the fragments’ depth order.

The difference is visible even with two rectangles. In the top row below, red is in front; in the bottom row, blue is in front. Both layers have opacity 0.5. Exchanging their depths should change the overlap color.

A comparative graphics test grid evaluating order-independent transparency across three rendering methods: OpenGL weighted average OIT, WebGPU deep framebuffer, and OpenGL depth peeling. Two rows contrast layer ordering—red layer in front (top) versus blue layer in front (bottom)—showing resulting overlap RGB values: order-independent (96, 0, 96) for weighted average OIT versus order-correct values (128, 0, 64) and (64, 0, 128) for WebGPU deep framebuffer and OpenGL depth peeling.
Six native VTK captures, with lighting disabled and a black background. Only the layers’ depths change between rows; actor insertion order stays the same. Weighted average OIT produces the same purple overlap in both cases. The deep framebuffer produces the expected red-dominant or blue-dominant result and matches the peeling image pixel for pixel in each row.

In a scientific scene, those layers may be an outer shell and an internal component, or two intersecting field surfaces. Preserving their depth order lets the nearer surface obscure the farther one by the intended amount. This is a concrete improvement in compositing over weighted average OIT: the renderer retains information that averaging loses.

The deep framebuffer also avoids peeling’s repeated geometry work. It records the translucent fragments in one geometry collection pass, using storage-buffer atomics available in core WebGPU, then resolves their lists in a full-screen pass. It spends memory and sorting work to recover depth order instead of rasterizing the geometry again for each peel.

The current resolve retains the nearest sixteen fragments per pixel. Extra fragments are omitted if that bound or the shared storage pool’s capacity is exceeded.

Examples: Seeing inside scientific data

Boston Teapot

A 3D rendering of a semi-transparent, teal Utah teapot containing a solid, tan organic anatomical structure suspended inside against a dark background, demonstrating order-independent transparency.
The translucent enclosure surrounds the lobster model. The shell and lobster use isovalues 50 and 65, with opacities 0.16 and 0.85 respectively. Gaussian smoothing uses sigma 1 voxel for the shell and 0.65 for the lobster. The lobster contour uses cubic interpolation at half-voxel spacing.

Bonsai

A 3D volumetric rendering of a bonsai tree dataset against a dark background, showcasing translucent teal isosurface foliage wrapped around a solid tan trunk, branches, and soil base with a cutaway revealing interior root density.
Isosurfaces at 35 and 100, with opacities 0.28 and 0.68. The translucent outer surface exposes the trunk and branches. The small disconnected pieces and supporting plane come from the scan data.

Engine

A 3D volumetric rendering of an engine cylinder head block against a dark background, featuring a semi-transparent purple outer casing that reveals internal bores and channels, intersecting with an opaque pale-green sliced cross-section plane and internal circular valve seats.
The violet surface at isovalue 60 has opacity 0.36; the pale green surface at 160 has opacity 0.76. The translucent outer contour reveals the internal surfaces. All three scans are rendered as polygonal isosurfaces.

Overlapping fields in an asteroid ocean impact

The LANL Deep Water Impact dataset combines water volume fraction, temperature and asteroid volume fraction. In the plume and entry trail, the surfaces fold through one another. Sorting the three actors cannot establish the fragment order within those shapes.

A 3D volumetric scientific visualization of an angled plume or fluid jet impacting a planar boundary, featuring semi-transparent outer volume envelopes enclosing turbulent, dense internal flow structures rendered in orange and cyan against a dark background.
Ensemble member yA31, a 250 m asteroid entering at 45° with no prescribed airburst, at simulation time 12.00047 s. Blue: water volume fraction v02 = 0.5, opacity 0.38. Gold: temperature tev = 0.09 eV, opacity 0.24. Orange: asteroid volume fraction v03 = 0.1, opacity 0.55. The supplied 300³ grid is contoured directly, preserving its physical spacing, with no additional smoothing or spatial subsetting. Simulation configuration and field definitions are documented in the LANL dataset report.

The comparison below keeps the impact frame and viewing conditions fixed. It lets us examine how the three transparency methods handle those overlapping fields.

A side-by-side scientific visualization comparison of order-independent transparency methods using the LANL Deep Water Impact dataset: OpenGL OIT with weighted average on the left, WebGPU deep framebuffer with nearest 16 fragments per pixel in the center, and OpenGL depth peeling with up to 64 iterations on the right, all depicting an angled plume and splash envelope impacting a water plane.
Left: OpenGL weighted average OIT. Center: WebGPU deep framebuffer. Right: OpenGL depth peeling. All three use the same yA31 output at 12.00047 s and the geometry, camera, lights, colors and opacities listed above. Deep framebuffer retains up to 16 fragments per pixel; peeling uses up to 64 iterations with an occlusion ratio of zero.

The later frames show how the water plume changes while the entry trail thins. The thresholds, colors, opacities, viewing direction, and orthographic framing stay fixed across this time sequence.

A side-by-side time-step visualization of the LANL Deep Water Impact simulation rendered with order-independent transparency on a dark background, showing the temporal evolution of an angled impact plume and turbulent splash curtain above a surface plane from t = 29.00094 s (left) to t = 52.20082 s (right) in translucent blue, orange, and tan volumes.
Left: 29.00094 s. Right: 52.20082 s. Both use the same three isovalues and orthographic view as the 12.00047 s image above. The selected frames are actual simulation outputs, not interpolated times.

Changing the thresholds exposes a different set of contours in the same frame. The next pair keeps the time, orthographic view, colors and opacities fixed.

A side-by-side threshold comparison of the LANL Deep Water Impact visualization at t = 12.00047 s against a dark background, showing "Lower thresholds" on the left with broad, semi-transparent outer envelope boundaries and "Higher thresholds" on the right isolating denser, high-intensity core structures in orange and cyan.
At 12.00047 s. Left: v02 = 0.1, tev = 0.035 eV, v03 = 0.01. Right: v02 = 0.9, tev = 0.2 eV, v03 = 0.5. Each color continues to identify the same field; the isovalues select the surfaces shown.

Changing the viewing direction changes how those surfaces overlap in the image. The deep framebuffer establishes their order at each pixel from the new viewpoint.

A side-by-side perspective comparison of the LANL Deep Water Impact simulation at t = 12.00047 s against a dark background, displaying a "Side view" on the left and an "Opposite oblique view" on the right to show the 3D spatial distribution of the translucent orange, tan, and cyan impact plume and turbulent splash curtain over a planar boundary.
Two additional views at 12.00047 s, using the original thresholds v02 = 0.5, tev = 0.09 eV and v03 = 0.1. Only the camera direction changes; the focal point, orthographic scale, geometry and material settings stay fixed.

The publication captures share geometry, camera and materials within each method comparison. Reversing actor order produced pixel-identical deep images for the three scans and all seven impact configurations.

Performance

The table measures completed frame time for the primary views of the three scans and the 12.00047 s impact scene at 1000 × 800. Geometry, camera, lights, colors and opacities are shared across methods. Lower times are better.

SceneTrianglesOpenGL weighted OIT (ms)OpenGL peeling (ms)WebGPU deep framebuffer (ms)
Boston Teapot573,8922.321.02.9
Bonsai1,100,1461.731.94.3
Engine723,9522.926.24.8
Deep Water Impact1,574,2522.240.85.4

Measurements use an Apple M4 Pro Mac mini (20 GPU cores, 64 GB memory), release builds of both VTK and Dawn. Each value is the median of five trial medians, with 20 warmup frames and 30 measured frames per trial. Timings include Render() and GPU completion, excluding data preparation, initial compilation, and image readback.

For the Engine scene, the measured median is 4.8 ms with the deep framebuffer and 26.2 ms with peeling, a speedup of about 5.5× in this configuration. The deep framebuffer also has lower medians for the teapot, Bonsai, and impact scenes. Weighted average OIT has the lowest frame time throughout, with the depth-ordering limitations illustrated above. The deep framebuffer trades storage and resolve work for depth-ordered composition; its speed relative to peeling depends on the scene and runtime.

Enabling the deep framebuffer

Use a VTK build with deep framebuffer support in RenderingWebGPU and select the WebGPU rendering backend. For an application linked with the WebGPU module and using VTK’s object factories:

VTK_FACTORY_PREFER="RenderingBackend=WebGPU" ./my-vtk-application

Deep framebuffer transparency is enabled by default in this implementation. Existing translucent polygonal actors use it automatically. To enable it explicitly on a WebGPU renderer:

wgpuRenderer->UseDeepFramebufferTransparencyOn();

Data credits

Boston Teapot, Bonsai and Engine are distributed through Open SciVis Datasets, curated by Pavol Klacansky. Boston Teapot: volvis.org and Terarecon Inc, MERL, Brigham and Women’s Hospital. Bonsai: volvis.org and S. Roettger, VIS, University of Stuttgart. Engine: volvis.org and General Electric.

Deep Water Impact: John M. Patchett and Galen R. Gisler, Los Alamos National Laboratory, Deep Water Impact Ensemble Data Set, LA-UR-17-21595. The simulation data were produced under the auspices of the U.S. Department of Energy. Dataset and download information are available from the LANL Deep Water Impact site.

Research reported in this publication was supported by the National Institute Of Biomedical Imaging And Bioengineering of the National Institutes of Health under Award Number R01EB014955. The content is solely the responsibility of the authors and does not necessarily represent the official views of the National Institutes of Health.

Tags:

Leave a Reply