OpenImageDenoise

Discussion related to the LuxCore functionality, implementations and API.
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: OpenImageDenoise

Post by Dade »

alpistinho wrote: Sun Feb 03, 2019 1:47 pm I guess I could also hardcode the IntelOIDN class to calculate the needed AOV's internally
You can check if the film has ALBEDO and AVG_SHADING_NORMAL AOVs and use them if available (otherwise, may be, print a warning message and perform denoising without them).
Support LuxCoreRender project with salts and bounties
User avatar
alpistinho
Developer
Developer
Posts: 198
Joined: Thu Jul 05, 2018 11:38 pm
Location: Rio de Janeiro

Re: OpenImageDenoise

Post by alpistinho »

Dade wrote: Sun Feb 03, 2019 1:53 pm
alpistinho wrote: Sun Feb 03, 2019 1:47 pm Is there support for imagepipeline plugins to receive multiple films as input?

Looking at the ImagePipelinePlugin class it seems there is not, should it be extended to receive multiple Films?
What do you mean ? A film can have one or more image pipelines and each image pipeline can have any number of plugins. So if you use the Oidn plugin multiple times, there will be multiple/different instances of your class and each one will be called with a different film (so I assume the answer to your question is no).
I was thinking about the multiple input needed by OIDN such as normals and albedo.
As far as I understand, the imagepipeline is sequential, so it would not be possible to feed a plugin with the output of multiple others.

But I guess calculating the needed AOV's on demand and feed that to OIDN is simpler and probably enough. Is that ok?

EDIT: Only saw your second post now, I will have a look on how it works.
Support LuxCoreRender project with salts and bounties
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: OpenImageDenoise

Post by Dade »

alpistinho wrote: Sun Feb 03, 2019 1:57 pm But I guess calculating the needed AOV's on demand and feed that to OIDN is simpler and probably enough. Is that ok?

EDIT: Only saw your second post now, I will have a look on how it works.
You are going to need to translate the ALBEDO and AVG_NORMAL_SHADING AOVs in a format suitable for Oidn: they are in 4 x floats format where the last float is the weight (so you have to divide the first 3 components for the 4th, if != 0.0, in order to get the Oidn FLOAT3 format).
But it is something you are partially already doing for the input/ouput RGB, just do the same for ALBEDO/AVG_NORMAL_SHADING.
Support LuxCoreRender project with salts and bounties
User avatar
alpistinho
Developer
Developer
Posts: 198
Joined: Thu Jul 05, 2018 11:38 pm
Location: Rio de Janeiro

Re: OpenImageDenoise

Post by alpistinho »

Dade wrote: Sun Feb 03, 2019 2:18 pm
alpistinho wrote: Sun Feb 03, 2019 1:57 pm But I guess calculating the needed AOV's on demand and feed that to OIDN is simpler and probably enough. Is that ok?

EDIT: Only saw your second post now, I will have a look on how it works.
You are going to need to translate the ALBEDO and AVG_NORMAL_SHADING AOVs in a format suitable for Oidn: they are in 4 x floats format where the last float is the weight (so you have to divide the first 3 components for the 4th, if != 0.0, in order to get the Oidn FLOAT3 format).
But it is something you are partially already doing for the input/ouput RGB, just do the same for ALBEDO/AVG_NORMAL_SHADING.
I didn't know I was already doing that :lol: .

In any case, OIDN has support for FLOAT4, but I don't know if it is the same format or not
Support LuxCoreRender project with salts and bounties
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: OpenImageDenoise

Post by Dade »

alpistinho wrote: Sun Feb 03, 2019 2:24 pm In any case, OIDN has support for FLOAT4, but I don't know if it is the same format or not
The last component may be just unused, this is pretty common for SSE/AVX code in order to use fast loading/saving/etc.
Support LuxCoreRender project with salts and bounties
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: OpenImageDenoise

Post by Dade »

I have updated LinuxCompileDeps, LinuxCompile and LuxCore repositories to include and link with Intel Oidn.
Support LuxCoreRender project with salts and bounties
User avatar
alpistinho
Developer
Developer
Posts: 198
Joined: Thu Jul 05, 2018 11:38 pm
Location: Rio de Janeiro

Re: OpenImageDenoise

Post by alpistinho »

Dade wrote: Sun Feb 03, 2019 2:37 pm I have updated LinuxCompileDeps, LinuxCompile and LuxCore repositories to include and link with Intel Oidn.
I have merged your changes into my repo
Support LuxCoreRender project with salts and bounties
acasta69
Developer
Developer
Posts: 472
Joined: Tue Jan 09, 2018 3:45 pm
Location: Italy

Re: OpenImageDenoise

Post by acasta69 »

Dade wrote: Sun Feb 03, 2019 2:37 pm I have updated LinuxCompileDeps, LinuxCompile and LuxCore repositories to include and link with Intel Oidn.
Working on the Windows side... sorry for being a bit late :oops:
Support LuxCoreRender project with salts and bounties

Windows 10 64 bits, i7-4770 3.4 GHz, RAM 16 GB, GTX 970 4GB v445.87
acasta69
Developer
Developer
Posts: 472
Joined: Tue Jan 09, 2018 3:45 pm
Location: Italy

Re: OpenImageDenoise

Post by acasta69 »

WindowsCompile and WindowsCompileDeps are also updated with Intel Oidn.
Support LuxCoreRender project with salts and bounties

Windows 10 64 bits, i7-4770 3.4 GHz, RAM 16 GB, GTX 970 4GB v445.87
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: OpenImageDenoise

Post by Dade »

acasta69 wrote: Sun Feb 03, 2019 4:59 pm Intel Oidn.
Anyone else always read "Odin" instead of "Oidn" ? :lol:
Support LuxCoreRender project with salts and bounties
Post Reply