rayzee 11.7.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.
- package/README.md +31 -6
- package/dist/{ArchiveImporter-DYcRXeKE.js → ArchiveImporter-BJxszU_k.js} +2353 -1356
- package/dist/{BidirectionalIntegrator-BvjRpbTP.js → BidirectionalIntegrator-DWg66vAd.js} +302 -301
- package/dist/{BufferLayout-xPRH9jYD.js → BufferLayout-Bzgccg1o.js} +1 -0
- package/dist/{ColorManagement-oeEk7oSu.js → ColorManagement-B_HjAiy2.js} +1 -1
- package/dist/{EngineIssues-CIZnXHsF.js → EngineIssues-CfJiBaNj.js} +19 -8
- package/dist/{NeuralRetouch-ClaMiKYg.js → NeuralRetouch-BD9E-Yht.js} +2 -2
- package/dist/{NeuralSuperRes-WNEXun9s.js → NeuralSuperRes-C8Mf3tJX.js} +2 -2
- package/dist/{PathTracer-B9wZPPVL.js → PathTracer-DeE9UJ1n.js} +3530 -3402
- package/dist/{PhysicalSky-DcjItqKi.js → PhysicalSky-cKy75-oR.js} +45 -45
- package/dist/{RayzeeRenderer-p-NeE6E2.js → RayzeeRenderer-CzLyBA3G.js} +378 -374
- package/dist/SceneMetadata-C17UfOEp.js +183 -0
- package/dist/{SolarLimb-bZE6y63S.js → SolarLimb-DRYy8tln.js} +184 -172
- package/dist/{ToneMapGPU-sAs8wdgI.js → ToneMapGPU-4GPwoG_c.js} +13 -6
- package/dist/addons/archives.es.js +1 -1
- package/dist/addons/bidirectional.es.js +1 -1
- package/dist/addons/color.es.js +1 -1
- package/dist/addons/physical-sky.es.js +1 -1
- package/dist/addons/storage.es.js +1 -1
- package/dist/{openStorage-Fe9BoS1_.js → openStorage-CdyVjmps.js} +1 -1
- package/dist/rayzee-core.es.js +7 -7
- package/dist/rayzee.es.js +821 -794
- package/dist/rayzee.umd.js +112 -103
- package/dist/{sceneCachePolicy-B9w3BnaP.js → sceneCachePolicy-ywbGKHD3.js} +9 -6
- package/package.json +1 -1
- package/src/EngineDefaults.js +1 -0
- package/src/EngineIssues.js +21 -6
- package/src/Passes/AIUpscaler.js +4 -0
- package/src/Passes/OIDNDenoiser.js +8 -6
- package/src/Passes/OIDNTemporalHistory.js +1 -1
- package/src/PathTracerApp.js +10 -1
- package/src/Processor/ArchiveImporter.js +106 -27
- package/src/Processor/AssetLoader.js +22 -0
- package/src/Processor/BufferLayout.js +3 -3
- package/src/Processor/GeometryExtractor.js +12 -4
- package/src/Processor/LightSerializer.js +6 -2
- package/src/Processor/MaterialPacking.js +2 -2
- package/src/Processor/PBRT/PBRTMaterials.js +49 -13
- package/src/Processor/PBRT/PBRTParser.js +144 -22
- package/src/Processor/PBRT/PBRTSceneBuilder.js +287 -67
- package/src/Processor/PBRT/PBRTTextureBake.js +191 -9
- package/src/Processor/PBRT/index.js +19 -4
- package/src/Processor/PlatformImageLoader.js +9 -0
- package/src/Processor/SceneProcessor.js +42 -26
- package/src/Processor/TextureCreator.js +44 -4
- package/src/Processor/ToneMapCPU.js +34 -5
- package/src/Processor/ToneMapGPU.js +15 -9
- package/src/Processor/USD/USDScene.js +981 -17
- package/src/RayzeeRenderer.js +85 -28
- package/src/Stages/AutoExposure.js +21 -8
- package/src/Stages/Compositor.js +39 -1
- package/src/Stages/DenoiserSettings.js +0 -4
- package/src/Stages/LocalExposure.js +44 -18
- package/src/Stages/NRD.js +53 -24
- package/src/Stages/NormalDepth.js +12 -6
- package/src/Stages/PathTracer.js +27 -1
- package/src/Stages/PathTracerStage.js +14 -2
- package/src/Storage/SceneGraphCodec.js +6 -3
- package/src/TSL/BVHTraversal.js +33 -20
- package/src/TSL/CameraRay.js +12 -1
- package/src/TSL/Common.js +25 -8
- package/src/TSL/DebugKernel.js +3 -2
- package/src/TSL/Displacement.js +66 -113
- package/src/TSL/FinalWriteKernel.js +4 -7
- package/src/TSL/GenerateKernel.js +6 -2
- package/src/TSL/LightSplatKernel.js +7 -4
- package/src/TSL/LightsCore.js +6 -2
- package/src/TSL/LightsDirect.js +33 -11
- package/src/TSL/LightsSampling.js +45 -12
- package/src/TSL/SceneResources.js +19 -0
- package/src/TSL/ShadeKernel.js +3 -4
- package/src/TSL/Struct.js +1 -0
- package/src/integrators/BidirectionalIntegrator.js +1 -0
- package/src/managers/CameraManager.js +9 -0
- package/src/managers/DenoisingManager.js +1 -0
- package/src/managers/InteractionManager.js +6 -0
- package/src/managers/MaterialDataManager.js +11 -0
- package/src/managers/UniformManager.js +3 -1
- package/dist/SceneMetadata-D2Sh-0e-.js +0 -110
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
|
-
//
|
|
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.
|
|
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
|
-
|
|
549
|
-
|
|
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 |
|
|
@@ -1079,6 +1091,19 @@ surface** — pin a version and branch on the strings; they are never renamed or
|
|
|
1079
1091
|
`asset.unreachable` also covers what the engine fetches for itself: OIDN weights, IES profiles and
|
|
1080
1092
|
gobos (`detail.asset` says which).
|
|
1081
1093
|
|
|
1094
|
+
`init()` cannot degrade past a missing GPU, so these three always reject it with an
|
|
1095
|
+
`EngineIssueError`, strict or not, and are recorded too. `error.cause` is the WebGPU error, when there was one:
|
|
1096
|
+
|
|
1097
|
+
| Code | Raised when |
|
|
1098
|
+
|---|---|
|
|
1099
|
+
| `webgpu.unavailable` | there is no `navigator.gpu`, or three.js could start only WebGL2 on the canvas |
|
|
1100
|
+
| `adapter.unavailable` | `requestAdapter()` returned no adapter or rejected — no GPU, or no driver for it |
|
|
1101
|
+
| `device.unavailable` | the adapter was found but `requestDevice()` rejected |
|
|
1102
|
+
|
|
1103
|
+
```js
|
|
1104
|
+
try { await engine.init(); } catch (error) { metrics.failure = error.code ?? 'unknown'; }
|
|
1105
|
+
```
|
|
1106
|
+
|
|
1082
1107
|
`settings.getEffective()` is the companion for the `setting.unknown_key` case: it returns every live
|
|
1083
1108
|
setting as `{ value, source, routed }`, and `routed: false` means stored but reaching no stage.
|
|
1084
1109
|
|
|
@@ -1701,7 +1726,7 @@ import { setBindingAudit, getBindingAuditFindings, clearBindingAuditFindings } f
|
|
|
1701
1726
|
|
|
1702
1727
|
| Package | Purpose | Install needed? |
|
|
1703
1728
|
|---|---|---|
|
|
1704
|
-
| `oidn-web` | Intel Open Image Denoise for high-quality final renders | Yes — `npm install oidn-web` (**>=0.
|
|
1729
|
+
| `oidn-web` | Intel Open Image Denoise for high-quality final renders | Yes — `npm install oidn-web` (**>=0.5.0**) |
|
|
1705
1730
|
| `onnxruntime-web` | AI-powered upscaling | No — loaded from CDN at runtime |
|
|
1706
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` |
|
|
1707
1732
|
|