rayzee 11.8.0 → 11.9.0

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.
Files changed (53) hide show
  1. package/README.md +18 -6
  2. package/dist/{ArchiveImporter-_sJm5uaK.js → ArchiveImporter-BJxszU_k.js} +1549 -1232
  3. package/dist/{BidirectionalIntegrator-Dzt4Z97x.js → BidirectionalIntegrator-DWg66vAd.js} +240 -240
  4. package/dist/{BufferLayout-xPRH9jYD.js → BufferLayout-Bzgccg1o.js} +1 -0
  5. package/dist/{ColorManagement-30MfpHwQ.js → ColorManagement-B_HjAiy2.js} +1 -1
  6. package/dist/{EngineIssues-xljoXM0E.js → EngineIssues-CfJiBaNj.js} +1 -0
  7. package/dist/{NeuralRetouch-BKQCsmEs.js → NeuralRetouch-BD9E-Yht.js} +1 -1
  8. package/dist/{NeuralSuperRes-C4ymq68e.js → NeuralSuperRes-C8Mf3tJX.js} +1 -1
  9. package/dist/{PathTracer-C_to_i40.js → PathTracer-DeE9UJ1n.js} +3433 -3363
  10. package/dist/{PhysicalSky-bMHbm_7H.js → PhysicalSky-cKy75-oR.js} +45 -45
  11. package/dist/{RayzeeRenderer-B_aB6VTJ.js → RayzeeRenderer-CzLyBA3G.js} +13 -8
  12. package/dist/{SceneMetadata-CSmlJW4c.js → SceneMetadata-C17UfOEp.js} +1 -1
  13. package/dist/{SolarLimb-bZE6y63S.js → SolarLimb-DRYy8tln.js} +184 -172
  14. package/dist/addons/archives.es.js +1 -1
  15. package/dist/addons/bidirectional.es.js +1 -1
  16. package/dist/addons/color.es.js +1 -1
  17. package/dist/addons/physical-sky.es.js +1 -1
  18. package/dist/addons/storage.es.js +1 -1
  19. package/dist/{openStorage-B085D9FR.js → openStorage-CdyVjmps.js} +1 -1
  20. package/dist/rayzee-core.es.js +7 -7
  21. package/dist/rayzee.es.js +567 -559
  22. package/dist/rayzee.umd.js +106 -101
  23. package/dist/{sceneCachePolicy-D_uBSbQF.js → sceneCachePolicy-ywbGKHD3.js} +9 -6
  24. package/package.json +1 -1
  25. package/src/EngineDefaults.js +1 -0
  26. package/src/EngineIssues.js +1 -0
  27. package/src/Passes/OIDNTemporalHistory.js +1 -1
  28. package/src/Processor/ArchiveImporter.js +83 -21
  29. package/src/Processor/AssetLoader.js +7 -0
  30. package/src/Processor/BufferLayout.js +3 -3
  31. package/src/Processor/GeometryExtractor.js +12 -4
  32. package/src/Processor/MaterialPacking.js +2 -2
  33. package/src/Processor/PBRT/PBRTMaterials.js +47 -12
  34. package/src/Processor/PBRT/PBRTParser.js +144 -22
  35. package/src/Processor/PBRT/PBRTSceneBuilder.js +287 -67
  36. package/src/Processor/PBRT/PBRTTextureBake.js +191 -9
  37. package/src/Processor/PBRT/index.js +19 -4
  38. package/src/Processor/SceneProcessor.js +42 -26
  39. package/src/RayzeeRenderer.js +4 -2
  40. package/src/Stages/DenoiserSettings.js +0 -4
  41. package/src/Stages/NRD.js +53 -24
  42. package/src/Stages/NormalDepth.js +5 -3
  43. package/src/Stages/PathTracer.js +2 -0
  44. package/src/Stages/PathTracerStage.js +5 -1
  45. package/src/Storage/SceneGraphCodec.js +6 -3
  46. package/src/TSL/BVHTraversal.js +33 -20
  47. package/src/TSL/Common.js +25 -8
  48. package/src/TSL/Displacement.js +66 -113
  49. package/src/TSL/LightsDirect.js +33 -11
  50. package/src/TSL/SceneResources.js +8 -0
  51. package/src/TSL/ShadeKernel.js +2 -2
  52. package/src/TSL/Struct.js +1 -0
  53. package/src/managers/MaterialDataManager.js +11 -0
package/README.md CHANGED
@@ -100,8 +100,9 @@ npm install rayzee three
100
100
  // Load a 3D model (place .glb in public/ folder)
101
101
  await engine.loadModel('/scene.glb');
102
102
 
103
- // Or load an environment map
104
- // await engine.loadEnvironment('/environment.hdr');
103
+ // Light it: a model alone renders black. The physical sky needs no file;
104
+ // for an HDRI, await engine.loadEnvironment('/environment.hdr') instead.
105
+ await engine.environmentManager.setMode('procedural');
105
106
 
