Attached is a test asset that shows an error which occurs in our main scene.
We are rendering per frame vrscenes with, in this scene, a rotating rubber toy. We control the render settings with exposed parameters in the HDA.
Unfortunately the renderoutput looks wrong when we render a sequence of e.g. 10 Frames. (One Frame is right and the others are wrong) We think it might be the same kind of problem than in our other thread. Maybe the wrong/no camera is used ?? The file size of the vrscenes seems to be correct.
Yeah, you’ve hit a silly issue
We added support a few months ago for output paths on the ROP driven by expressions (so you could have those filepaths coming from attributes, for example).
In this case it appears that the channel reference `chs()` is treated as an expression upon evaluation, and the export is generated as if a single vrscene is being exported. To boot, the frame token is apparently used as well so the output is being split up based on the frame.
In short - the problem is that the parameter is promoted…
We’ll fix the issue ASAP but I suppose you’d like to be able to continue you project in the mean time. There’s a simple solution:
WARNING: Please back up your HDA in case something goes wrong.
1. Go to the Type Properties of your HDA and paste the following python script under the Scripts tab for the “Python Module” Event Handler:
def updateExportPath():
node = hou.pwd()
# get export path from asset
# using rawValue() so $F and $HIP tokens are preserved instead of evaluated
export_path = node.parm('render_export_filepath').rawValue()
# unlock HDA if locked
isLocked = node.isLockedHDA()
if (isLocked):
node.allowEditingOfContents()
# set ROP export path
parm_references = node.parm('trange').parmsReferencingThis()
for p in parm_references:
if (p.node().type().name() == 'vray_renderer'):
p.node().parm('render_export_filepath').deleteAllKeyframes()
p.node().parm('render_export_filepath').set(export_path)
p.node().parm('execute').pressButton()
# update definiton and lock HDA
if (isLocked):
hdad = node.type().definition()
hdad.updateFromNode(node)
hdad.save(hdad.libraryFilePath())
node.matchCurrentDefinition()
return
2. Go to the Parameters tab, and select the “Render to Disk (execute)” parameter
3. Under the Callback Script, set the type to Python from the little icon on the right (it’s HScript by default so the icon is a capital H)
4. Paste the following in the field: hou.phm().updateExportPath()
-----
This will essentially cause pressing the “Render to Disk” button to Unlock the HDA, apply the Export File Path on the V-Ray Renderer ROP itself, save the HDA definition again, and lock the HDA. The locking, unlocking and saving will only happen if the HDA was locked prior to pressing the button. If the HDA was already unlocked prior to pressing the button, only the file path will be modified.
I’ve attached a video showing how to do this with your HDA here --> LINK.
I tried this workaround and it works fine for us. This behavior happens only for the export filepath parameter right? The “SettingsOutput_img_file_path” seems to work correct.
Maybe you can ping us if this fix is implemented in the nightly builds. Thanks again for you effort.