@meimu/mutracer 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -11,22 +11,67 @@ Try the
11
11
  [viewer](https://mutracer.meimu-studio.com/viewer/). MuTracer is a 0.x library;
12
12
  APIs may change between minor releases.
13
13
 
14
- - **Progressive path tracing**: area, sphere, spot (with IES profiles),
15
- directional and environment lights, with multiple importance sampling.
16
- - **OpenPBR 1.1 materials**: metal, dielectric, coat, fuzz, thin film,
17
- transmission with absorption and scattering, subsurface, emission, and
18
- ray-marched height-field displacement.
19
- - **Fast scene setup**: a JavaScript port of TinyBVH's binned SAH builder
20
- builds acceleration structures, with the TinyBVH WebAssembly builder as an
21
- option; transform-only animation refits the instance hierarchy.
22
- - **Denoising**: one call enables a built-in joint non-local means filter
23
- (WebGPU and WebGL 2) or Intel Open Image Denoise (WebGPU), for the final
24
- image or while the image converges.
25
- - **Three.js friendly**: keep a `THREE.Scene` (loaded with `GLTFLoader` or
26
- built by hand) in sync with `THREESync`.
27
- - **Production output**: AgX, ACES, Cineon, Reinhard and linear tone mapping, color
28
- grading, bloom, shadow catchers, transparent backgrounds, depth of field and
29
- offline rendering with adaptive sampling.
14
+ - **WebGPU first, WebGL 2 as fallback**: unidirectional progressive path
15
+ tracing with next-event estimation and multiple importance sampling over
16
+ rect, sphere, spot (with IES profiles), directional and HDR environment
17
+ lights. Without WebGPU, the same code renders on WebGL 2.
18
+ - **OpenPBR 1.1 surface**: F82 metals, anisotropic GGX specular and coat,
19
+ fuzz, thin-film interference, dispersive transmission with absorption and
20
+ volume scattering, subsurface scattering, emission and ray-marched
21
+ height-field displacement.
22
+ - **Interactive with millions of triangles**: a two-level BVH whose BLASes are
23
+ built with binned SAH in parallel Workers (a JavaScript port of TinyBVH, or
24
+ the TinyBVH WebAssembly builder with SBVH and CWBVH layouts). Moving
25
+ instances only refits the TLAS. See [performance](#performance).
26
+ - **Low-noise sampling and denoising**: Owen-scrambled Sobol or blue-noise
27
+ ZSobol sequences. Albedo- and normal-guided denoising with Intel Open Image
28
+ Denoise (WebGPU) or a joint non-local means filter (WebGPU and WebGL 2),
29
+ while the image converges or on the final frame.
30
+ - **Incremental Three.js sync**: `THREESync` converts standard and physical
31
+ materials, lights, instancing, skinning and morph targets, and picks up
32
+ transform, material and light edits on every update without reconverting
33
+ the scene.
34
+ - **Offline-quality output**: deterministic `converge()` with variance-driven
35
+ adaptive sampling (WebGPU); AgX, ACES, Cineon, Reinhard and linear tone
36
+ mapping, color grading, bloom, thin-lens depth of field, shadow catchers and
37
+ transparent backgrounds.
38
+
39
+ ## Gallery
40
+
41
+ Rendered live in the browser. Click an image to open the scene in the viewer.
42
+
43
+ <table>
44
+ <tr>
45
+ <td width="33%"><a href="https://mutracer.meimu-studio.com/viewer/#model=yamaha-mt-09"><img src="https://cdn.jsdelivr.net/gh/pissang/mutracer-assets@main/assets/yamaha-mt-09/thumbnail.webp" alt="2025 Yamaha MT-09 SP V4" /></a><br /><sub>Yamaha MT-09 · metal and coat · <a href="https://sketchfab.com/3d-models/2025-yamaha-mt-09-sp-v4-cb5878baf5974167806eb8524d57f0b0">VTX</a>, CC-BY-NC-SA 4.0</sub></td>
46
+ <td width="33%"><a href="https://mutracer.meimu-studio.com/viewer/#model=super-human"><img src="https://cdn.jsdelivr.net/gh/pissang/mutracer-assets@main/assets/super-human/thumbnail.webp" alt="Super Human" /></a><br /><sub>Super Human · subsurface skin · <a href="https://sketchfab.com/3d-models/super-human-7aa58e978b9f4357b8e73d8e0440c896">Davyd Vidiger</a>, CC-BY 4.0</sub></td>
47
+ <td width="33%"><a href="https://mutracer.meimu-studio.com/viewer/#model=gelatinous-cube"><img src="https://cdn.jsdelivr.net/gh/pissang/mutracer-assets@main/assets/gelatinous-cube/thumbnail.webp" alt="Gelatinous Cube" /></a><br /><sub>Gelatinous Cube · transmission · <a href="https://sketchfab.com/3d-models/gelatinous-cube-e08385238f4d4b59b012233a9fbdca21">glenatron</a>, CC-BY-NC 4.0</sub></td>
48
+ </tr>
49
+ <tr>
50
+ <td width="33%"><a href="https://mutracer.meimu-studio.com/viewer/#model=dragon"><img src="https://cdn.jsdelivr.net/gh/pissang/mutracer-assets@main/assets/dragon/thumbnail.webp" alt="Glass dragon" /></a><br /><sub>Dragon · glass · <a href="https://benedikt-bitterli.me/resources/">Delatronic</a>, CC-BY 3.0</sub></td>
51
+ <td width="33%"><a href="https://mutracer.meimu-studio.com/viewer/#model=blender-cover-remix"><img src="https://cdn.jsdelivr.net/gh/pissang/mutracer-assets@main/assets/blender-cover-remix/thumbnail.webp" alt="Blender Cover Remix" /></a><br /><sub>Blender Cover Remix · characters · <a href="https://sketchfab.com/3d-models/blender-cover-remix-a38f11890ff141c88fcdac6b637fdaf8">bandinopla</a>, CC-BY 4.0</sub></td>
52
+ <td width="33%"><a href="https://mutracer.meimu-studio.com/viewer/#model=spheres"><img src="https://cdn.jsdelivr.net/gh/pissang/mutracer-assets@main/assets/spheres/thumbnail.webp" alt="OpenPBR material spheres" /></a><br /><sub>Material spheres · OpenPBR layers · procedural, CC0</sub></td>
53
+ </tr>
54
+ </table>
55
+
56
+ ## Performance
57
+
58
+ <a href="https://mutracer.meimu-studio.com/viewer/#model=bugatti-chiron"><img src="https://cdn.jsdelivr.net/gh/pissang/mutracer-assets@main/assets/bugatti-chiron/thumbnail.webp" alt="LEGO Technic Bugatti Chiron rendered in MuTracer" width="480" /></a>
59
+
60
+ The [LEGO Technic Bugatti Chiron](https://mutracer.meimu-studio.com/viewer/#model=bugatti-chiron)
61
+ (<a href="https://sketchfab.com/3d-models/lego-technic-bugatti-chiron-c2a54e2e979a4905b859c1533b498221">VTX</a>, CC-BY-NC-SA 4.0)
62
+ is a heavy scene that path traces interactively in the viewer:
63
+
64
+ | | Bugatti Chiron |
65
+ | --- | --- |
66
+ | Rendered triangles | 4.6 M (2.5 M unique, 341 geometries in 560 meshes) |
67
+ | Materials | 35 |
68
+ | Download | 12.8 MB `.glb` |
69
+ | BVH build, 1 thread | 1.7 s (built-in builder) / 1.0 s (TinyBVH WebAssembly) |
70
+ | BVH build, 4 workers (default) | 0.50 s (built-in builder) / 0.28 s (TinyBVH WebAssembly) |
71
+ | 1920 × 1080, 64 spp | 12.1 s path tracing, 12.4 s with OIDN denoising |
72
+
73
+ Measured on an Apple M4 Max: rendering in Chrome with WebGPU at the viewer's
74
+ default settings (6 bounces), BVH builds on CPU threads excluding worker startup.
30
75
 
31
76
  ## Install
32
77