Move 'neural' multiple scattering onto the shared pmndrs neural tooling
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Refactor
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
- Domain
- machine-learning
Research direction
Start with the MLP and weight loading in packages/vdb/src/core/frame/ and packages/vdb/src/tools/frame/neural.ts, then review the sibling @pmndrs/denoiser runtime interface and WGSL package. Check the CPU twin tests in packages/vdb/test/tools/frame-neural-train.test.ts and the frame comparisons in e2e/k6-frames.spec.ts; done means the neural path uses shared tooling, meets the stated CPU and image checks, and preserves the reported bias bound.
Written by the indexing model from the issue text.
Description
Summary
multipleScattering: 'neural' estimates multiple-scattered light in a cloud with a small MLP. It should run on the shared pmndrs neural tooling instead of our own one-off MLP code and trainer: pmndrs/denoiser, whose @pmndrs/denoiser-core defines a runtime-agnostic network interface on the host's GPUDevice, with hand-written WGSL (@pmndrs/denoiser-wgsl) and WebNN (@pmndrs/denoiser-webnn) runtimes.
What it is today
- Network: 20 inputs → 32 → 32 → 1,
expoutput, about 1.7k multiply-adds.- Inputs:
log(1 + σ·h·2^k)at the point and at ±h·2^k toward the light for 6 box-mip levels, plus the direct optical depth and an albedo term. - No anisotropy input: it is trained for Henyey-Greenstein g = 0.8.
- Inputs:
- Where it runs: on the GPU, once per cell of the shadow grid (64³ by default), only when that grid is rebuilt. That happens when a light, a volume or the shadow region moves; static frames skip it. It does not run per pixel.
- Code:
- The generic MLP the core evaluates:
renderer.mlp, built withvdbFrameMlpFromNeural(packages/vdb/src/core/frame/,packages/vdb/src/tools/frame/neural.ts). - The weights, as data:
packages/vdb/src/tools/frame/neural-weights.ts. These are our own weights, trained on procedural media only (K6.N). - The trainer:
scripts/k6/neural/, ported from mjurczyk/openvdb'sscripts/neural-indirect/(MIT). Its target is the scattered fluence by delta tracking with ratio-tracking next-event estimation. - The CPU twin and tests:
packages/vdb/test/tools/frame-neural-train.test.ts, plus the k6-core gather / transmittance probes.
- The generic MLP the core evaluates:
- Status: the default multiple-scattering mode (
multipleScattering: 'neural', D36), now with our weights. Against the K6.R path-traced reference, the mean |bias| over 16 held-out scene groups is 10.0% for 'neural' and 18.8% for two-sided (handoffdocs/archive/handoffs/K6-N.md). Its runtime cost is not measured yet (K6.T).
Goal
- Run inference through the sibling neural tooling: its WGSL layers, weight format and loading.
- Train with the sibling tooling where it fits, and keep the dataset and target generation here (procedural media only, so the weights carry no data licence).
- Keep the core engine-free (D20) and the one-storage-buffer-per-kernel / host-encoder rules (D10). The network stays pluggable: weights as data,
nullfalls back to 1D diffusion.
Acceptance
- The 'neural' kernels match their CPU twin within the existing bound, with a fail-before mutation.
- Every frame that doesn't use 'neural' is byte-identical in
e2e/k6-frames.spec.ts. scripts/k6/reference-report.mjs: 'neural' bias on the 16 groups is no worse than K6.N's.- Open follow-ups to fold in if the tooling makes them easy (K6.Na):
- an anisotropy input, so one network serves every g;
- a lower-noise training target;
- a timing against two-sided on hardware (K6.T).
Refs: DECISIONS D34, D35 (2), D36; DIVERGES V157–V158; TASKS K6.Na.
- Dominant language
- TypeScript
- Stars
- 1
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from pmndrs/vdb
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 35/100
Similar issues
-
bug zoo
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
software-mansion/runntime#151 ·
Maintainers usually reply within 4 days
-
Difficulty 1/5 1-3 hours Newbie friendliness 86/100
sidebandstudio/clawtrate#728 ·
Maintainers usually reply within 1 day
-
enhancement github_actions help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
tranquilo-art/tranquilo-app#254 ·
Maintainers usually reply within 1 day
-
docs good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 87/100
DojoCodingLabs/hermit#73 ·
Maintainers usually reply within 1 day
-
documentation good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Tfoucher5/fuzzy-toolkit#44 ·
Maintainers usually reply within 1 day