Skip to content

About

A WebGPU-native out-of-core rendering system for large virtualized volumetric data.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

66 stars

Watchers

1 watching

Forks

Latest commit

 

History

191 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Kiln

npm PyPI (Jupyter) CI License: Apache-2.0 OME-NGFF tools registry DOI

A WebGPU-native out-of-core volume rendering system for large virtualized volumetric datasets.

Kiln streams multi-gigabyte volumes over HTTP, rendering them at interactive framerates using a bounded GPU residency/atlas cache and virtual-texture indirection. It handles single-channel and multichannel OME-Zarr datasets (up to 4 channels).

v0.6.1 — Multichannel rendering is in beta; see Multichannel for details and known limitations.

Documentation: New to Kiln? Start with the Guide, or browse the full docs index.


Chameleon CT scan — 2160 MB, 1024 × 1024 × 1080 · uint16

Chameleon CT scan — 2160 MB, 1024 × 1024 × 1080 · uint16 · Live demo → · Gallery →

Install

npm install kiln-render

Ships as an ES module with bundled dependencies and TypeScript types (including @webgpu/types) — no peer packages to install. Use it with a bundler or dev server such as Vite; a plain <script type="module"> can't resolve kiln-render.

Usage

<canvas></canvas>
<p id="status"></p>
import { KilnViewer } from 'kiln-render';

const canvas = document.querySelector('canvas');
const status = document.querySelector('#status');

try {
  const viewer = await KilnViewer.create(
    canvas,
    'https://ome-zarr-scivis.s3.us-east-1.amazonaws.com/v0.5/96x2/beechnut.ome.zarr',
  );
  status.textContent = `rendering — mode: ${viewer.mode}`;
  window.viewer = viewer;
} catch (err) {
  status.textContent = `failed: ${err.message}`;
  console.error(err);
}

KilnViewer.create() initialises WebGPU, sets up streaming, and starts the render loop; it rejects with a descriptive error if WebGPU is unavailable (hence the try/catch). See the Quick start for ViewerOptions, viewer properties, state serialisation, and cleanup.

Jupyter

kiln-jupyter shows Kiln in JupyterLab, VS Code and Google Colab:

pip install kiln-render
import kiln_render as kiln

kiln.view("https://ome-zarr-scivis.s3.us-east-1.amazonaws.com/v0.5/96x2/beechnut.ome.zarr")

It also opens local folders and 3D NumPy arrays (kiln.view(volume)) when the kernel runs on your own computer.

Features

  • Out-of-core streaming — Fixed VRAM footprint, SSE-based LOD selection, ray-guided brick selection, LRU brick cache
  • Multichannel rendering — Up to 4 channels with per-channel colour, windowing, and visibility controls (details)
  • OME-Zarr & Kiln binary — Stream from S3, CDN, or load local files (OME-Zarr v0.4/v0.5, uint8/uint16/int16/float32)
  • Local filesystem — Load local .zarr / .ome.zarr directories via the File System Access API (Chrome/Edge)
  • uint8, uint16, int16 & float32 input — uint16 is stored bit-exact as r16unorm where the GPU supports it, otherwise as r16float (exact up to 12 bits); int16 and float32 use r16float, with window/level controls
  • Compute shader raymarching — Brick-aware DVR (with density scale, optional gradient shading and boundary emphasis), MIP, isosurface, and slice plane rendering
  • Label layers — Up to 8 OME-Zarr segmentations over the volume, as shaded surfaces in 3D and filled on slices (details)
  • Views — Quad layout with front, side and top panes around the 3D view, and orthographic projection
  • Embeddable — KilnViewer for a canvas in a few lines, or KilnEngine for apps that bring their own WebGPU device, camera and frame loop

Developing from source

Clone the repo and install dev dependencies with Bun (this is for working on Kiln itself — consumers only need npm install kiln-render, above):

# Install dependencies
bun install

# Start development server (single-channel demo)
bun run dev

# Start multichannel demo
bun run dev:multichannel

# Build demo for production
bun run build

# Build the library (outputs to lib/)
bun run build:lib

The demo loads a sample dataset from S3. To load custom datasets, see Loading data.

Browser Requirements

Kiln requires WebGPU support:

  • Chrome/Edge 113+ (Windows, macOS, ChromeOS; Android 121+; Linux depends on the GPU)
  • Safari 26+
  • Firefox 141+ on Windows, 145+ on Apple-silicon Macs

See the FAQ for details.

Make sure hardware acceleration is enabled in your browser settings.

Contributing

Contributions are welcome; see CONTRIBUTING.md. Questions go to Discussions.

Citing Kiln

If you use Kiln in your research, please cite it: doi:10.5281/zenodo.23015442. The Cite this repository button in the GitHub sidebar gives APA and BibTeX entries.

License

Apache 2.0 — see LICENSE.


About

A WebGPU-native out-of-core rendering system for large virtualized volumetric data.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

66 stars

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages