Skip to content

MPanknin/kiln-render

Repository files navigation

Kiln

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 fixed-size VRAM page cache and virtual texture indirection.

Documentation: Usage Guide · Architecture · Rendering Pipeline · Data Guide · WebGPU Notes · References


Chameleon CT Scan

2160.0 MB - 1024 × 1024 × 1080 @ 16-bit

Live Demo

553008107-25ae5fa5-7fe6-49d1-b3b1-51784c6220a2

Beechnut micro CT Scan (OME-Zarr)

3092.0 MB - 1024 × 1024 × 1546 @ 16-bit

Live Demo

553008573-17268259-5977-4a9b-b4c0-a1756a024857

Install

npm install kiln-render
import { KilnViewer } from 'kiln-render';

const canvas = document.querySelector('canvas')!;
const viewer = await KilnViewer.create(canvas, 'https://your-dataset.ome.zarr');

Requires a browser with WebGPU support. See the Usage Guide for the full API.


Features

  • Out-of-core streaming — Fixed VRAM footprint, SSE-based LOD selection, LRU brick cache
  • OME-Zarr & Kiln binary — Stream from S3, CDN, or load local files (OME-Zarr v0.5, single-channel, uint8/uint16)
  • Local filesystem — Load local .zarr / .ome.zarr directories via the File System Access API (Chrome/Edge)
  • 16-bit support — Native r16unorm textures with window/level controls
  • Compute shader raymarching — Brick-aware DVR, MIP, and isosurface rendering
  • Transfer functions — Interactive curve editor with colour/opacity presets
  • Clipping planes — Per-axis min/max clip in normalised 0–1 space
  • Worker-based pipeline — Parallel decompression and brick assembly off the main thread

Development

# Install dependencies
npm install

# Start development server (loads the bundled demo)
npm run dev

# Build demo for production
npm run build

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

The demo loads a sample dataset from S3. To load custom datasets, see the Usage Guide.

Browser Requirements

Kiln requires WebGPU support:

  • Chrome/Edge 113+
  • Safari 26+
  • Firefox 141+

Make sure hardware acceleration is enabled in your browser settings.

Sample Datasets

From the Open SciVis Datasets collection:

  • Chameleon - CT scan of Chamaeleo calyptratus. Digital Morphology, 2003.
  • Beechnut - MicroCT scan of a dried beechnut. Computer-Assisted Paleoanthropology, University of Zurich.
  • Stag Beetle - Industrial CT scan. Meister Eduard Gröller, Georg Glaeser, Johannes Kastner, 2005.

License

Apache 2.0


Note

Read the full write-up on dev.to

Partly Kiln builds upon my earlier work on volume rendering

About

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

Topics

Resources

License

Stars

Watchers

Forks

Contributors