Luxar Documentation

Welcome to Luxar’s documentation! Luxar is a high-performance system for compiling and visualizing arbitrary-sized n-dimensional scenes containing points, lines, Gaussian splats, and triangle meshes. Luxar delivers visualization performance limited only by your graphics card, display resolution, and network bandwidth—not by software constraints.

See it running before you install anything

demos.luxarviewer.dev hosts 88 of the bundled demos as live, interactive scenes — real compiled archives streamed from object storage, not videos.

The viewer is also deployed on its own at luxarviewer.dev and takes any reachable scene as a URL parameter, so you can point it at your own compiled archive:

https://luxarviewer.dev/?src=https://example.org/path/to/scene.luxar.zarr

The host serving that URL needs to allow cross-origin reads. See Demo Site Runbook for how the demo corpus itself is hosted.

Quick Start

Installation

pip install luxar
# or for development:
git clone https://github.com/royerlab/luxar.git
cd luxar
make setup-dev
hatch shell

Basic Usage

Create and visualize a scene with points:

from luxar.core import Dimensions
from luxar.io import LuxarZarrCompiler
import numpy as np

# Create data
positions = np.random.randn(1000, 3).astype(np.float32)
colors = np.random.rand(1000, 3).astype(np.float32)
dims = Dimensions.default_3d()

# Write to zarr
with LuxarZarrCompiler('scene.luxar.zarr') as compiler:
    scene = compiler.create_scene(dimensions=dims)
    scene.add_points('cloud', positions, colors, radii=0.1)

# Serve with viewer
# Terminal: luxar serve scene.luxar.zarr --viewer
Luxar viewer showing a 3D point cloud

Features

  • nD Visualization: Handle arbitrary-dimensional data with interactive slicing

  • Four Geometry Types: Points (soft-edged spheres), Lines (width-tapered curves), Gaussian Splats (oriented Gaussians), and Mesh (shaded triangle surfaces)

  • Performance: 100K-10M points at 60 FPS with WebGL rendering

  • Compression: 4-40x data compression with lossy/lossless options

  • Streaming: Memory-efficient lazy loading with intelligent caching

  • Spatial Indexing: Morton/Hilbert ordering for efficient queries

  • Gaussian Splatting: Fit splats to volumes for compression, denoising, and visualization

Tutorials:

Format Specifications:

Technical Specifications:

Developer Guides:

Python API Reference:

TypeScript API Reference:

Packages Overview

Core Packages

  • luxar.core - Scene graph, data structures, dimensions, transforms

  • luxar.io - Read/write Zarr files with spatial indexing

  • luxar.encoding - Array encoding with semantic types and quantization

  • luxar.validation - Data validation with helpful error messages

  • luxar.demos - Dataset, download, and runtime helpers for executable demos

  • luxar.utils - Utilities and demo data generators

  • luxar.typing_utils - Type definitions and constants

  • luxar.cli - Command-line interface

Geometry & Appearance

  • luxar.mesh - Import, decimate, and split triangle meshes

  • luxar.mesh.interop - Read PLY / OBJ / STL / VTP / glTF files

  • luxar.mesh.decimate - Coarser surfaces for substitutive mesh LOD

  • luxar.mesh.split - By-face re-indexing behind add_mesh(partition=…)

  • luxar.shading - Bake ambient occlusion into emissive geometry

Gaussian Splatting

  • luxar.gsplats - Fit and render Gaussian splats to volumes

  • luxar.gsplats.fitting - Modular fitting pipeline

  • luxar.gsplats.optim - Per-splat Adam optimizer

  • luxar.gsplats.models - Rendering models

  • luxar.gsplats.io - Save/load splat results

  • luxar.gsplats.utils - Matrix utilities

  • luxar.gsplats.seeds - Seed generation strategies

  • luxar.gsplats.clahe - CLAHE-based sampling

  • luxar.gsplats.calibration - Blind-spot cross-validation for splat count K

  • luxar.gsplats.lod - Level-of-detail topology construction

  • luxar.gsplats.batch - Batch fitting across GPUs / Slurm clusters

Support