vDenoise Command Line tool Helper (Maxscript UI)

IMPORTANT NOTICE:
V-Ray Next users ought to run vdenoise.exe (from your v-ray installation folder, “bin” subfolder) from windows explorer, so to get a nice UI, like so:

-- Old post, non-Next V-Ray users only --

It’s a macroscript I wrote to help with sequences’ post-process denoising.
It works with VRImage files and Multi-layer EXR files, best written directly from the raw file output of V-Ray (but provided the elements are there, any exr will in fact do.), with auto-numbering detection.

Installation:
*) RUN the file called “vDenoise_3.40.02.ms”
*)Select, from the top menus, “Customize->Customize User Interface…”
*)From the “Category” pulldown choose “VRay”, scroll to the very bottom, and find “vDenoise Command Line Tool Helper UI”, like shown in the image below.
*)With it selected, you can assign it to a shortcut (I used ctrl+alt+shift+v, which is free by default in max), a menu, a toolbar or a quad menu, as you see fit, through standard max operations.

Once the new tool is run, the UI appears:

Operation:
1)Click “Pick a File in your sequence…”
2)Pick a .VRImg or.Exr file from anywhere in a sequence (ie. no need to pick the first.).

3a)Click “Denoise it!”
4a)Find the denoised results into the input files folder.

3b)Ctrl+Click “Denoise it!” : a dialog will appear informing you the command line has been copied to clipboard (press ctrl+shift to skip the message box entirely)
4b)Open a command window, paste your command line, change it as you wish, and run it.

This will auto-detect sequences and change the frame blending to 1 (once only. It can be overridden manually.).
UI controls will activate only if they make sense to do so, depending on user choices. When disabled, their displayed values are not taken into account.

Known Limitations:
Multiple dot sequences in image names will fail (denoiseMe…exr), and not failing would require some annoying string parsing: please make sure a Dot’s there for a reason (ie. add something in between them!). ^^

Notes:
The script will always build the shortest possible command line, so if some options are enabled, but do not appear explicitly in the command line printed out in the listener, it is because those options in their current state, are provided as defaults by the executable (f.e.: Manual mode, radius 10, or strength 1.0).
Controlling the denoising operations from the command window which opens up will confirm it.
Saving a preset with the name “default” (non case-sensitive) will load it automatically on startup.
Should it find such a preset, and load it, it’ll automatically roll-up the presets rollout, so it’ll be out of your way, and shorten the dialog.
If the file picking button tooltip always contains the full picked path, handy in case the button is cutting it off.

The script is fully tool-tipped: be kind to the poor soul which had to write them and spend a second reading them!
vDenoise_3.40.02.ms.zip : This is somewhat QAd (by you kind people) and it works within its limits. If unsure, download and use this one.

Edits and ChangeLog:
04-06-2016: Generally Strengthened the file pathing and number detection routine, It now supports network paths and arbitrarily dotted files, provided the numbers in between the dots are ONLY numbers.
f.e.: denoiseMe.RGB_Color.A.Few.More.Dotted.Bits.In.TheI mage.Name.0000.exr will work, while
denoiseMe.RGB_Color.A.Few.More.Dotted.Bits.In.TheI mage.Name.00a00.exr will be considered a single image.
07-06-2016: Now uses the variable “VRAY_OSL_PATH_3DSMAX20XX_x64” to build the denoiser path, safer than the max installation one (Thanks Blago).
19-06-2016: Updated for 3.40.02 (sp4 hotfix), to include the -frames option to pick a subset of frames to denoise in a sequence, rationalised the interface and added ctrl+click to copy the command line to the Windows clipboard.
25-06-2016: Fixed a logic issue for the UI which prevented per-element denoising if a non-manual preset mode was selected.
26-06-2016: Added a dropdown to choose process priority, however to be able to do that i had to change the way i invoke the denoiser, and this also leads to two command windows being open. Available as B version for the time being.
18-08-2016: Removed the ugly B version. Added a BackBurner Enabled version which needs testing.
19-08-2016: Updated the BB version to -hopefully- a working one. definitely more time needed on that release, so be warned.
19-12-2016: Removed the BB version. Please don’t use it, nor ask for any support on it. Feel free to change the script to suit your needs however, should you have downloaded it already.
vDenoise_3.40.02.ms.zip (5.96 KB)