106
107
  // Start rendering
107
108
  engine.animate();
@@ -146,7 +147,7 @@ A single HTML file — no Node.js, no build step. Uses [ES module import maps](h
146
147
  "three/tsl": "https://cdn.jsdelivr.net/npm/three@0.186.0/build/three.tsl.js",
147
148
  "three/webgpu": "https://cdn.jsdelivr.net/npm/three@0.186.0/build/three.webgpu.js",
148
149
  "three/addons/": "https://cdn.jsdelivr.net/npm/three@0.186.0/examples/jsm/",
149
- "oidn-web": "https://cdn.jsdelivr.net/npm/oidn-web@0.4.0/dist/oidn.js",
150
+ "oidn-web/": "https://cdn.jsdelivr.net/npm/oidn-web@0.5.0/",
150
151
  "rayzee": "https://cdn.jsdelivr.net/npm/rayzee/dist/rayzee.es.js"
151
152
  }
152
153
  }
@@ -165,6 +166,8 @@ A single HTML file — no Node.js, no build step. Uses [ES module import maps](h
165
166
  await engine.init();
166
167
  // Replace with your own model URL
167
168
  await engine.loadModel('https://your-cdn.com/scene.glb');
169
+ // Light it: a model alone renders black. The physical sky needs no file.
170
+ await engine.environmentManager.setMode('procedural');
168
171
  engine.animate();
169
172
 
170
173
  window.addEventListener('resize', () => {
@@ -545,8 +548,16 @@ const image = await renderer.renderToBuffer({ colorSpace: 'srgb' });
545
548
  renderer.dispose();
546
549
  ```
547
550
 
548
- Two runnable examples live in the repository: `rayzee/examples/core-node.mjs` (the core alone, in Node, writing a PNG)
549
- and `rayzee/examples/core-browser/` (the core plus the physical sky, accumulating on a canvas).
551
+ Runnable examples live in the repository's `rayzee/examples/`, each run against the engine in that checkout:
552
+
553
+ | Example | What it shows | Run (from the repository root) |
554
+ |---|---|---|
555
+ | `core-node.mjs` | the core alone, in Node, writing a PNG | `npm run example:node` |
556
+ | `core-browser/` | the core plus the physical sky, accumulating on a canvas | `npm run example:browser` |
557
+ | `viewer-browser/` | the full engine in a page: a model, an HDRI, OIDN on the finished image | `npm run example:viewer` |
558
+ | `render.mjs` | the full engine in Node: any model and sky, any size, denoised, saved as `render.png` (options at the top of the file) | `npm run example:render -- --model scene.glb` |
559
+
560
+ `npm run bench:examples` runs all four and fails if any of them throws or logs an error or warning.
550
561
 
551
562
  #### Add-ons
552
563
 
@@ -1060,6 +1071,7 @@ surface** — pin a version and branch on the strings; they are never renamed or
1060
1071
  | `adapter.software` | the GPU is a software rasteriser (SwiftShader, llvmpipe, lavapipe, WARP) |
1061
1072
  | `asset.unreachable` / `asset.ambiguous_entry` | the asset could not be fetched, or an archive held several candidate models |
1062
1073
  | `asset.archive_too_large` / `asset.entry_too_large` | an archive or one of its entries exceeded the byte budget |
1074
+ | `asset.parameters_ignored` | a pbrt scene sets parameters the loader ignores (`detail.unused`) or only approximates (`detail.approximated`), each `directive type: name` with how many directives set it — a warning |
1063
1075
  | `texture.build_failed` / `texture.processing_fallback` / `texture.limit_exceeded` | a texture could not be built, fell back to a slower path, or exceeded the per-map-type cap |
1064
1076
  | `environment.load_failed` | the environment map failed to load |
1065
1077
  | `setting.unknown_key` | a setting name reached no stage — how a typo becomes a wrong image |
@@ -1714,7 +1726,7 @@ import { setBindingAudit, getBindingAuditFindings, clearBindingAuditFindings } f
1714
1726
 
1715
1727
  | Package | Purpose | Install needed? |
1716
1728
  |---|---|---|
1717
- | `oidn-web` | Intel Open Image Denoise for high-quality final renders | Yes — `npm install oidn-web` (**>=0.4.0**) |
1729
+ | `oidn-web` | Intel Open Image Denoise for high-quality final renders | Yes — `npm install oidn-web` (**>=0.5.0**) |
1718
1730
  | `onnxruntime-web` | AI-powered upscaling | No — loaded from CDN at runtime |
1719
1731
  | `@bb-studio/ocio` | OpenColorIO runtime for [Colour Management](#colour-management) (~6 MB WebAssembly) | Only to load colour configs — `npm install @bb-studio/ocio`, then pass it as `ocioRuntimeFactory` |
1720
1732