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.
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.
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?
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.
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?
Yes, everything available in C++ is available in C# too and also (with a few minor exceptions) in Python and Node.js.