Planetside Software Forums

General => Open Discussion => Topic started by: Kadri on February 08, 2019, 09:44:50 PM

Title: Testing Top Denoisers
Post by: Kadri on February 08, 2019, 09:44:50 PM

https://greyscalegorilla.com/tutorials/denoiser-render-tests-arnold-redshift/

Some nice comparisons there.

I tried NVidia Optix denoiser (it works only on NVidia cards) tonight:
https://developer.nvidia.com/optix

You can download it from here (there are some instructions too):
https://github.com/DeclanRussell/NvidiaAIDenoiser

But the link there for the Windows build was what i used:
https://declanrussell.com/portfolio/nvidia-ai-denoiser/

It is a command line tool but very easy to use. Look at the posts below in the last link.
There is a basic step by step instruction post.
I had a problem that was because of an old driver so check it first and use 418.xx.

In Terragen images i saw very little difference. In my tests at least...
But on some Lightwave images it made quite a difference ( tried it only on stills ).

I tried Neat image denoiser in the past and it was really good.
Looks like it is still good in videos too ( https://www.neatvideo.com/ ).
Title: Re: Testing Top Denoisers
Post by: digitalguru on February 09, 2019, 09:27:04 AM
That's very interesting, I haven't used the Arnold Noice denoiser before, but am about to test it out on a current project. I wonder if it can be used on a Terragen render if it only needs Z, normal and depth - if I remember correctly I think it needs those AOVS in a multichannel exr for it to work.

The Cornell box is probably a worst-case scenario as if you use such a wide area light to illuminate, it is going to cause a lot of low-frequency artifacts that a denoiser might struggle with. Maybe those renders could get a bit closer in terms of sampling and leave the denoise for a final polish.

On a recent project I just finished I got into the habit of giving compositors raw and denoised versions of the same render and they could mix as they saw fit.

I do have Neat Video and will give that a go, the only disadvantage is that you have to give it a smooth patch of noise to work on that is not always present in a 3d render.
Title: Re: Testing Top Denoisers
Post by: Kadri on February 09, 2019, 12:11:55 PM
Quote from: digitalguru on February 09, 2019, 09:27:04 AM
...
I do have Neat Video and will give that a go, the only disadvantage is that you have to give it a smooth patch of noise to work on that is not always present in a 3d render.

Like shooting a video especially for that purpose you could easily make such a render for that purpose too at least.

From the few tests i made and read some of the posts it looks like these denoisers (except Neat Video maybe) need some specific kind of noise to work better.

Not sure but for Terragen that might be noise like in the atmosphere and around light sources.
Ground noise looks different to me. Just guessing of course.

Title: Re: Testing Top Denoisers
Post by: digitalguru on February 09, 2019, 01:07:27 PM
QuoteLike shooting a video especially for that purpose you could easily make such a render for that purpose too at least.

Haven't gone into this too deeply at all and will have to have a play with it, but did have a conversation a while ago about rendering a "patch" with a 3d render for Neat Video to base a profile on, but haven't really played with it. Though "proper" denoising with the appropriate AOVS is probably the way to go.

QuoteFrom the few tests i made and read some of the posts it looks like these denoisers (except Neat Video maybe) need some specific kind of noise to work better.

I think it's always good to get the render as good as you can without denoising (whilst fitting into your render budget). It works really well at getting rid of artifacts in heavy motion blur where texture detail is not that pronounced anyway. Renderman back the days of REYES had a feature where you could reduce the Shading rate (in Terragen I guess the equivalent would be Micropoly detail) when an object was heavily motion blurred.
Title: Re: Testing Top Denoisers
Post by: pokoy on February 09, 2019, 04:30:30 PM
Intel has released a denoiser just a few days ago and it looks as promising as Nvidia's. From what I heard Nvidia provides the tech for free but lets you go through some code review which isn't really hassle free. Intel gives the tech away without any restrictions. I had the opportunity to see some early implementations in a few render engines and both were equally good with Intel's being slightly more accurate on smaller details like grass and trees. But these were brief  tests so probably too early to judge.
TG would definitely benefit from this. Although I'm not sure if some work would be needed in order to generate the data the denoisers need to work on.
I'm pretty sure it could help to cut down rendertimes by 50% and more in many cases.

I don't think you can compare these to other postprocess-only denoisers as they work on different data that only renderers can generate such as a normal pass and other raw data. This helps to keep finer details intact while removing sampling noise, not touching noise that may come from a texture for example, in ideal conditions, that is.

Isn't Arnold's denoiser pretty much Nvidia Optix? Not sure...

Edit - I didn't think about having this in TG yet, this would be a really good addition. Good idea! It could work in RTP too, probably.
Title: Re: Testing Top Denoisers
Post by: Kadri on February 09, 2019, 10:33:00 PM

Quote from: pokoy on February 09, 2019, 04:30:30 PM
Intel has released a denoiser just a few days ago...

I didn't know this and when i read this page and saw words like "Embree" and "Pathtracer" i got excited a little about the Terragen side.
http://www.cgchannel.com/2019/01/intel-releases-open-source-denoiser-open-image-denoise/
Title: Re: Testing Top Denoisers
Post by: Kadri on February 09, 2019, 11:20:39 PM
Quote from: digitalguru on February 09, 2019, 01:07:27 PM
...
I think it's always good to get the render as good as you can without denoising (whilst fitting into your render budget). It works really well at getting rid of artifacts in heavy motion blur where texture detail is not that pronounced anyway. Renderman back the days of REYES had a feature where you could reduce the Shading rate (in Terragen I guess the equivalent would be Micropoly detail) when an object was heavily motion blurred.

I tried with a basic point light with a black background in terragen (all with default Terragen settings that is). It is an exaggerated test of course.
I got high as AA 10 but Nvidia Optix and Neat image (not Neat Video) was not much help.
It is not a basic solution and might work here and there maybe i don't know.
The real burden is more on the original Terragen renderer as you said probably.
Title: Re: Testing Top Denoisers
Post by: digitalguru on February 10, 2019, 07:50:30 PM
Quotesn't Arnold's denoiser pretty much Nvidia Optix? Not sure...

Arnold uses Optix, but it is only for preview renders, it has its own denoiser for production renders.
Title: Re: Testing Top Denoisers
Post by: Oshyan on February 10, 2019, 10:29:28 PM
We're definitely keeping an eye on all this. So far in the limited testing I've been able to do the Intel denoiser (the mainly available free and easy to use one; I don't have high enough Nvidia hardware for Optix) doesn't work well on TG images unfortunately. I would guess because it's based on deep learning techniques like Nvidia's and some other denoisers. That being the case it would need to be trained on a ton of Terragen images. Not sure how feasible that would be in the near future, nor how time consuming to implement or train it. But we're definitely interested in the tech.

- Oshyan
Title: Re: Testing Top Denoisers
Post by: Kadri on February 10, 2019, 11:20:51 PM

Nice to hear Oshyan.

Quote from: Oshyan on February 10, 2019, 10:29:28 PM
... So far in the limited testing I've been able to do the Intel denoiser (the mainly available free and easy to use one...

Can you give a link please? I looked not much around when i saw that it needs a special image file format...
Is it basic to use and are standard image file formats supported?

In my tests with Terrgen it looked like Nvidia Optix works on the part of the render that is still not finished (i used some unfinished images too) with the last AA stage better.
Parts that look like fireflies or finer random noise.

With Neat image demo software it become a little more apparent why the point light source test wasn't good.
A closer crop look didn't look like random noise grain at all.
It looks more like kinda perlin noise where it is grouped here and there mostly.
Just thinking out loud.
Title: Re: Testing Top Denoisers
Post by: Kadri on February 10, 2019, 11:32:56 PM

Better to post the images i think.
Title: Re: Testing Top Denoisers
Post by: Oshyan on February 10, 2019, 11:36:12 PM
It's simple to use, yes. The image format is a bit obscure, but Photoshop supports it (rename PPM to PFM), so I just converted there. Was not able to get anything but 32bit/channel images working, even in "LDR" mode of the denoiser.

Download page is here: https://openimagedenoise.github.io/downloads.html
You want this: "For Windows we provide Open Image Denoise binaries precompiled for 64-bit as a ZIP archive"
Current version (this link may expire or not be the latest by the time anyone reads this, reference the page above!): https://github.com/OpenImageDenoise/oidn/releases/download/v0.8.1/oidn-0.8.1.x64.vc14.windows.zip

Regarding your tests, I would strongly advise not using unfinished images or images with anything peculiar about them. Remember that these denoisers are trying to be "smart" and are trained on particular data sets, so they have potentially strong "expectations" about what will be in each image. If a particular section of the image is radically different from any other section (for example AA is not finished there) that is bound to create unpredictable results that are not representative of useful, final output.

- Oshyan
Title: Re: Testing Top Denoisers
Post by: Kadri on February 10, 2019, 11:43:33 PM

Thanks Oshyan.

I made the unfinished tests after i saw not good results with those denoisers and just out of curiosity to find different kind of noise.
The above image is a finished render by the way.
Title: Re: Testing Top Denoisers
Post by: pokoy on February 11, 2019, 03:09:07 AM
Quote from: Kadri on February 10, 2019, 11:32:56 PM

Better to post the images i think.

I'm not sure you're using Optix in the way it's intended, it should work a lot better on a noisy image like yours. It will create a smudgy painting-like image with only a few samples but refine constantly, almost real-time. Your example looks like it's only blurred the noise while it should produce something like a gradient across those sparsely sampled pixels.

I just tested this in 3dsmax with Corona's Optix implementation, with quite a noisy input image after only a few samples:

Optix OFF

[attachimg=1]


Optix ON

[attachimg=2]

There's no geometry in the image, it's all volumetric.

Quote from: Oshyan on February 10, 2019, 10:29:28 PM
...doesn't work well on TG images unfortunately. I would guess because it's based on deep learning techniques like Nvidia's and some other denoisers. That being the case it would need to be trained on a ton of Terragen images...

I'm pretty sure it would work well with TG, no need to train anything. My guess is you are not testing it with the expected set of image data.
Title: Re: Testing Top Denoisers
Post by: Kadri on February 11, 2019, 03:22:06 AM
Quote from: pokoy on February 11, 2019, 03:09:07 AM
...
I'm not sure you're using Optix in the way it's intended, it should work a lot better on a noisy image like yours. ...

It could be. I expected better too.
Would love to see a test from your side with Terragen.
Title: Re: Testing Top Denoisers
Post by: Kadri on February 11, 2019, 03:26:05 AM

This was a Lightwave render test with Optix.
Title: Re: Testing Top Denoisers
Post by: Kadri on February 11, 2019, 03:31:13 AM

But my last render and your original render shows the kind of noise that Optix kinda prefers to me.
What i meant above with unfinished image noise was your original image and the Lightwave original above i posted.
But this is outside my technical knowledge. Just guessing here.
Title: Re: Testing Top Denoisers
Post by: pokoy on February 11, 2019, 03:42:26 AM
I guess the best would be to get Matt to test this. From what I heard from other developers it's pretty straightforward to implement - except for the Nvidia bureaucracy part, Intel's should be faster to get hands on - and a renderer typically provides all the data that's needed internally - e.g. you can not simply use a single (noisy) image, the tech expects a bit more than that as was already mentioned here. To make sure TG is tested correctly, it should be done on the developer's side.

The example implementation of the command line tool referred to here could be already making a few assumptions to parameters and internal options, which is probably why they are using single images. It might be a bit different from what the tech offers per se and when implemented to work on the internal renderer data.

EDIT
Kadri, your example from Lightwave is much more what I'd expect Optix to look like, yes.
Title: Re: Testing Top Denoisers
Post by: Kadri on February 11, 2019, 03:44:25 AM

:)
Title: Re: Testing Top Denoisers
Post by: pokoy on February 11, 2019, 05:14:19 AM
Some more info after asking the Corona dev team:

Optix/Intel denoisers need albedo and normals passes from a renderer.

With bucker renderers (such as the final renderer in TG) there might be problems based on what type of noise and image filtering the denoiser gets as input. Citing the developer here, no idea what problems in detail he means.

Optix:
- Nvidia GPU only, works close to real time, means it updates and improves while the image samples.
- Denoiser is free to get/use but legal audit of code is needed
- Nvidia can forbid its usage at any time

Intel:
- CPU only, slower than GPU of course but not slow - 1-2 seconds for a HD image
- x86 code so will probably run on AMD CPUs as well
- Apache license, means you can use it AND modify without restrictions
Title: Re: Testing Top Denoisers
Post by: Kadri on February 11, 2019, 05:48:17 AM

Thanks for the info.
Title: Re: Testing Top Denoisers
Post by: Oshyan on February 11, 2019, 04:44:41 PM
We've tested the Intel one with the necessary passes and it just doesn't work right. Still possible we're doing something wrong, but I'm not ruling out that these denoisers are, as we know, based on *specific training data sets*, and Terragen is not going to be in those data sets (they're all going to be straightforward path tracing-only implementations is my guess). So even though the Terragen output looks similar to us, it *may* not look like what the denoiser is expecting.

I'd love to test OptiX, just the commandline version, but as I mentioned I don't have high enough level of hardware. If someone does I can send them appropriate output passes for a test. Terragen does support all the render passes needed for these (in the Pro version at least).

- Oshyan
Title: Re: Testing Top Denoisers
Post by: WAS on February 15, 2019, 12:30:35 PM
Optix, and all AI denoisers, scalers, and detailers all have varied results because of their AI backgrounds. I wasn't able to test the optix much but even on the same images noise patterns created from denoising were always different. This effects that pixel level details of edges and stuff, and in animations I can only imagine would translate to "chatter". Same issue with Topaz AI or even their old non-AI denoiser.

I don't think Denoise should really be a option unless it's very low level "filmgrain" like noise.

Quote from: Kadri on February 11, 2019, 03:26:05 AM

This was a Lightwave render test with Optix.

I find it disconcerting this "AI" is creating stylized edges like TopazLab which is an entirely different feature set.