Announcement

Collapse
No announcement yet.

Is it possible to make a script to chnage the Vray settings? I want to set the camera mode to spherical and the FOV to 180

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

  • Is it possible to make a script to chnage the Vray settings? I want to set the camera mode to spherical and the FOV to 180

    I want to have two scripts saved to the toolbar just so I can quickly toggle between using normal camera and spherical camera mode as I need to render both quite often.

    The maxscript listener doesn't pick up any changes to the vray settings.
    http://www.jd3d.co.uk - Vray Mentor

  • #2
    This will set it to a 180 degree spherical camera:
    Code:
    vr=renderers.current
    vr.camera_type=1
    vr.camera_fov=180
    vr.camera_overrideFOV=1
    To set it back to normal:
    Code:
    vr=renderers.current
    vr.camera_type=8
    vr.camera_overrideFOV=0
    The "8" above for camera type is a perspective camera. I can't seem ​set it back to "default" (setting it to 0 had no change).​
    Last edited by dlparisi; 02-03-2024, 02:00 PM.
    www.dpict3d.com - "That's a very nice rendering, Dave. I think you've improved a great deal." - HAL9000... At least I have one fan.

    Comment


    • #3
      Here's a script that will toggle from one to the other... (I'm getting a 403 error when I try to paste it so I'll just attach it.)
      Attached Files
      www.dpict3d.com - "That's a very nice rendering, Dave. I think you've improved a great deal." - HAL9000... At least I have one fan.

      Comment


      • #4
        Hey mate, thanks for that, but I am gettign this error:

        -- Unknown property: "camera_type" in V_Ray_GPU_6__update_2:V_Ray_GPU_6__update_2
        -- MAXScript callstack:
        -- thread data: threadID:3752
        -- ------------------------------------------------------
        -- [stack level: 0]
        -- In top-level
        -- Unknown property: "camera_overrideFOV" in V_Ray_GPU_6__update_2:V_Ray_GPU_6__update_2
        -- MAXScript callstack:
        -- thread data: threadID:3752
        -- ------------------------------------------------------
        -- [stack level: 0]
        -- In top-level​

        I guess Vray GPU is different?
        http://www.jd3d.co.uk - Vray Mentor

        Comment


        • #5
          No problem. For GPU, the camera settings lie in the ".V_Ray_settings" that gets transferred between CPU and GPU if you switch between them. This makes the syntax a little different. Also, GPU only has a "Spherical Panorama" camera type not "Spherical" so I'm switching between them for CPU/GPU. Update attached.
          Attached Files
          Last edited by dlparisi; 13-03-2024, 07:59 AM.
          www.dpict3d.com - "That's a very nice rendering, Dave. I think you've improved a great deal." - HAL9000... At least I have one fan.

          Comment


          • #6
            Thanks so much for this mate - sorry for lack of respect and reply, I have been super busy, and jumped off the project where I need this - so I haven't had time to use your script which will, no doubt, save me from goign crazy when the time comes.
            Last edited by JD3D_CGI; 11-04-2024, 08:05 AM.
            http://www.jd3d.co.uk - Vray Mentor

            Comment

            Working...
            X