thanks Lele. very useful

Awesome! The Command-Line was a bit confusing at times.

!hanks Lele :slight_smile:

thank you lele.

It’s not working at my side. when I pick the button “Pick a file in your sequences…” the button goes blank. clicked denoised it and a window tries to open but dissappear too fast so I cannot see anything. nothing happen after that.

There is currently no support in the exe OR the script for network paths.
The button going blank isn’t a good sign, it should fill with the filtered file path (ie. denoiseMe.0000.exr → denoiseMe.???.exr).

In any event, it prints the full command line in the maxScript listener (right-click in the mini-listener in the bottom-right corner of max, the pink and white strip, and choose “Open Listener”.) in Blue.
Would you be so kind as to send that to me, along with the full path to the sequence you’re trying to denoise (one frame name included) (Mail @ chaosgroup.com would be great.)

Thanks for sharing!
This defiantly helps speed up the process of denoising sequences.
Now get on to the NUKE denoise node :wink: Or better still a FUSION one!!

The V-Ray for Nuke guys are looking into it, but I don’t know if/when something wil be available.

Best regards,
Vlado

Hi Lele :slight_smile:

Any chance to get this limitation solved soon ?

Thanks.

Yes, for the command-line tool, it’s just a stupid mistake on my part (I didn’t expect digits anywhere except in the frame numbers, which is obviously wrong). Will try to patch this as soon as possible on my side, and the script should be easy to fix.

Best regards,
Vlado

edit: keep downloading the script from the thread-starting post for updates.

Awesome - thanks Vlado :slight_smile:

lele, I can send you the whole sequence if you want.

The text will do, thankyou: the content aren’t an issue right now (the problem seems to happen with some file path or name, or odd character.).

on the listener, just appears this: “C:\Program Files\Chaos Group\V-Ray\3dsmax 2016 for x64\tools\vdenoise.exe -inputfile=”“”

and this is the path: D:\Aluna_001_Comercio\Aluna_001_Comercio_.RGB_color.0145.exr

yes, it IS my code.
I stupidly expected at most 2 dots in the filename (ie. filename.0000.ext).
Will fix it asap.

04-06-2016: Generally Strengthened the file pathing and number detection routine, It now supports network paths and arbitrarily dotted files, provided the numbers in between the dots are ONLY numbers.
f.e.: denoiseMe.RGB_Color.A.Few.More.Dotted.Bits.In.TheImage.Name.0000.exr will work, while
denoiseMe.RGB_Color.A.Few.More.Dotted.Bits.In.TheImage.Name.00a00.exr will be considered a single image.

Download the file in the first post of the thread, as usual, and overwrite the previous version.

lele,
still not working on my sequence.
this is what the listener prints:
“C:\Program Files\Chaos Group\V-Ray\3dsmax 2016 for x64\tools\vdenoise.exe -inputfile=“D:\Aluna_001_Comercio\Aluna_001_Comercio_.RGB_color.???.exr” -useGpu=0 -frameBlend=3”

If it prints that line, the problem isn’t with the script anymore (you can see it finds and substitutes the numbers with ???).
Try running the denoiser manually in a command window (Copy-paste the line above) so you will see the results.
I’ve never seen a frame blend of 3 (that’s SEVEN frames blended in total: not only unnecessary, but long and ultimately needless), so that may be why.

so, 1 frame blending would be enough?

It is usually enough; more frames might be able to resolve some fine details better, but the difference is not that big.

Best regards,
Vlado