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 07, 2019 10:34 am

Dade wrote:
Tue May 07, 2019 10:27 am
This allow the user to check how much free ram he has to run the denoiser and select the most appropriate option. Theoretically, this process could be even automated.
That would be ideal, not sure how hard it is to check the amount of available RAM (without swap) in a cross-platform way.
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 » Wed May 08, 2019 6:48 am

Dade wrote:
Tue May 07, 2019 10:27 am
The code is now on the main branch.

CodeHD, can I ask you to modify the nTiles/pixelThreshold mechanic ?

My idea is to have a fixed and user specified tile size instead of a variable tile size based on image dimension. This is has the advantage of requiring a fixed (and user specified) amount of ram for the Oidn execution. A tile size parameter (i.e. X pixels) should replace nTiles/pixelThreshold parameters.

So BlendLuxCore can offer a combo box to select the type of Oidn execution:

- Normal;
- 0.25GB tiles;
- 0.5GB tiles;
- 1GB tiles;
- 2GB tiles;
- 4GB tiles;

This allow the user to check how much free ram he has to run the denoiser and select the most appropriate option. Theoretically, this process could be even automated.
nTiles/pixelThreshold mechanic instead requires some trial and test to find a suitable number of tiles to use to not run out of memory. This can be quite cumbersome because when running out of memory, you will probably have to kill the Blender process.
Yeah, I can have another look at changing it to something more advanced. I think it might be possible to simplify the overlapping as well, to save a few lines of code.
Do we really need that many options, though? There are not really that many different system configurations around, especially that someone who renders high-res images should have a fast computer with a good amount of RAM. Also, 0.25GB might end up to be too small tiles for it to work properly. Maybe it is sufficient to do 1GB, 4GB, 16GB and 64GB tiles. But that could be a problem left for the user interfaces, the C++ code can just use the memory amount as an input.

Like B.Y.O.B. said, I don't know either about implementing a cross-platform way to detect the amount of (free) memory.

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

Re: Tiled OIDN Denoising

Post by Dade » Wed May 08, 2019 9:25 am

CodeHD wrote:
Wed May 08, 2019 6:48 am
Do we really need that many options, though?
The plugin option should be just tile size in pixel, it will than up to the Blender/3DsMax/whatever plugin to present a simplified version (or just directly expose the size parameter).
Support LuxCoreRender project with salts and bounties

kumaran7
Posts: 30
Joined: Mon May 21, 2018 5:48 pm

Re: Tiled OIDN Denoising

Post by kumaran7 » Wed May 08, 2019 2:44 pm

Luxcore needs Bucket rendering,for me Luxcore crash every time due to ram fill while denoising default res image.

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

Re: Tiled OIDN Denoising

Post by Dade » Wed May 08, 2019 3:04 pm

kumaran7 wrote:
Wed May 08, 2019 2:44 pm
Luxcore needs Bucket rendering,for me Luxcore crash every time due to ram fill while denoising default res image.
LuxCore has already bucket rendering: it is called tile rendering (i.e. TILEPATHCPU or TILEPATHOCL).

Tiled denoising is discussed in this thread and landed on the main source branch yesterday.
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. » Thu May 09, 2019 9:12 pm

A new OIDN release is out, one of the features is reduced memory consumption: https://github.com/OpenImageDenoise/oid ... tag/v0.9.0
Very nice in addition to the tiled OIDN :)
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 10, 2019 7:22 pm

B.Y.O.B. wrote:
Thu May 09, 2019 9:12 pm
A new OIDN release is out, one of the features is reduced memory consumption: https://github.com/OpenImageDenoise/oid ... tag/v0.9.0
Very nice in addition to the tiled OIDN :)
hehe great :)
I always "feared" that they would have come up with the same solution as I'm working on by the time I'm finished :D But this is, as you say, a good combination ;) I guess they will only feature the simple version to give best performance to "normal" users.

marcatore
Donor
Donor
Posts: 329
Joined: Wed Jan 10, 2018 8:04 am

Re: Tiled OIDN Denoising

Post by marcatore » Tue May 14, 2019 6:34 am

B.Y.O.B. wrote:
Thu May 09, 2019 9:12 pm
A new OIDN release is out, one of the features is reduced memory consumption
So, we have to download the exe file and substitute the older one?

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 8:57 am

marcatore wrote:
Tue May 14, 2019 6:34 am
B.Y.O.B. wrote:
Thu May 09, 2019 9:12 pm
A new OIDN release is out, one of the features is reduced memory consumption
So, we have to download the exe file and substitute the older one?
The exe is only used for viewport denoising.
We will have to update LuxCore to use the new version.
Support LuxCoreRender project with salts and bounties

marcatore
Donor
Donor
Posts: 329
Joined: Wed Jan 10, 2018 8:04 am

Re: Tiled OIDN Denoising

Post by marcatore » Tue May 14, 2019 9:27 am

B.Y.O.B. wrote:
Tue May 14, 2019 8:57 am
The exe is only used for viewport denoising.
We will have to update LuxCore to use the new version.
Yes, sorry... I mean for viewport rendering...we should download the last build for viewport rendering...right?

Post Reply