Announcement

Collapse
No announcement yet.

Interactive camera rotation in FrameBuffer

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

  • Interactive camera rotation in FrameBuffer

    Hello, I was wondering if it's possible to modify the rotation of the camera in interactive mode in the VFB?

    I have a scene that I'm dynamically loading into VRay and had to convert transforms from left-hand to right-hand to get it to render properly. Now after enabling interactive mode in the renderer I found that the orbiting visually makes the camera roll instead of rotating it around the pivot. I'm assuming this has something to do with those transforms I applied to the scene objects.

  • #2
    Hello, can you check if the built-in camera control works properly or it exhibits the same wrong behavior? To do that, hold down the Shift (or Ctrl for pan) key and left-click, hold down and drag the mouse over the rendered picture in V-Ray VFB window. If it works properly there, you might want to check the code in "AppSDK\examples\cpp\interactive\05-gui-demo\movement.h" as I suspect the SettingsUnitsInfo.scene_upDir vector.
    Last edited by stanislav.kirilov; 17-08-2023, 09:47 AM.

    Comment


    • #3
      The built in camera controls are what was causing the issue for me. Panning works but orbiting with shift+left-click causes the camera to roll. Is the code in the example used for creating a custom camera control?

      Comment


      • #4
        Yes, the code in the example is used to control the camera in a custom window. The code is similar (although too complicated with unnecessary Windows timers, etc. for legacy reasons) to the one used for the built-in VFB camera controls.

        Comment


        • #5
          Do you know if that same code can be written in C#? Are the VRay functions and members exposed in the C++ API the same as the C# API?

          Comment


          • #6
            Yes, everything available in C++ is available in C# too and also (with a few minor exceptions) in Python and Node.js.

            Comment

            Working...
            X