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).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
OpenImageDenoise
Re: OpenImageDenoise
- alpistinho
- Developer
- Posts: 198
- Joined: Thu Jul 05, 2018 11:38 pm
- Location: Rio de Janeiro
Re: OpenImageDenoise
I was thinking about the multiple input needed by OIDN such as normals and albedo.Dade wrote: ↑Sun Feb 03, 2019 1:53 pmWhat 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).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?
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
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).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.
But it is something you are partially already doing for the input/ouput RGB, just do the same for ALBEDO/AVG_NORMAL_SHADING.
- alpistinho
- Developer
- Posts: 198
- Joined: Thu Jul 05, 2018 11:38 pm
- Location: Rio de Janeiro
Re: OpenImageDenoise
I didn't know I was already doing that .Dade wrote: ↑Sun Feb 03, 2019 2:18 pmYou 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).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.
But it is something you are partially already doing for the input/ouput RGB, just do the same for ALBEDO/AVG_NORMAL_SHADING.
In any case, OIDN has support for FLOAT4, but I don't know if it is the same format or not
Re: OpenImageDenoise
The last component may be just unused, this is pretty common for SSE/AVX code in order to use fast loading/saving/etc.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
- alpistinho
- Developer
- Posts: 198
- Joined: Thu Jul 05, 2018 11:38 pm
- Location: Rio de Janeiro
Re: OpenImageDenoise
I have merged your changes into my repo
Re: OpenImageDenoise
Working on the Windows side... sorry for being a bit late