Announcement

Collapse
No announcement yet.

Nuke Plugin for reading VRAY Cameradata from EXR released!

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

  • #16
    Hey Guys,

    i just wanted to let u know of my latest developement.

    I have just finished building a gizmo and a python script, that do the same as my previous plugin, but with one huge advantage - IT IS PLATFORM INDEPENDENT cause it only relies on nuke and python. You will need nuke 5.2 cause of the new metadata functionalities!

    Find it here -> http://www.fullblownimages.com/scripts.html

    EDIT: I FORGOT AN IMPORTANT STEP! Before u can use the gizmo u must edit your init.py and put the following at the end:
    nuke.load('vrayCameraAttributes.py')

    Additionally u will need the python cgkit which u can download here
    http://sourceforge.net/projects/cgkit/files/cgkit/
    Just copy the cgtypes folder into one of your nuke plugin directories.
    Last edited by ultrasonic; 29-12-2009, 07:34 AM.
    OLIVER MARKOWSKI - Head of 3D at RISE | Visual Effects Studios

    Comment


    • #17
      Hey Guys,

      i made some fixes and updates. First of all...a GIZMO doesn't seem to work if u want to connect its value to a camera via drag&drop.

      I decided to just post the nuke clipboard of my group
      Code:
      set cut_paste_input [stack 0]
      version 5.2300
      push $cut_paste_input
      Group {
       name readVrayCameraAttributes
       tile_color 0xff0000ff
       selected true
       xpos 1042
       ypos -1110
       addUserKnob {20 VrayCameraAtrributes l "Vray Camera Atrributes"}
       addUserKnob {26 Title l "Please visit" T "www.fullblownimages.com for updates!"}
       addUserKnob {26 ""}
       addUserKnob {13 position l Position}
       position {{"\[python nuke.thisNode().metadata('exr/cameraTransform',nuke.frame(),'view')\\\[12\\]]"} {"\[python nuke.thisNode().metadata('exr/cameraTransform',nuke.frame(),'left')\\\[13\\]]"} {"\[python nuke.thisNode().metadata('exr/cameraTransform',nuke.frame(),'left')\\\[14\\]]"}}
       addUserKnob {13 rotation l Rotation}
       rotation {{"\[python vrayCameraAttributes().rotationX()*-1]"} {"\[python vrayCameraAttributes().rotationY()*-1]"} {"\[python vrayCameraAttributes().rotationZ()*-1]"}}
       addUserKnob {7 focalLength l "Focal Length" R 0 500}
       focalLength {{"sqrt(horizontalAperture*horizontalAperture+verticalAperture*verticalAperture) / (2 * tan(pi * fov / 360))"}}
       addUserKnob {7 horizontalAperture l "Horizontal Aperture" R 0 100}
       horizontalAperture {{"\[metadata exr/cameraAperture]"}}
       addUserKnob {7 verticalAperture l "Vertical Aperture"}
       verticalAperture {{horizontalAperture*input.height/input.width}}
       addUserKnob {7 fov l "Field of View" R 0 360}
       fov {{"\[metadata exr/cameraFov]"}}
       addUserKnob {7 targetDistance l "Target Distance" R 0 10}
       targetDistance {{"\[metadata exr/cameraTargetDistance]"}}
       addUserKnob {26 ""}
       addUserKnob {26 author l Created T "by Oliver Markowski"}
      }
       Input {
        inputs 0
        name Input1
        xpos 0
        ypos 238
       }
       Output {
        name Output1
        xpos 0
        ypos 300
       }
      end_group
      U have to set your cameras rotation order to XYZ. I think i should change that in the script, so it works with default nuke setting which is ZYX.

      You also need the python script which is attached to this post.
      To get this python script working u need the previously mentioned python cgkit from here No installation needed...just copy the cgtypes folder into one of your nuke plugin directories.

      I have also made an exr-testsequence available over there and a .nk script is also attached.

      Have fun and don't hesitate to ask if something doesn't work over at your place! I am planning on creating a video tut for setting this up as well....what do you think?

      EDIT: I know that the current implementation throws a lot of error messages to the errorlog-window if you connect it to a node with no metadata...i have already fixed that issue and will release it along with the video-tutorial!

      cheers
      Oli
      Attached Files
      Last edited by ultrasonic; 09-01-2010, 11:44 AM.
      OLIVER MARKOWSKI - Head of 3D at RISE | Visual Effects Studios

      Comment


      • #18
        Hi all,

        I hope this isn't too stupid a question but I can't find the answer. How do you setup VRay to include meta-data such as the camera in your exrs?

        Thanks

        Comment


        • #19
          This is default vray behaviour...no need to setup...i can only speak for vray4maya...but i think max does this as well!

          cheerio
          OLIVER MARKOWSKI - Head of 3D at RISE | Visual Effects Studios

          Comment


          • #20
            Oh ok, I was expecting that would be the answer since I couldn't find where to set it up. Thanks!

            So it would not be possible to add arbitrary extra data into your exrs at least in render time? I mean apart from the render elements. You'd have to do it after rendering with an external tool or plug-in or so right?

            Pretty nice. I just wanted to make sure I've got it. All sounds fair to me

            By the way, thanks a lot for sharing Oli!

            Comment

            Working...
            X