Vray 5 VFB - Composite Source when rendering with backburner

Hi there,

I use a composite tree in the VFB. Bute when rendering in the network the source is always switched to LightMix and the resulting render does not have the composite layers baked into it. Is there any way to change this? Maybe with maxscript?

Thx

For anyone interested:

I got this to work with a preRenderFrame callback script which executes: “((vfbControl #getlayermgr)[1].sourceLayer).src_type = 1”

I tried this script but it doen’t seem to be working on my network renders. The script works when I press the execute now, so I know it’s not the words themselves. I always get the LightMix render, either through the vrayimage file save or through the standard 3ds max output.

Even when I render locally, even if I already set it to composite view, at automaticaclly switches back as soon as the render starts.

OK, so through testing I’ve found that the script works if you dont have a lightmix render element. What would I need to change in the script to account for having a lightmix still present? I tried changing the ‘1’ at the end of the script to 2, but that didnt work.

The Source is always switched to LightMix (whenever the element is present) by design. I presume you can work around this if you transfer the LightMix manipulations “to scene” and remove the element. However, do tell us what’s your scenario. Maybe we can figure out another way.

We do already transfer the lightmix to the scene, so deleting the render element is fine, but I guess this leads onto another question I posted, but didn’t have an answer to yet. Is there a way to setup render presets (one for test renders, one for final) that doesn’t alter the layers already setup in the frame buffer? I have more than this render element to switch on and off, and every so often I miss something spoiling an overnight render.

That happens because the VFB Layers are saved within the Render Presets. Currently, there isn’t a way to bypass this behavior. What comes to mind to mitigate the chance of forgetting is to create a little script that loads a Render preset and afterward loads a VFB Preset:


renderPresets.LoadAll 0 "C:\Users\<user>\Desktop\RenderPreset.rps"
vfbcontrol #loadglobalccpreset "C:\Users\<user>\Desktop\VFBPreset.vfbl"

I’m sorry, my scripting knowledge is next to nothing. Would there be a way of automating this a little more? Where it can save out the scene’s vfb preset, but to the same location as the max file and the same name? Then the same for the loading, automatically searching for a preset with the smae name as the .max file?

many thanks in advance

I think this should do:


sceneName = getFilenameFile maxfilename
outputPreset = sceneName +".vfbl"
vfbControl #saveglobalccpreset outputPreset
renderPresets.LoadAll 0 "C:\<user>\Alexander\Desktop\RenderPreset.rps"
vfbcontrol #loadglobalccpreset outputPreset

Sorry, I’ve been away from this for a while with production work. That code does work for me, thanks. The next bit, is there a maxscript command to send lightmix changes to the scene? I can’t find it in the vfbControl() options.

Here you go.

Ah, it seems I was looking at the older version of that page, many thanks

I worked with the script and had no problems with it.
As I said it has to be added as a PreRenderFrame Callback like this:

callbacks.addScript #preRenderFrame "((vfbControl #getlayermgr)[1].sourceLayer).src_type = 1" id:#vfbComposite persistent:true

Wait what?

I was not aware of this.

For clarification. Does this mean that BacktoBeauty changes are not included in the RGB when sending to backburner, if LightMix is present?

Switching source doesn’t reset the other sources’ changes, by design.
If that is happening through backburner, it’s a bug/limitations we’d like to know about.