Page 13 of 32

Re: OpenImageDenoise

Posted: Sun Feb 03, 2019 1:54 pm
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).

Re: OpenImageDenoise

Posted: Sun Feb 03, 2019 1:57 pm
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.

Re: OpenImageDenoise

Posted: Sun Feb 03, 2019 2:18 pm
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.

Re: OpenImageDenoise

Posted: Sun Feb 03, 2019 2:24 pm
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

Re: OpenImageDenoise

Posted: Sun Feb 03, 2019 2:36 pm
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.

Re: OpenImageDenoise

Posted: Sun Feb 03, 2019 2:37 pm
by Dade
I have updated LinuxCompileDeps, LinuxCompile and LuxCore repositories to include and link with Intel Oidn.

Re: OpenImageDenoise

Posted: Sun Feb 03, 2019 2:41 pm
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

Re: OpenImageDenoise

Posted: Sun Feb 03, 2019 3:23 pm
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:

Re: OpenImageDenoise

Posted: Sun Feb 03, 2019 4:59 pm
by acasta69
WindowsCompile and WindowsCompileDeps are also updated with Intel Oidn.

Re: OpenImageDenoise

Posted: Sun Feb 03, 2019 5:19 pm
by Dade
acasta69 wrote: Sun Feb 03, 2019 4:59 pm Intel Oidn.
Anyone else always read "Odin" instead of "Oidn" ? :lol: