Tiled OIDN Denoising

Discussion related to the Engine functionality, implementations and API.
User avatar
B.Y.O.B.
Developer
Developer
Posts: 2997
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Tiled OIDN Denoising

Post by B.Y.O.B. » Tue May 14, 2019 9:45 am

You can replace the denoise.exe binary, yes.
Support LuxCoreRender project with salts and bounties

User avatar
B.Y.O.B.
Developer
Developer
Posts: 2997
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Tiled OIDN Denoising

Post by B.Y.O.B. » Fri May 17, 2019 12:20 pm

marcatore wrote:
Tue May 14, 2019 9:27 am
we should download the last build for viewport rendering...right?
B.Y.O.B. wrote:
Tue May 14, 2019 9:45 am
You can replace the denoise.exe binary, yes.
Correction: You can't do this, because denoise.exe uses the same shared library (libOpenImageDenoise) as LuxCore. And if you would replace libOpenImageDenoise, this would create conflicts with final render denoising in LuxCore.
You will have to leave everything as it is and wait for us to update to the new OIDN release.
Support LuxCoreRender project with salts and bounties

CodeHD
Posts: 182
Joined: Tue Dec 11, 2018 12:38 pm

Re: Tiled OIDN Denoising

Post by CodeHD » Fri May 17, 2019 12:49 pm

B.Y.O.B. wrote:
Fri May 17, 2019 12:20 pm
Correction: You can't do this, because denoise.exe uses the same shared library (libOpenImageDenoise) as LuxCore. And if you would replace libOpenImageDenoise, this would create conflicts with final render denoising in LuxCore.
You will have to leave everything as it is and wait for us to update to the new OIDN release.
really? Did you encounter problems?
I downloaded the new oidn two days ago and used it without problems so far (although I did not use Albedo and Normal AOVs, and only Blender and not standalone)

User avatar
B.Y.O.B.
Developer
Developer
Posts: 2997
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Tiled OIDN Denoising

Post by B.Y.O.B. » Fri May 17, 2019 1:34 pm

Yes, on my Linux the denoiser failed to start with errors about missing symbols in the library.
Did not test on Windows.
Support LuxCoreRender project with salts and bounties

kintuX
Posts: 474
Joined: Wed Jan 10, 2018 2:37 am

Re: Tiled OIDN Denoising

Post by kintuX » Fri May 17, 2019 9:00 pm

With Windows 7 it just throws countless errors in system console...
"Warning: SetThreadGroupAffinity failed" But works, as results look fine (did same with 0.8.2) ;)

eg:

@ Preview
consolePreviewShot.jpg
@ Render
consolePreviewShot.jpg
Attachments
consoleRenderShot.jpg

CodeHD
Posts: 182
Joined: Tue Dec 11, 2018 12:38 pm

Re: Tiled OIDN Denoising

Post by CodeHD » Thu May 30, 2019 8:12 pm

I have finally taken the time to update the tiled OIDN (before being on travel again for weeks... :roll: )

Changes as usual to these files, you can have a look before I make a pull request:

https://github.com/CodeFHD/LuxCore/blob ... l_oidn.cpp
https://github.com/CodeFHD/LuxCore/blob ... tel_oidn.h
https://github.com/CodeFHD/LuxCore/blob ... mparse.cpp

I have changed two things:

1) The computation of the output array, i.e. the tile overlapping. Benefit: far fewer lines of code. Downside: Probably not faster or more memory efficient though, although I do not believe it will be significant compared to the OIDN time anyways.

2) The nTiles vs nPixel mechanic:
The function itself still uses an nTiles approach (now separate for x and y dimension). The input is now in number of pixels, and as a first step it is converted to a number of slices in each dimension. I do it this way to make shure there is no leftover strip of few pixels, smaller than the overlap region.

Let me know what you think :)

CodeHD
Posts: 182
Joined: Tue Dec 11, 2018 12:38 pm

Re: Tiled OIDN Denoising

Post by CodeHD » Tue Jun 11, 2019 9:31 pm

Since there were no further comments, I just made a pull request ;)

User avatar
B.Y.O.B.
Developer
Developer
Posts: 2997
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Tiled OIDN Denoising

Post by B.Y.O.B. » Wed Jun 12, 2019 11:56 pm

Sorry for not replying so long.
I tested your changes locally and it works good.
I also have the code for BlendLuxCore ready to expose the tile size so it can be changed by the users, if need be.
Support LuxCoreRender project with salts and bounties

CodeHD
Posts: 182
Joined: Tue Dec 11, 2018 12:38 pm

Re: Tiled OIDN Denoising

Post by CodeHD » Thu Jun 13, 2019 10:32 am

B.Y.O.B. wrote:
Wed Jun 12, 2019 11:56 pm
Sorry for not replying so long.
I tested your changes locally and it works good.
I also have the code for BlendLuxCore ready to expose the tile size so it can be changed by the users, if need be.
All good, thanks for writing the Blender feature! :)

User avatar
Dade
Developer
Developer
Posts: 3278
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Tiled OIDN Denoising

Post by Dade » Mon Jun 17, 2019 10:30 am

Tiled denoising will be integrated into the next OIDN release according Attila: https://github.com/OpenImageDenoise/oid ... -502442748

It also offered some hint for our current in house implementation (you can find the information in the link). Do we use a 128 pixel overlap ?
Support LuxCoreRender project with salts and bounties

Post Reply