Skip to main content

Real-time 3D fly-through explorer for mesh-free/unstructured simulation data

Project description

vizmo

Real-time 3D fly-through explorer for unstructured simulation data. Loads HDF5 snapshots from GIZMO/Gadget simulations and renders interactive surface density maps, mass-weighted averages, velocity dispersions, and composite CoolMap visualizations on the GPU via WebGPU.

This is a vibecoded app. I have no idea how its front- or backends work, and am not sure if I could really properly support or get it running for you 10 years from now! But it would not exist otherwise. Software is weird now. It is what it is.

But I hope you enjoy it and please feel free to report bugs or request features.

Installation

pip install -e .

Requirements

  • Python >= 3.9
  • WebGPU-capable GPU (Metal on macOS, Vulkan on Linux, D3D12 on Windows)

Quickstart

Point vizmo at an HDF5 snapshot file:

vizmo path/to/snapshot.hdf5

The snapshot must contain gas particle data (PartType0) with at minimum Coordinates, Masses, and KernelMaxRadius (or SmoothingLength) fields. Star particles (PartType5) are also supported if present.

CLI options

vizmo snapshot.hdf5 [--width 1920] [--height 1080] [--fov 90]
                        [--fullscreen] [--screenshot OUT.png]
                        [--profile OUT.pstats]

Rendering backend

vizmo uses a WebGPU backend (wgpu-py) with GPU-resident particle data. Compute shaders perform frustum culling, LOD selection, and per-cell summary gathering with zero CPU↔GPU per-frame transfer. On unified-memory systems (Apple Silicon) field switches are also near-zero copy.

The renderer uses progressive refinement and an auto-LOD subsample cap that adapts within a user-controlled ceiling to keep interaction smooth during motion and sharpen on idle.

Controls

Camera:

  • W/A/S/D — Move forward/left/back/right
  • Z/X — Move up/down
  • Q/E — Roll left/right
  • Mouse (click + drag) — Look around
  • Scroll wheel — Adjust speed

Visualization:

  • Tab — Hide/show all UI
  • C — Cycle colormap
  • L — Toggle log/linear scale
  • R — Auto-range color scale (composite: Color slot)
  • T — Auto-range composite Lightness slot
  • +/- — Contract/expand color range
  • [/] — Coarser/finer LOD pixel size
  • ,/. — Lower/raise the auto-LOD subsample-cap ceiling
  • P — Save screenshot
  • F1 or \ — Toggle dev overlay
  • Esc — Quit

Render Modes

Select from the Mode dropdown in the user menu:

  • SurfaceDensity — Projected surface density of a weight field. Supports combining two fields with arithmetic operators (Op / Field 2).
  • WeightedAverage — Mass-weighted line-of-sight average of a data field.
  • WeightedVariance — Mass-weighted line-of-sight standard deviation (e.g. velocity dispersion).
  • Composite — CoolMap-style dual-field visualization. Encodes one field in lightness and another in colormap hue. Each channel has independent render mode, field selection, limits, and scaling.

Vector Fields

3D vector fields (e.g. Velocities) are automatically detected. When selected as a weight or data field, a Proj dropdown appears:

  • LOS — Per-particle line-of-sight component (dot product with the unit vector from the camera to the particle). Invariant under camera rotation; recomputed when the camera translates past a small threshold.
  • |v| — Euclidean norm.
  • |v|^2 — Squared norm.

Architecture

vizmo/
  app.py            - CLI entry point
  wgpu_app.py       - Main loop, key actions, progressive refinement, auto-LOD
  wgpu_renderer.py  - WGPURenderer: RenderMode, accumulate + resolve + composite passes
  gpu_compute.py    - GPUCompute: GPU-resident data, compute cull/LOD/gather
  wgpu_overlay.py   - WGPUDevOverlay, WGPUUserMenu (wgpu panel rendering)
  overlay.py        - Panel/PanelStyle base, DevOverlay, UserMenu
  camera.py         - 6DOF camera with cached basis vectors
  data_manager.py   - HDF5 I/O with lazy loading and cosmological corrections
  field_ops.py      - Field arithmetic and vector projections
  colormaps.py      - Matplotlib colormap to GPU texture
  shaders/          - WGSL shaders (common, splat_subsample, resolve, composite,
                      star, text)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vizmo-0.1.3.tar.gz (549.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vizmo-0.1.3-py3-none-any.whl (549.1 kB view details)

Uploaded Python 3

File details

Details for the file vizmo-0.1.3.tar.gz.

File metadata

  • Download URL: vizmo-0.1.3.tar.gz
  • Upload date:
  • Size: 549.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.0

File hashes

Hashes for vizmo-0.1.3.tar.gz
Algorithm Hash digest
SHA256 61ae631e1bf795f4f76cf975e1717938f23c8bba88e2512abd5c271892f423f0
MD5 3dd35351804c5c25530154ecedd2fca1
BLAKE2b-256 f7e31f0086fd9564405c363e3a68b0aac60f67011fda4f9bb565e69f4d2abab1

See more details on using hashes here.

File details

Details for the file vizmo-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: vizmo-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 549.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.0

File hashes

Hashes for vizmo-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c5362a4dc769f484a4e2da4990cf78fb6c94adb588b5baa006315add5c0eeac4
MD5 2a0d4c2fd9454294e0ac899deb2097d6
BLAKE2b-256 8a9f6ce71712f1349ba36c4ca08e079a984e152f92ff344cfd44cddc5565ccd4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page