Unique filename outputs per view layers?

I work in a studio that uses Maya/Arnold, and I’m just now diving hard into Blender (3.5.1) for my own personal work. I’m loving it so far.

The first major thing I’ve run into which I cannot seem to find a clear answer for from searches and documentation is this. I understand “view layers” to act as what Maya calls “render layers.” So I’ve set up two simple view layers - one to render my hero object (a car), and the other to render the environment. But I don’t see a way to create unique filenames on disk for each layer. When I change the output file path for one view layer, the other one updates with the same file path. Therefor they overwrite each other when rendering the animation.

I’ve tried using a token, “$Layer” in the filename, but to no avail. I must be missing something simple, because this effectively would make the view/render layers useless. Please educate me. Thanks.

You can use a File Output node in the compositor.

Duplicate the Render Layers node, and change the View Layer in the copy.
Then in the properties for the File Output node, you can add as many inputs as you like. Each one will be saved with the name specified in the File Subpath box.

Thanks for the response and the tip, Magpie.
I am looking into this now.
This seems to be working for a single frame (2x images). I am about to test with the animated sequence. I’m curious where the compositor pulls the images from if not the output directory I specified. Thanks again.

The compositor gets its input directly from the render, via the Render Layers node.
It looks like when you add the File Output node, it uses that instead of the Output options for the scene. So the actual file saving bit is done via the node.

Also, you don’t need to save just the final render. You can add all the other render layers, along with material AOVs, and save each one out individually.

Okay, thanks. I’m testing on a 5 frame sequence now.
I hope I can keep all of the AOVs and lightgroups in a single, multi-layered EXR per render layer. This has been very helpful.

When you pick a multilayer exr as the output format, then each of the inputs is saved as a layer within that file, rather than as multiple files. (which is probably what you want)

If you do want some of them in separate files, then you can add as many File Output nodes as you need. Then you can pipe the different passes into the different output files.

I understand. Yeah I did a few tests. Rendering the whole sequence now.
Yeah I want to keep most of the AOVs together.
I’m really liking blender, but I must say just as a matter of fact, this extra step will keep me from using it and pushing others to use it for some projects.
Do you happen to know of any add-ons that allow simply directly writing the different layers to disk with unique names? Or have you heard talk of the intention to add it as a feature within Blender?
Once again, thanks for the help.

I’ve not used any addons for that sort of thing.

A simpler way to get the render layers in a single exr file is via the Output section in the Scene settings tab. That way you can avoid the compositor view. But if you want multiple different files, and full control over what goes into them, then the File Output node is te way to do it.