Page 6 of 8

Re: Tiled OIDN Denoising

Posted: Tue May 07, 2019 10:34 am
by B.Y.O.B.
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.

Re: Tiled OIDN Denoising

Posted: Wed May 08, 2019 6:48 am
by CodeHD
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.

Re: Tiled OIDN Denoising

Posted: Wed May 08, 2019 9:25 am
by Dade
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).

Re: Tiled OIDN Denoising

Posted: Wed May 08, 2019 2:44 pm
by kumaran7
Luxcore needs Bucket rendering,for me Luxcore crash every time due to ram fill while denoising default res image.

Re: Tiled OIDN Denoising

Posted: Wed May 08, 2019 3:04 pm
by Dade
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.

Re: Tiled OIDN Denoising

Posted: Thu May 09, 2019 9:12 pm
by B.Y.O.B.
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 :)

Re: Tiled OIDN Denoising

Posted: Fri May 10, 2019 7:22 pm
by CodeHD
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.

Re: Tiled OIDN Denoising

Posted: Tue May 14, 2019 6:34 am
by marcatore
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?

Re: Tiled OIDN Denoising

Posted: Tue May 14, 2019 8:57 am
by B.Y.O.B.
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.

Re: Tiled OIDN Denoising

Posted: Tue May 14, 2019 9:27 am
by marcatore
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?