Denoise renders and save a LOT of time! (Nvidia not Reqd)

3dOutlaw3dOutlaw Posts: 2,471
edited March 2019 in The Commons

The new Daz Studio Beta integrates the Nvidia denoiser, that really speeds up renders times by calculating out the noise (that's my simple explanation of it)  The downside is that you need a Nvidia card, and a card/driver combination that works.  So some will be lucky, but others...no. (or you update your driver, and screw the whole things up, like I did...)

Get to the point, right?  cheeky  OK, here it is!

  1. Intel has a new denoiser library:  https://openimagedenoise.github.io/  (looks like this was mentioned by @Apuat in passing a while ago, but got little notice)
  2. A college student* in the UK wrote a Command-line front end about 2 weeks ago:  https://github.com/DeclanRussell/IntelOIDenoiser/releases  (he also wrote one for the Nvidia cards to direct access what is in the DS Beta)
  3. Below is the before/after results (click for bigger) that took about 5 seconds to denoise on my laptop!

*Credit to Declan Russel for the Command Line utility, and @petipet for the Solaris Cabin model

HOW-TO:

  • Grab the Zip file from the link in #2 above, and extract it to a folder
  • Open a command prompt (cmd) and navigate to the folder where the denoiser.exe is, and follow the instructions
  • For example, the command line example to do the above was:  Denoiser.exe -i "C:\Users\username\Desktop\Denoiser\camera2.jpg" -o "C:\Users\username\Desktop\Denoiser\camera2a.jpg"
  • To integrate it as a right-click menu in Windows, see this comment: https://www.daz3d.com/forums/discussion/comment/4444116/#Comment_4444116​
Post edited by 3dOutlaw on
«13456713

Comments

  • AllenArtAllenArt Posts: 7,169

    very cool! Now everyone can join in :)

    Laurie

  • wizwiz Posts: 1,100

    Definitely an interesting way of looking at it. I'd been denoising renders in Adobe Lightroom since before IRAY, all the way back to LuxRender.

  • SorelSorel Posts: 1,395

    It should be noted that, you will want to render the image long enough to where when denoised, it retains it's details and doesn't look completely flat.

  • TaozTaoz Posts: 9,941

    Can you do that with any pictures, or does it have to be renders (I imagine they may have a particular noise pattern)?

  • wow

  • 3dOutlaw3dOutlaw Posts: 2,471
    Taoz said:

    Can you do that with any pictures, or does it have to be renders (I imagine they may have a particular noise pattern)?

    I just picked a render (JPG) that had grain in it, as a test.  I assume it works for any picture with noise.

  • 3dOutlaw3dOutlaw Posts: 2,471

    I ran the same image with the NVidia Denoiser: https://github.com/DeclanRussell/NvidiaAIDenoiser/releases

    ...and to be honest, I had to work to see the differences.  They were there, but very, very minor in the final result.  The Nvidia one did take longer, about 45 seconds, on my PC, but I am running an older GPU.

  • MattymanxMattymanx Posts: 6,908
    edited March 2019

    I just tried the commandline one by Declan Russel.  The image was rendered for 4 hours, 28000+ samples and still with a bit of noise and it did an amazing job. 

    Post edited by Mattymanx on
  • MattymanxMattymanx Posts: 6,908

    Just a side note, I tested this on a series of 6 renders which all from the same scene.  Only the sixth one had the Nvidia denoiser run on it while it was rendering in DS, the first 5 did not.  The command line denoiser does not have any effect on the 6th image.

  • BinkzBinkz Posts: 42

    You could also create a batch file to make it a little easier to use.

    Just create a new text document, paste the command line stuff in there, and change the file extension from ".txt" to ".bat".

    Then just double click the batch file. :) 

  • MattymanxMattymanx Posts: 6,908

    the command line one does not seem to do anything on any image I have post processed.  Seems to only work on the image from DS.  Might be due to the embeded info from the photo editor I use.

  • PadonePadone Posts: 3,700

    From what I read in the main page this seems to be better used with multiple image buffers, that's beauty + albedo + normal .. I guess using it on a jpg image will not do any better than photoshop or gimp.

  • Leonides02Leonides02 Posts: 1,379
    Padone said:

    From what I read in the main page this seems to be better used with multiple image buffers, that's beauty + albedo + normal .. I guess using it on a jpg image will not do any better than photoshop or gimp.

    Does Iray have an albedo canvas??

  • WendyLuvsCatzWendyLuvsCatz Posts: 38,219

    I am clueless when it comes to scripts

    just copy examples and cross my fingers

    this gives warnings for all my images and just does the first one

    SET FILE_EXTENSION=pngSET PATH_TO_DENOISER=E:\Denoiser_v1.0SET OUTPUT_PREFIX=denoised_for /r %%v in (*.%FILE_EXTENSION%) do %PATH_TO_DENOISER%\Denoiser.exe -i "%%~nv.%FILE_EXTENSION%" -o "%OUTPUT_PREFIX%%%~nv.%FILE_EXTENSION%"cmd /k

     

    Untitled.jpg
    1929 x 1002 - 627K
  • TaozTaoz Posts: 9,941
    edited March 2019

    This is definitely effective. I did this render while ago, took over 90+ minutes to get the skin clean. Here's a comparison between the original 90+ min render and a 10 min. render denoised:

    ETA: this is the NVidia denoiser 2.2 that is being tested here!

    tranq_gd_denoise_test.png
    2821 x 918 - 4M
    Post edited by Taoz on
  • TaozTaoz Posts: 9,941
    edited March 2019

    And here's the orignal 90+ min render denoised:

    ETA: this is the NVidia denoiser 2.2 that is being tested here!

    tranq_gd_90min_denoise_test.png
    1891 x 920 - 2M
    Post edited by Taoz on
  • WendyLuvsCatzWendyLuvsCatz Posts: 38,219

    if someone could suggest why the bat file not working for me I would really appreciate it heart

  • TaozTaoz Posts: 9,941

    I'm working on a Windows DragNDrop app.

  • xmasrosexmasrose Posts: 1,403

    @Wendy_Carrara Does the same for me denoise the first one only!

    No clue why either blush I am sure someone will find out before I get to it!

  • 3dOutlaw3dOutlaw Posts: 2,471

    Wendy, this worked for me, I put the bat in the location of the files, and double-clicked it.  Only small changes below:

    SET FILE_EXTENSION=png
    SET PATH_TO_DENOISER=C:\Users\username\Desktop\Denoiser\Intel\Denoiser_v1.0

    SET OUTPUT_PREFIX=denoised_

    FOR %%v in (*.%FILE_EXTENSION%) DO (%PATH_TO_DENOISER%\Denoiser.exe -i "%%~nv.%FILE_EXTENSION%" -o "%OUTPUT_PREFIX%%%~nv.%FILE_EXTENSION%")

    cmd /k

  • 3dOutlaw3dOutlaw Posts: 2,471
    Taoz said:

    I'm working on a Windows DragNDrop app.

    That would be awesome!  yes

  • xmasrosexmasrose Posts: 1,403

    It still does one image only and stop there. I have win7 if that matters.

     

     

    3dOutlaw said:

    Wendy, this worked for me, I put the bat in the location of the files, and double-clicked it.  Only small changes below:

    SET FILE_EXTENSION=png
    SET PATH_TO_DENOISER=C:\Users\username\Desktop\Denoiser\Intel\Denoiser_v1.0

    SET OUTPUT_PREFIX=denoised_

    FOR %%v in (*.%FILE_EXTENSION%) DO (%PATH_TO_DENOISER%\Denoiser.exe -i "%%~nv.%FILE_EXTENSION%" -o "%OUTPUT_PREFIX%%%~nv.%FILE_EXTENSION%")

    cmd /k

     

  • WendyLuvsCatzWendyLuvsCatz Posts: 38,219
    edited March 2019

    yes only one for me too sadly

    Win7 as well

    Post edited by WendyLuvsCatz on
  • 3dOutlaw3dOutlaw Posts: 2,471

    Interesting, I didn't think BAT's worked different across OS, but maybe so.  I am running Win10.  It did redo the first one twice, I noticed.  The green were there, I dropped the bat there and double-clicked it, and got the purple

     

    denoised.jpg
    783 x 640 - 130K
  • Takeo.KenseiTakeo.Kensei Posts: 1,303
    edited March 2019

    if someone could suggest why the bat file not working for me I would really appreciate it heart

    Seems the problem is only on Win 7 https://declanrussell.com/portfolio/nvidia-ai-denoiser/#comment-326

    The process doesn't seem to close after processing the file.

    I've created a shell command for Windows explorer so that I can multiselect files and denoise them. I still have to close all windows

     

    Open a notepad and paste following lines. I've extracted the archive in C:\neural\denoiser , so the path must be changed according to yours. Save as a .reg file then double click it to make my modification in registry

     

    Windows Registry Editor Version 5.00

    [HKEY_CLASSES_ROOT\*\shell\denoise]
    @="Denoise"

    [HKEY_CLASSES_ROOT\*\shell\denoise\Command]
    @="cmd /c \"C:\\neural\\Denoiser\\DENOISER.exe -i \"%1\" -o \"%1.denoised.jpg\"\""

     

    With that you can select one or many files in Windows explorer, then right click and choose "Denoise" to denoise them in one go. When all denoise are finished you can right click the CMD window in the taskbar then select "Close all windows" in order to close them all

    Post edited by Takeo.Kensei on
  • WendyLuvsCatzWendyLuvsCatz Posts: 38,219

    might be the filenames too maybe hates all the same name different numbers

    and yes maybe Win7 an issue

  • IvyIvy Posts: 7,165

    Yes I am getting the same error as Wendy . and I am on windows 7 as well . maybe lateron I'll fire up my laptop and try it on there its a win 10 pro.and see if it works on w10 or if its my bad codings skill..lol

  • WendyLuvsCatzWendyLuvsCatz Posts: 38,219

    messing with the registry scares me a tad surprise I might muster up courage later

  • 3dOutlaw3dOutlaw Posts: 2,471

    Wow...I guess @Taoz can stop on the drag and drop, that is much easier!  Thanks!  Running off to try it...

    I've created a shell command for Windows explorer so that I can multiselect files and denoise them. I still have to close all windows

    Open a notepad and paste following lines. I've extracted the archive in C:\neural\denoiser , so the path must be changed according to yours. Save as a .reg file then double click it to make my modification in registry

    Windows Registry Editor Version 5.00

    [HKEY_CLASSES_ROOT\*\shell\denoise]
    @="Denoise"

    [HKEY_CLASSES_ROOT\*\shell\denoise\Command]
    @="cmd /c \"C:\\neural\\Denoiser\\DENOISER.exe -i \"%1\" -o \"%1.denoised.jpg\"\""

    With that you can select one or many files in Windows explorer, then right click and choose "Denoise" to denoise them in one go. When all denoise are finished you can right click the CMD window in the taskbar then select "Close all windows" in order to close them all

     

  • 3dOutlaw3dOutlaw Posts: 2,471

    @Takeo.Kensei, can I limit that reg to certain files types, like PNG and JPG?  I tried changing "*" to ".png", but it is not showing on the right-click menu?

Sign In or Register to comment.