Rendered images should not have "rs_" added to Render Setup layer name (Maya 2017.3)

Hi,

We are using the following File Name Prefix when rendering with V-Ray: <Scene>_<Layer>_<Camera>.

Consider the following:
- Scene name: “scene1.mb”
- Render Setup Layer: “myLayer”
- Camera name: “camera1”

With V-Ray 3.52.02 stable build 27374, the resulting image will be called “scene1_rs_myLayer_camera1.exr”. Please note the “rs_” part.

I see the issue (the “rs_” part) both when batch rendering from inside of Maya and when command line rendering (using the -im flag to set the filename prefix).

When Render Setup was introduced in Maya (2016.5 I believe), Autodesk also made this “rs_” part automatically added to render layers, such as seen in the filename above. I’m guessing it was one way of detecting whether a render was performed using legacy render layers or the new Render Setup.

However, with Maya 2017 Update 3, they removed this behavior. So if you render using e.g. Maya Software (File Name Prefix: “<Scene>_<RenderLayer>_<Camera>”), you will no longer get the “rs_” part added to the filename. I believe the same goes with Arnold etc. But so when I render with V-Ray I get the “rs_” part in the filename, which in our case is highly undesirable actually.

It would be great if you could conform to the Maya 2017 Update 3 behavior, and make V-Ray *not* add the “rs_” part whenever the render layer is used in the rendered image’s filename.

It could be trivial to implement a hack to auto-rename files after a successful render, but I would much rather start using a (stable) build of V-Ray which will fix this out of the box (so many things to fix, so little time you know ;)).

Cheers,
Fredrik

Confirmed, it looks like it’s not behaving correctly. I’ll make a note to the devs and let you know when this has been resolved.
Apologies for the inconvenience.

I think we did it originally because Maya was doing it :slight_smile:

Best regards,
Vlado

Many thanks, Alex!

Hehe. That’s understandable. It’s been a bit back and forth…

We actually don’t add the “rs_” prefix ourselves, it comes from calling a Maya API function.
We do have a solution, but it currently involves using undocumented Maya API, so we’ll continue the discussion with Autodesk on their forums to see if there’s a cleaner way.

Much appreciated, thank you.

Can i ask what API function you are using. We want to replicate the issue in our pipe to get consistent results.

Thanks in advance
/Fredrik

renderLayerDisplayName seems to do the trick in update 3. Autodesk are suggesting a different approach though, we’ll have to test it.

This is what I do here on my side (doesn’t return “rs_” in the names):

import maya.app.renderSetup.model.renderSetup as renderSetup

render_setup = renderSetup.instance()
render_layers = render_setup.getRenderLayers()

for render_layer in render_layers:
    render_layer_name = render_layer.name()
    is_renderable = render_layer.isRenderable()
    print(render_layer_name, is_renderable)

Not sure what would be the most appropriate/desired method here. Would be nice to have Autodesk chime in on that one.

I just saw that this is also a possible approach:


// MEL
renderSetup -q -renderLayers;

# Python
import maya.cmds as cmds    
cmds.renderSetup(q=True, renderLayers=True)

I wrote some notes on my blog about this:
https://fredrikaverpil.github.io/2017/05/07/querying-render-setup-in-maya-2017/

A gist with all functions of the render setup module: