chunky-dev / chunky-denoiser Goto Github PK
View Code? Open in Web Editor NEWA denoising plugin for Chunky.
License: GNU General Public License v3.0
A denoising plugin for Chunky.
License: GNU General Public License v3.0
Rather than rendering the preview immediately, chunky begins rendering the normal and albedo maps.
chunky-dev/chunky#1560 broke it
If i begin a render with a sample count of 23, but change the sample count to something else(say 24) afterwards, the denoised image will be named example-23.denoised.png even though the non-denoised will be named example-24.png.
leMaik 21/04/2020
Just drop this line https://github.com/leMaik/chunky-denoiser/blob/master/src/main/java/de/lemaik/chunky/denoiser/BetterRenderManager.java#L144, that will fix both
We should then post-process the pixels of the denoised image after it is saved, though, right here: https://github.com/leMaik/chunky-denoiser/blob/master/src/main/java/de/lemaik/chunky/denoiser/BetterRenderManager.java#L70
Tested on Chunky 2.4.0
with #30
Note, using default 16 SPP for Albedo and Normal maps. Opted to write this SPP as a number opposed to a variable to ease confusion.
Upon using Denoise Current Render
:
0 of 16
ETA: Somelargenumber. Beauty pass SPP is also set to 16 SPP internally and the field needs to be refreshed. Advanced Tab
Renderer
is not updated and still shows PathTracingRenderer
. Upon toggling/updating this tab it will show the actual Renderer as being DenoiserPasses
.<scene_name>-spp.png
? This is the default snapshot format? Beauty pass SPP is also set to 16 SPP internally and the field needs to be refreshed. Same as the Renderer
in the Advanced Tab
.0 of 16
ETA: Somelargenumber. See above.Renderer
in the Advanced Tab
.Key Issues:
Denoise Current Render
does not function correctly. We do not need any feature/auxiliary images to use OIDN.Renderer
is changed to DenoiserPasses
but UI does not always reflect this and needs to be refreshed.Extended issues:
This button does not address similar issues ( #13 #15 #27 ) and is regarded to be highly destructive to in progress renders and will overwrite render dumps. If the button is to be kept in it's current form we will need to implement a warning.
Tested on 2.5.0-snapshot.186.gf0535f2
with #30
Select DenoisedPathTracer
, hit Start
Unchecked exception in render manager.
java.lang.NoSuchMethodError: 'void se.llbit.chunky.renderer.scene.Scene.saveFrame(java.io.File, se.llbit.chunky.renderer.export.PictureExportFormat, se.llbit.util.TaskTracker, int)'
at de.lemaik.chunky.denoiser.DenoisedPathTracingRenderer.render(DenoisedPathTracingRenderer.java:90)
at se.llbit.chunky.renderer.DefaultRenderManager.run(DefaultRenderManager.java:313)
Issue: Resuming a loaded scene (with albedo and normal map rendered) / changing the Target SPP on a completed render does not resume from current SPP. Rather it resets the render progress; Rendering the albedo & normal map and the image again.
Expected behaviour: Without the Desnoiser you can resume a render and/or change the Target SPP without resetting the render progress. Assuming the scene has not been changed.
Work around: Deselect the Denoiser Plugin and bake the render. Manually denoise using previously rendered albedo and normal maps.
(This is just a reminded. No rush)
The octree and dump are overwritten when the normal and albedo maps have been rendered, taking extra time and deleting old dumps that have an actual render. If this cannot be fixed, would it be possible to change the filenames?
The ALBEDO
and NORMAL
renderers show up alongside the default PathTracingRenderer
, but DenoisedPathTracer
(mentioned in the readme) is nowhere to be seen.
However, denoising still works (probably) as intended, since the render process starts out by first rendering the normal and albedo passes before anything else, and the denoised image can be found in the scene's snapshots
folder:
woops accidentally deleted the [Question]
Currently, the denoiser only denoises the image after it has been rendered to the full configured SPP.
Originally raised by @NJDaeger:
I was wondering if that button could be changed to either save the denoised image by default or to give the option to save the denoised image vs the non denoised image
either that or another button be added into the denoiser tab to save the denoised version of the current frame
which would probably make more sense
When starting the render, if you disable the albedo map, and render the standard scene, chunky starts by rendering the first SPP of the normal map, but immediately after renders the path tracing scene.
After that, if you render the scene without the albedo map, Chunky starts by rendering the first SPP twice, and then it continues normally.
If you reenable the albedo map, chunky starts by rendering the first SPP of the path tracing render, before rendering the normal maps. Afterwards, if you start the render, it renders the first SPP of the normal map twice before proceeding.
As a user, I would like to have the option to use the NVidia AI denoiser instead of the Intel Open Image denoiser. The way the denoiser operates seems functionally similar except for the program command names (e.g. using -n for normal instead of -nrm) and taking .png images instead of .pfm images.
We can't see whether the normal/albedo or main are being rendered if the preview is closed
Although the plugin can be downloaded from here, having a release would still be useful, since the Chunky docs tell users to download it from the releases page.
Loading plugin: "chunky-denoiser.jar"
The plugin DenoiserPlugin was developed for Chunky 2.4.0-159-g8ed94bb7 but this is Chunky 2.4.0-183-gffad4f42 - it may not work properly.
The denoiser plugin does not support headless mode and will not be enabled.
Plugin loaded: DenoiserPlugin 0.4.0-pre.1
Headless denoising still not working. Was meant to be resolved with 0.4.0-pre.1.
In OidnBinaryDenoiser
, the command line arguments don't use the RT preset that OIDN supplies in the native API. The RT preset allows you to use a different denoising method that's better suited for ray / path tracing.
Possible solutions: Create a small wrapper of OIDN for chunky, to allow for you to set the denoising filter.
As stated. It is just not there. I got two other options though - ALBEDO and NORMAL. I have no idea what to do with this.
Render worker 6 crashed with uncaught exception.
java.lang.NoSuchMethodError: 'se.llbit.chunky.renderer.scene.Sky se.llbit.chunky.renderer.scene.Scene.sky()'
at de.lemaik.chunky.denoiser.AlbedoRenderer$AlbedoTracer.trace(AlbedoRenderer.java:39)
at se.llbit.chunky.renderer.scene.Scene.rayTrace(Scene.java:675)
at se.llbit.chunky.renderer.PathTracingRenderer.lambda$render$0(PathTracingRenderer.java:92)
at se.llbit.chunky.renderer.TileBasedRenderer.lambda$submitTiles$1(TileBasedRenderer.java:82)
at se.llbit.chunky.renderer.RenderWorkerPool.work(RenderWorkerPool.java:141)
at se.llbit.chunky.renderer.RenderWorkerPool.access$100(RenderWorkerPool.java:29)
at se.llbit.chunky.renderer.RenderWorkerPool$RenderWorker.run(RenderWorkerPool.java:101)
The skymap is not accounted for in albedo/normal
Currently the Plugin does not check if the executable is the right one.
oidnDenoise.exe - Is correct and works.
oidnBenchmark.exe - Is invalid and only throws an Error: invalid argument
in the debug console. Also locks up the Renderer.
oidnTest.exe - Is invalid and nothing happens.
DiskInfo64.exe - Is invalid and nothing happens.
Owing to how Chunky responded to oidnBenchmark.exe
and Error: invalid argument
I would recommend that we actually validate if the provided executable is the right one. Running oidnDenoise.exe
or oidnDenoise.exe -h
would show a list of valid command-line options.
D:\Programs\oidn-1.4.2.x64.vc14.windows\bin>oidnDenoise.exe
Intel(R) Open Image Denoise
usage: oidnDenoise [-d/--device default|cpu]
[-f/--filter RT|RTLightmap]
[--hdr color.pfm] [--ldr color.pfm] [--srgb] [--dir directional.pfm]
[--alb albedo.pfm] [--nrm normal.pfm] [--clean_aux]
[--is/--input_scale value]
[-o/--output output.pfm] [-r/--ref reference_output.pfm]
[-t/--type float|half]
[-w/--weights weights.tza]
[--threads n] [--affinity 0|1] [--maxmem MB] [--inplace]
[--bench ntimes] [-v/--verbose 0-3]
[-h/--help]
While the exact contents of the return may change we could still check and validate some of these results.
Without it, the denoiser blurs fine details of the skybox.
Configuration using the JSON config file is somewhat hard to get right by hand, so a tab in Chunky would be better.
That tab could also be used to toggle the normal map. Also, the SPP for albedo and normal maps could be configurable.
Tested on Chunky 2.4.0
with #30
In past versions of the plugin both the beauty pass and the denoised beauty would be exported to snapshots
. Currently, when using the DenoisedPathTracer
Renderer only denoised beauties are outputted to snapshots
. The option the Save beauty pass
within the Denoiser Tab
only applies to the beauty .pfm
.There are a multitude of benefits from having the option to still export the noisy snapshots.
#33 shows that denoising behaviour is mixed and that when using the Denoise Current Render
button both the noisy and denoised beauty are snapshotted. Ideally we would want consistency with how denoising works.
The options listed within the Denoiser Tab
lack clarification as to what they do. Expanding the visible descriptions or adding tooltips would help clear things up.
Disabling or redirecting inbuilt functionality without having an option to retain defaults and to export the denoised output with a suffix, as was done in the past with .denoised
, should be avoided.
.tiff
- Render is denoised correctly once target SPP is reached and exported as .tiff
Enable Save beauty pass
- We get the following error once target SPP is reached and it breaks Chunky (UI functions but no renderer can be reset/used):
Unchecked exception in render manager.
java.lang.NoSuchMethodError: 'void se.llbit.chunky.renderer.scene.Scene.saveFrame(java.io.File, se.llbit.chunky.renderer.export.PictureExportFormat, se.llbit.util.TaskTracker, int)'
at de.lemaik.chunky.denoiser.DenoisedPathTracingRenderer.render(DenoisedPathTracingRenderer.java:90)
at se.llbit.chunky.renderer.DefaultRenderManager.run(DefaultRenderManager.java:313)
Paused a render to do something else on my computer, then when I unpaused it, it began re-rendering the normal and albedo (losing the 1k samples I had)
Add a second normal and albedo, (both off by default?) that calculates that applies to reflected surfaces. Maybe also add the option to combine them with the first based on how reflective the surface is. Will make water look much better.
Also maybe a third for refracted albedo/normal, which will fix underwater areas getting blurred. (also with the option to automatically combine with the first/second.)
Chunky doesn't freeze but stops functioning. Closing the scene causes Chunky to freeze.
After rendering, it might be cool to actually show the denoised image (and maybe compare it with the original image) inside Chunky.
Documentation about bugs that I have discovered and possible workarounds to those bugs:
1. Render the albedo and normal maps, and also the path tracing render for a time.
2. Pause the render.
3. Save the scene.
4. Close Chunky.
5. Re-open Chunky.
6. Load the saved scene.
Chunky completely restarts the render, rendering the albedo and normal maps at the default target SPP of 16 for both. Then, Chunky starts rendering the path tracing from the beginning.
1. Render the albedo and normal maps, and also the path tracing render for a time.
2. Pause the render.
3. Save the scene.
4. Close Chunky.
5. Re-open Chunky.
6. Load the saved scene.
7. Reset the render.
8. Merge render dump from scene directory.
9. (noted that main target SPP is set to 16 from its previous setting, and the current SPP is the same as what was saved in the render dump.)
10. Resume the render.
If the current SPP is greater than the target SPP of the albedo map, then chunky starts rendering the normal map. But if the current SPP is less than the target SPP of the normal map, then Chunky starts rendering the normal map from the current SPP saved in the render dump. But, the normal map is rendered on top of the render dump, so the result looks weird; a combination of the normal map and the path tracing render merged into one frame.
1. Render without the albedo and normal maps for a time.
2. Pause the render.
3. Save the scene.
4. Close Chunky.
5. Re-open Chunky.
6. (noted that the checkboxes for albedo and normal maps are always on by default.)
7. Load the saved scene.
Chunky not only completely restarts the render, as in bug 1, but also restarts by rendering the albedo and normal maps before starting the path tracing render from the beginning.
1. Render with or without the albedo and normal maps for a time.
2. Pause the render.
3. Save the scene.
4. Close Chunky.
5. Re-open Chunky.
6. Disable albedo and normal maps in an attempt to stop Chunky from restarting the render to render the albedo and normal maps again.
7. Load the saved scene.
Because the albedo and normal maps are disabled, Chunky does not restart by rendering them. However, it still restarts the path tracing render from the beginning.
1. Render the albedo and normal maps, and also the path tracing render for a time.
2. Pause the render.
3. Save the scene.
4. Close Chunky.
5. Re-open Chunky.
6. Disable albedo and normal maps in an attempt to stop Chunky from restarting the render to render the albedo and normal maps again.
7. Load the saved scene.
8. After it restarts the path tracing render from the beginning, reset the render.
9. Merge the render dump for the scene.
10. Resume the render.
Chunky continues the path tracing render from where it was saved. When it finishes, the denoiser does not use the albedo and normal maps to denoise. The result is a low quality denoised image.
For an image without the denoiser:
1. Render without the albedo and normal maps for a time.
2. Pause the render.
3. Save the scene.
4. Close Chunky.
5. Re-open Chunky.
6. Disable the albedo and normal maps.
7. Load the saved scene.
8. The path tracing render will start from the beginning. Reset the render.
9. Merge the render dump from the saved scene.
10. Resume the render.
Chunky continues the path tracing render from where it was saved.
1. Render the albedo and normal maps, and also the path tracing render for a time.
2. Pause the render.
3. Save the scene.
4. Close Chunky.
5. Re-open Chunky.
6. Disable the albedo and normal maps.
7. Load the saved scene.
8. The path tracing render will start from the beginning. Reset the render.
9. Merge the render dump from the saved scene.
10. Resume the render.
11. Enable the albedo and normal maps again.
Chunky continues the path tracing render from where it was saved, and when it finishes, the denoiser uses the albedo and normal maps and denoises properly, making a high quality image.
Currently, the README of the 0.4.x branch is the same as master despite the 0.4.x branch not having the changes the readme mentions.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.