Announcement

Collapse
No announcement yet.

Script to create VRayPhysicalCamera in 2016 (that isn't pointing down from origin) ?

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

  • Script to create VRayPhysicalCamera in 2016 (that isn't pointing down from origin) ?

    I'd like to create a toolbar button which in 3ds Max 2016 will create a VRayPhysicalCamera.

    I know the command is vraycreateVrayPhysicalCamera(), but this creates it at world origin 0,0,0 and pointing down.

    I don't know enough about scripting - please can someone tell me the syntax to create a camera at any camera position and target position I prefer ?

    e.g. Camera to be a x=0, y=-5000, z=1500 & Target to be at x=0, y=0, z=1500.

    Many thanks.
    Jez

    ------------------------------------
    3DS Max 2023.3.4 | V-Ray 6.10.08 | Phoenix FD 4.40.00 | PD Player 64 1.0.7.32 | Forest Pack Pro 8.2.2 | RailClone 6.1.3
    Windows 11 Pro 22H2 | NVidia Drivers 535.98 (Game Drivers)

    Asus X299 Sage (Bios 4001), i9-7980xe, 128Gb, 1TB m.2 OS, 2 x NVidia RTX 3090 FE
    ---- Updated 06/09/23 -------

  • #2
    Create the camera, while it is selected press Ctrl+C. Moves it into position of the current view. I admit I have not tried this with 2016 yet!
    Adam Trowers

    Comment


    • #3
      How to create a target at the same time by a vraycreateVrayPhysicalCamera() command?
      Someone known?

      OakCorp Japan - Yuji Yamauchi
      oakcorp.net
      v-ray.jp

      Comment


      • #4
        Hi,

        cam = vrayCreateVrayPhysicalCamera()
        cam.targeted = true
        cam.pos = [0,-5000,1500]
        cam.target.pos = [0,0,1500]

        Comment


        • #5
          Thank you!

          Your code is helpful.

          I made it simply.
          If a code is set to listeners, PhysiCam with a target will be created along with the Z-axis of the selected view.

          Code:
          cam = vrayCreateVrayPhysicalCamera() cam.targeted = true;

          OakCorp Japan - Yuji Yamauchi
          oakcorp.net
          v-ray.jp

          Comment

          Working...
          X