rayzee 8.6.1 → 8.8.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 +35 -6
- package/dist/rayzee.es.js +4114 -2994
- package/dist/rayzee.umd.js +256 -18
- package/package.json +1 -1
- package/src/EngineDefaults.js +2 -0
- package/src/Passes/OIDNDenoiser.js +36 -10
- package/src/Passes/OIDNTemporalHistory.js +569 -0
- package/src/PathTracerApp.js +131 -7
- package/src/Processor/AssetLoader.js +14 -8
- package/src/Processor/EmissiveTriangleBuilder.js +70 -0
- package/src/Processor/PBRT/PBRTAnimation.js +646 -0
- package/src/Processor/PBRT/PBRTParser.js +179 -52
- package/src/Processor/PBRT/PBRTSceneBuilder.js +181 -25
- package/src/Processor/PBRT/index.js +73 -14
- package/src/Processor/SceneProcessor.js +22 -0
- package/src/Stages/NormalDepth.js +94 -3
- package/src/Stages/PathTracer.js +1 -0
- package/src/Stages/PathTracerStage.js +20 -1
- package/src/managers/AnimationManager.js +202 -8
- package/src/managers/DenoisingManager.js +254 -5
package/README.md
CHANGED
|
@@ -331,6 +331,7 @@ engine.animate() // Start the render loop
|
|
|
331
331
|
engine.pause() // Pause rendering
|
|
332
332
|
engine.resume() // Resume rendering
|
|
333
333
|
engine.reset() // Reset accumulation (restart from sample 0)
|
|
334
|
+
engine.reset(false, { motion: true }) // Same, when only placements or geometry moved: keeps OIDN's motion history
|
|
334
335
|
engine.dispose() // Clean up all resources
|
|
335
336
|
engine.wake() // Resume render loop if idle
|
|
336
337
|
```
|
|
@@ -629,6 +630,7 @@ engine.denoisingManager.setAutoExposureParams({ keyValue: 0.18 })
|
|
|
629
630
|
engine.denoisingManager.setOIDNEnabled(true)
|
|
630
631
|
engine.denoisingManager.setOIDNQuality('high')
|
|
631
632
|
engine.denoisingManager.setStrategy('oidn') // OIDN owns the live view; see below
|
|
633
|
+
engine.denoisingManager.setTemporalHistory(false) // live OIDN without the motion history (default on)
|
|
632
634
|
engine.denoisingManager.continuousDenoiseInterval = 250 // cap refreshes at 4/sec (default 8 = uncapped)
|
|
633
635
|
engine.denoisingManager.setUpscalerEnabled(true)
|
|
634
636
|
engine.denoisingManager.setUpscalerScaleFactor(2) // 2 or 4
|
|
@@ -1129,8 +1131,8 @@ switching the final pass on says nothing about the live view. All six combinatio
|
|
|
1129
1131
|
| `'none'` | `true` | raw | raw | OIDN |
|
|
1130
1132
|
| `'asvgf'` | `false` | ASVGF | ASVGF | ASVGF's last frame |
|
|
1131
1133
|
| `'asvgf'` | `true` | ASVGF | ASVGF | OIDN |
|
|
1132
|
-
| `'oidn'` | `false` |
|
|
1133
|
-
| `'oidn'` | `true` |
|
|
1134
|
+
| `'oidn'` | `false` | OIDN, from the motion history | OIDN, refreshing | one last refresh |
|
|
1135
|
+
| `'oidn'` | `true` | OIDN, from the motion history | OIDN, refreshing | OIDN, full quality |
|
|
1134
1136
|
|
|
1135
1137
|
`denoiser.enabled` is the union of the two — "OIDN is in use at all", which is what the aux G-buffer
|
|
1136
1138
|
wiring needs — so read the two decisions back from `denoisingManager.denoiserStrategy` and
|
|
@@ -1149,6 +1151,31 @@ wall-clock cadence lands on is not reproducible.
|
|
|
1149
1151
|
Leaving the live view raw is not just "denoising off" — it is the only way to see the true noise
|
|
1150
1152
|
level, which is how you judge whether a render has actually settled. That is row one and row two.
|
|
1151
1153
|
|
|
1154
|
+
#### While the view moves
|
|
1155
|
+
|
|
1156
|
+
Every frame restarts while the camera or an object moves, so a refresh would otherwise denoise one
|
|
1157
|
+
fresh sample with its own independent noise, and OIDN's guesses would jump from refresh to refresh
|
|
1158
|
+
("boiling"). Instead each restarted frame is blended into a per-pixel **motion history**, reprojected
|
|
1159
|
+
into the current view, and the live refreshes denoise that. Measured on a 1.7M-triangle interior at
|
|
1160
|
+
512² against 128-sample references: blotchy flicker 2.12 → 0.90 while orbiting and 1.72 → 0.78 moving
|
|
1161
|
+
forward, each frame 16 % closer to the clean render, refresh rate unchanged.
|
|
1162
|
+
|
|
1163
|
+
- Reflections and a moving object's lighting do not travel with the surface, so shiny pixels and
|
|
1164
|
+
pixels of moved objects keep only about 2 frames of history.
|
|
1165
|
+
- When the view stops, the history is blended into the fresh accumulation and fades out over the
|
|
1166
|
+
first 16 samples; the final denoise always reads the plain accumulation.
|
|
1167
|
+
- A reset that changes what the scene looks like (a light, a material, a setting) drops the history.
|
|
1168
|
+
Moves go through `reset(true)` (the camera) or `reset(false, { motion: true })`, which the engine's
|
|
1169
|
+
own `updateMeshTransforms`, `refitBVH`, `refitBLASes` and animation playback already use.
|
|
1170
|
+
- Moved placements are followed through their matrices when they move through
|
|
1171
|
+
`updateMeshTransforms` or rigid animation; deformed geometry is rejected by its changed depth.
|
|
1172
|
+
- Cost, only while OIDN owns the live view: +154 MB of VRAM at 512², +232 MB at 1024², and ~5 % GPU
|
|
1173
|
+
per frame while moving, mostly the `NormalDepth` stage it switches on. At a size the refresh
|
|
1174
|
+
cadence has proven too slow to denoise while moving (the raw render owns the view there), both are
|
|
1175
|
+
released until the size changes.
|
|
1176
|
+
|
|
1177
|
+
`setTemporalHistory(false)` returns to denoising the single fresh frame.
|
|
1178
|
+
|
|
1152
1179
|
#### Quality while it runs vs. quality when it finishes
|
|
1153
1180
|
|
|
1154
1181
|
`oidnQuality` is **the quality of the finished image**. The refreshes along the way use the cheapest
|
|
@@ -1164,10 +1191,12 @@ Two constraints shape that table, and neither is optional:
|
|
|
1164
1191
|
- **The aux kind must not change mid-render.** `setCleanAuxNormal()` throws away the accumulated
|
|
1165
1192
|
albedo/normal, so a refresh model that disagreed with the final one would leave the final denoise
|
|
1166
1193
|
reading an aux buffer one sample deep. That is why the cheap model is `fast-clean` and not `fast`.
|
|
1167
|
-
- **
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1194
|
+
- **The cheap model only takes over once a denoise has measured too slow to be a live view
|
|
1195
|
+
(`> 120 ms`).** A tier a machine can afford is kept — at 512² that is every tier. The verdict
|
|
1196
|
+
survives a camera move, because the device does not get faster between them; it is re-taken when
|
|
1197
|
+
the tier or the resolution changes. Past it, each render swaps twice (to the cheap model when the
|
|
1198
|
+
view moves, back for the finished image). A swap costs 10-20 ms on oidn-web 0.4.0, and each model's
|
|
1199
|
+
weights are downloaded once and kept, so a swap never goes back to the network.
|
|
1171
1200
|
|
|
1172
1201
|
#### What paces the refreshes
|
|
1173
1202
|
|