Announcement

Collapse
No announcement yet.

(Fixed) [HOU-3006] Render per frame vrscene sequence with HDA does not work correct

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • (Fixed) [HOU-3006] Render per frame vrscene sequence with HDA does not work correct

    Hello,

    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.

    Click image for larger version  Name:	Screenshot 2022-02-08 152301.jpg Views:	0 Size:	36.4 KB ID:	1139301
    This error does not happen if we render all the vrscenes manually frame by frame (change frame - hit render current Frame button and so on)

    Since most of our renderpipelines rely a lot of this functionalitly we would be happy if you could provide a fast fix for this. Thank you very much!!

    Asset and scene are provided. Let me know if you need more infos.

    kind regards
    Jon
    Attached Files
    Last edited by Gosho.Genchev; 20-02-2022, 08:25 PM.

  • #2
    Hey Jon3D ,

    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:

    Code:
    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.


    Hope that helps!
    Last edited by Gosho.Genchev; 08-02-2022, 05:58 PM.
    gosho.genchev@chaosgroup.com

    Comment


    • #3
      Hey Gosho.Genchev

      Thank you very much for the fast reply and the workaround. I will try this immediately.

      Comment


      • #4
        hey Gosho.Genchev

        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.

        Jon







        Comment


        • #5
          > Maybe you can ping us if this fix is implemented in the nightly builds

          Will be there in tomorrow build.
          V-Ray For Houdini | V-Ray Hydra Delegate | VRayScene
          andrei.izrantcev@chaos.com
          Support Request

          Comment

          Working...
          X