[HOU-2934] Switch Camera with Pointexpression Bug

Hello,

we are saving out “vrscenes” where the camera gets switched each frame based on a point attribute. We then submit this to deadline. The first few Frames the camera cicles through correctly but then it somehow locks one camera and renders the rest of the frames with it.

I am providing an example scene below for you to test the issue.
220113_camswitchbug.zip

A fast fix would be very nice, because it is very urgent.

Thanks a lot
Greetings Lucca
220113_camswitchbug.zip (345 KB)

Hello,

I wouldn’t post another reply if this wasn’t quite urgent. Could you give me an update on how long this is gonna take to fix?
I also wanted to mention that this issue occured in Vray Version for Houdini 19. It seemed to work before that.

Greetings Lucca

Hey @andreyluccahannes ,

I’ll check right away and come back with an ETA. Apologies for the delay!

Hey @andreyluccahannes ,

The following Post Translate script should resolve the issue for you until the fix is implemented. The problems seems to be caused by an additional camera export that overrides the one that should be actively used for rendering.
You can put the script in the Post Translate tab of the V-Ray ROP.


import vray
from vfh import vfh_utils

# find the active camera for the current frame
n = hou.node('.')
switcher = n.parm('render_camera').evalAsNode()
active_cam_name = switcher.input(switcher.parm('camswitch').evalAtFrame(hou.frame())).name()

vfh_utils.syslog("----- On Frame %s -----" % int(hou.frame()))

# remove other cameras from VRScene
plugins = ['RenderView', 'SettingsCamera', 'CameraPhysical']

renderer = vray.VRayRenderer()

for node in renderer.plugins:
    if node.getType() not in plugins:
        continue
    if active_cam_name not in node.getName():
        vfh_utils.syslog("Deleting plugin \'%s\'" % node.getName())
        node.deleteThis()

# print used camera
vfh_utils.syslog("Using plugin \'%s\'" % active_cam_name)
vfh_utils.syslog("----- Done -----\n")

I’ll update you when a fix is available in the nightly builds as well.

Best regards!

Hello @Gosho.Genchev ,

seems to work perfectly fine. Thank you very much for the fast solution. You helped us out a lot here :slight_smile:

Best regards,
Lucca