Skip to content

RayMakie/Hikari renderer experiment: volume-mode animation at 3.5 s/frame - #39

Draft
SebastianM-C wants to merge 4 commits into
mainfrom
worktree-raymakie
Draft

RayMakie/Hikari renderer experiment: volume-mode animation at 3.5 s/frame#39
SebastianM-C wants to merge 4 commits into
mainfrom
worktree-raymakie

Conversation

@SebastianM-C

Copy link
Copy Markdown
Owner

What

Evaluates RayMakie + Hikari (Julia-native spectral path tracing over Vulkan/Lava, from the RayDemo repo's dev branches) as a replacement for the RPRMakie/HybridPro animation pipeline. Adds animation/raymakie/: a render-only env, a physics-side payload precompute (precompute_frames.jl, runs in the animation env), the renderer (thomson_ray.jl, mesh|volume styles, scene reuse via observables, EDM_RAY_* knobs), measurement sweeps, and NOTES.md with the full verdict.

Why a two-process split

Hikari pins StructArrays 0.6 while SciMLBase 3 needs StructArrays 0.7 (via RecursiveArrayTools 4) — the physics stack and the ray stack cannot resolve into one env. Payloads cross the boundary as plain tuples/arrays.

Headline numbers (W7900, RADV, 1280×960)

configuration per frame
RPR HybridPro production (700 iter) 10–15 s + 1.7 GB/frame leak → 16-frame chunked processes
RayMakie volume style, SW BVH, 64 spp 3.5 s, single process, no leak (61-frame clip)
RayMakie volume style, HW RT 6.3 s (works, but volume cost dominates)
RayMakie mesh style not viable today: 209 s BLAS build / 2282 s observable mesh swap

Volume mode renders the radiation cube + analytic pulse as true emissive media (RGBGridMedium from raw Julia arrays) — the thing RPR segfaults on — and the emission genuinely lights the room. Static mesh-style port reproduces the locked look closely on first try (stills in animation/raymakie/, vs rpr_frames_v3).

Upstream bugs found (reproducers included)

  1. RGBGridMedium(σ_s_grid=nothing) renders the whole bounding box as uniform fog (mwe_medium.jl); explicit zero grid fixes it
  2. Observable mesh swap ~10× slower than a full scene rebuild (2282 s vs 209 s, ~1.6 M tris)
  3. hw_accel=true DEVICE_LOSTs on multi-million-triangle BLAS builds (fine on small scenes)

Verdict

Adopt for the volume look after a human lookdev pass (mapping knobs are in place; cores still trend white and grading isn't matched to the locked RPR level). Keep rpr_frames_v3 as the shipped mesh-style render. Details + remaining work in animation/raymakie/NOTES.md.

Headless recipe (no X session): kwin_wayland --virtual --socket=wayland-edm + WAYLAND_DISPLAY=wayland-edm JULIA_GLFW_PLATFORM=wayland (GLFW.jl hardcodes X11 on Linux).

🤖 Generated with Claude Code

SebastianM-C and others added 4 commits July 16, 2026 17:04
…der scripts

Two-process split because Hikari (StructArrays 0.6) and SciMLBase 3
(RecursiveArrayTools 4 → StructArrays 0.7) cannot resolve into one env:
precompute_frames.jl (animation env) dumps plain-array frame payloads;
thomson_ray.jl (raymakie env) renders them via Lava Vulkan on the W7900.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
First stills on the W7900 (SW BVH, 64 spp, 1280x960): look is close to the
RPR reference out of the box, but the flash frame (both stripe stacks in
scene, index-1.5 Dielectric on OPEN iso-surface sheets) took 2327 s —
suspected TIR loops burning the depth-16 budget. HW RT DEVICE_LOSTs on the
same scene (fine on the small Materials demo). Sweep isolates interface
model × depth.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…_s grid

Two upstream bugs pinned with mwe_medium.jl: (1) RGBGridMedium with
σ_s_grid=nothing renders the whole bounding box as uniform fog; an explicit
zero grid restores emission-only behavior. (2) A Dielectric boundary makes
shadow rays treat the volume box as opaque — NullMaterial interface only
(documented in RayMakie plots/volume.jl). Pulse medium gets its own floor
(0.45, the mesh ±0.5 isolevel) so the envelope core doesn't saturate.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
61-frame flash clip at 1280x960/64spp in ONE process: 3.5 s/frame steady
(RPR HybridPro: 10-15 s + 1.7 GB/frame leak). HW RT works on the volume
scene but is slower (6.3 s) — volume cost dominates; SW BVH is the
production path. Mesh style stays blocked upstream (209 s BLAS build,
2282 s observable mesh swap). Verdict: adopt for the volume look after a
lookdev pass; upstream issues listed in NOTES.md.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant