Announcement

Collapse
No announcement yet.

Snap shot in VFB

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

  • Snap shot in VFB

    Could we have a snap shot feature as in the MFB?
    This would be really handy for cropping in to exact areas of which you need to fix.

  • #2
    I know this is often requested feature, so I decided to try it with a script implementation.

    Here is the script I've made up:
    Code:
    // generate the snapshot in RenderView
    renderWindowRenderCamera snapshot renderView "";
    
    // save the image to file
    string $renderPanels[] = `getPanel -scriptType "renderWindowPanel"`;
    string $filename="/tmp/vray.snapshot.jpg";
    python("import maya.app.general.createImageFormats as createImageFormats");
    python("formatManager = createImageFormats.ImageFormats()");
    python("formatManager.pushRenderGlobalsForDesc(\"JPEG\")");
    
    renderWindowEditor -e -writeImage $filename $renderPanels;
    
    python("formatManager.popRenderGlobals()");
    
    // open the image in the VFB and delete the file
    vray vfbControl -loadimage $filename;
    sysFile -delete $filename;
    Tested on linux, for windows you'll probably have to change the path to the generated file.

    Enjoy. If enough people test it and report that it is working we can add it to the official builds.
    V-Ray developer

    Comment


    • #3
      Interesting, thanks for script will definitely test it out. Its mel right?
      CGI - Freelancer - Available for work

      www.dariuszmakowski.com - come and look

      Comment


      • #4
        Well what can I say but a big thank you.
        This works great!! tried to break it but seems fine so far. Can others test this be good to get some feedback.

        Many thanks for this..

        S

        PS forgot to say tested on Win7 x64 Maya 2014 latest beta build
        Last edited by stezza; 28-03-2014, 08:13 AM.

        Comment


        • #5
          Works on windows too

          1 question tho. Is there a way to get a better quality snapshot? AA ?
          CGI - Freelancer - Available for work

          www.dariuszmakowski.com - come and look

          Comment


          • #6
            You'll have to ask Autodesk for this feature. I don't see any options for the snapshot in the Maya's RenderView.
            V-Ray developer

            Comment


            • #7
              I admit it's a little dark but there's enough info shown to see where you are.

              Comment


              • #8
                Do you have the "Display colors in sRGB" mode enabled?
                For me if the button is enabled the image looks exactly the same as the image in the viewport.
                V-Ray developer

                Comment


                • #9
                  confirm, looks the same now once that enabled. fantastic!

                  Comment


                  • #10
                    I remember a flag in the maya.env - maybe this helps you to get a better quality. Dunno if it's still valid:

                    AW_JPEG_Q_FACTOR = 100;

                    Comment


                    • #11
                      If you think the problem is in the compression you can experiment changing JPEG to PNG or BMP.
                      V-Ray developer

                      Comment

                      Working...
                      X