Announcement

Collapse
No announcement yet.

waitForRenderEnd - closing VFB

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

  • waitForRenderEnd - closing VFB

    Hello,

    When the render is completed using waitForRenderEnd(), VFB is closing immediately. is there anyway to make it open until that window is closed manually?

    i tried using renderer.vfb.show(true), but didn't help.

    Regards,
    Gopi.

  • #2
    Hello, sorry for the late response. Probably the reason VFB closes is that after waitForRenderEnd() returns, the VRayRenderer instance is (automatically) closed which forces the VFB to close as well. What language and which render mode do you use? Can you post the lines after waitForRenderEnd()?

    We admit that the behavior of waitForRenderEnd() may not be what the user expects in some cases (e.g. interactive rendering mode + keepInteractiveRunning flag set) and we're planning to extend its functionality. But in any case, the reason why VFB closes should be the code after it. So if my assumption is right, a possible solution would be to add a custom wait() which would unblock on some render state change transition or on vfb closed event, etc.

    Comment


    • #3
      Hello,

      Thanks for your reply.

      I am using C++ language. Render mode is RENDER_MODE_PRODUCTION_CUDA

      After renderer.waitForRenderEnd(), there is no code related with renderer (VRayRenderer) (there is a code to save output image on conditional basis) . Will this instance be closed automatically?

      As you suggested, i added custom wait and a messagebox after that, it shows VFB until i close message box, after closing, VFB is also closing.


      Regards,
      Gopi.

      Comment


      • #4
        The VFB window is owned by the VRayRenderer instance (and you can have several VRayRenderer and VFB instances). When you destroy the VRayRenderer instance, its associated VFB window is automatically closed. You have to keep the renderer alive as long as you need the VFB.

        Comment


        • #5
          Ok, thank you.

          Comment


          • #6
            Hello,

            Also, if i close the vfb from the window, its not stopping the render till it completes (in background its rendering i think), after that only, waitForRenderEnd() getting released.

            i tried using setOnStateChanged, but going into IDLE_DONE after render gets completed.

            is there anyway to get close instance of vfb window?

            Regards,
            Gopi.

            Comment


            • #7
              You can use VRayRenderer::setOnVFBClosed(callback) and call VRayRenderer::stop() inside your callback function.

              Best regards,
              Stan

              Comment


              • #8
                Thank you Stan. It works.

                Regards,
                Gopi.

                Comment

                Working...
                X