Possible to disable writing bumpnormals and VrayDenoiser files to disk?

This is more of an annoyance than a problem, but our hard drives fill up with these extra passes over time and are 100% never used in the comp.
I know the denoiser pass needs these, but is there a way to disable writing all these thousands and thousands of extra image files to disk when rendering?

We just use the RGB_color pass exclusively in 99% of jobs. By the time we wrap a project after 4 drafts, it’s an immense bloat of files.

Thanks!

Split file save has this feature.

Thanks for the reply Lele. Would you be able to explain what you mean by that? I can’t find a way to get vray to stop writing bumpnormals and vraydenoiser images to disk.

I’ve made a small bat file to clean up after vray afterwards, but our company is 100% remote and runs on Box sync and a huge chunk of our sync time is masses of vray files we don’t use.

I should clarify that we often use ObjectID and keep the origRGB for safety for more denoising options in post.
In most use cases we get these folders:

origRGB
RGB_color
VrayObjectID
bumpnormals
vraydenoiser

Is there a way to get it to not write the last 2 folders?

this:


Gets me this:

Hmm. I don’t get it. You still have a vraydenoiser folder so I guess it’s not possible to stop it writing to disk?
The RBG Color pass already has the denoised image baked in so we don’t need it twice.

We don’t output to EXR because of the sizes, but in testing EXR just now, no combination of settings will stop vraydenoiser and bumpnormals frames writing to disk.

So to recap, just need:
- RBG_color (denoised and glare results baked in like usual)
- object ID
- Orig RGB

The only reason I’m chasing this is we do thousands and thousands of frames of flythroughs every week.
The project folders bloat like absolute crazy and grind our cloud syncs to a halt. It’s been a drag for years on disk space and syncing and I’m finally fed up enough to ask for help about it :slight_smile:

Ideally V-ray would produce the denoised image, but let us uncheck saving all the bloat calculation passes to disk somehow…or the option to clean up after itself once rendered.

Maybe i wasn’t clear: the denoiser folder only contains the denoised image, no other channel.
Bump normals shouldn’t be written at all, unless you have them as a separate, authoritatively added, render element.
File format doesn’t matter.

This isn’t likely to change in favour of outputting *only* the RGB_Color with glare and the rest baked in: the choice is deliberate.

You can very easily script a post-render action to wipe anything your specific workflow doesn’t need, right after it’s created, so it’ll never get to a disproportionate size (i guess this is one of the advantages of not writing raw files with packaged channels), and there will be no need to chase it with bat files.
That’s got nothing to do with V-Ray, though, besides retrieving the output path to scan for unwanted file types: it’s a Max-bound script that invokes standard dos commands or their equivalent.
I could surely help writing you a simple one that you could adapt to your needs.

Yeah that is a strange one with bumpnormals. I’ve never understood why vray is writing that to disk and just assumed it was part of the denoiser process.

Ah, I’ve just realised the Intel AI denoiser writes it, but default vray denoiser does not.
That explains it as we use the intel one pretty exclusively because it works so well with animations.

A post clean up script would be very useful. Great idea!

Ideally it would just delete “bumpnormals” and “vraydenoiser” folders from the output set in the frame buffer settings and problem solved!

Attached.
Notice it will run at render end, not frame end.
So deletion of a sequence of frames will happen only after the last one completed.
It will work with or without multiple folder save for the two channels you mentioned.
It ought to be safe to use even if those channels aren’t specified at all in the render sequence, as it takes hardly any time to process, and won’t delete anything that isn’t there.
lds_001.zip (724 Bytes)

It works perfectly! Thanks so much Lele, you’ve saved a lot of hard drive space and sync headaches :slight_smile:
I just had to change the entries from “vraybumpnormals” to just “bumpnormals” in the script to match what the intel denoiser names that folder.
And also disable max script security as it was blocking the script when it got to the del command.

Happy days!
Post_Render_Folder_Cleanup.zip (740 Bytes)

Thanks, I forgot I had the safety features off in Max, good catch. :slight_smile:
Also, sorry for the misnomer, but i am glad you’ve found the script easy enough to edit.

Hi

This script sound really nice because I also have to delete these unnecessary files at the end. But, the script gives me an error at line 19 when I’m trying to run it. Any idea why?

-- Error occurred in anonymous codeblock; filename: G:\Scripts\lds_001.ms; position: 492; line: 19
-- MAXScript FileIn Exception:
-- Unknown property: “output_splitfilename” in V_Ray_GPU_6__update_2_1:V_Ray_GPU_6__update_2_1
-- MAXScript callstack:
-- thread data: threadID:12228
-- ------------------------------------------------------
-- [stack level: 0]
-- In anonymous codeblock; filename: G:\Scripts\lds_001.ms; position: 493; line: 19
-- Locals:
-- rootName: undefined
-- bnPath: undefined
-- vr: V_Ray_GPU_6__update_2_1:V_Ray_GPU_6__update_2_1
-- dPath: undefined
-- getclsid: undefined
-- rootPath: undefined
-- itsVray: itsVray()
-- Externals:
-- ------------------------------------------------------
-- [stack level: 1]
-- called from top-level

Thanks
Mikko