Announcement

Collapse
No announcement yet.

Cmd line flags for region off

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

  • Cmd line flags for region off

    Hi
    Does anyone know of a cmd line flag you can use to force Vray frame buffer to render the complete image?
    I've had the situation that when i last closed Maya and VFB i had the render region checked on! this meant that when i ran my cmd batch script i only got a small square rendered.

    Hence the need to stop this happening again is there a flag to force it to do the whole frame?

    any help please

    cheers

  • #2
    Yes, that was implemented in mid-October, you can use "-region=none" to disable the region set in the vrscene file.
    Not sure how recent is the build you using, you might need an update.
    V-Ray for Maya developer

    Comment


    • #3
      great thanks for that

      Comment


      • #4
        that flag is for vray standalone. Is there a flag for maya batch, i.e. "render.exe -r vray"? I would like/need a flag to turn region off as well as the info stamp on the bottom of the image.

        Thanks,

        -ctj
        http://www.a52.com

        Comment


        • #5
          Have you tried the -reg flag (just specify the full image size)?

          For the stamp, you can use a pre-render script that modifies the respective vraySettings node attribute directly.

          Best regards,
          Vlado
          I only act like I know everything, Rogers.

          Comment


          • #6
            Vlad,

            I did try the -reg flag, but when the render region active, it just kicked out a blank frame. The solution I came up with was a pre-render script that turns the VFB off:

            Render.exe -r vray -s 1 -e 1 -b 1 -preRender "setAttr \"vraySettings.vfbOn\" 0;" maya\scenes\vrayRegionTest.mb

            Solves both render region and info stamp issues.

            I'm going to look more into the vraySettings attributes to get finer control. Thank you.

            -ctj
            http://www.a52.com

            Comment


            • #7
              int $RRtest[] = `getAttr vraySettings.vfbSA`; //attempt to get the vray VFB render region setting
              if (($RRtest[10] != 17473)) { //heaven help us.
              print " You appear to have vray VFB render region set.\n" ;
              }

              this is pretty messy. i can write to that Int32Array array but its useless because i don't understand how its resaved with the file. even though i put the correct settings into that attribute, when i save the file they are overwritten with the ones that specify the render region will be on.

              is there anyway we can get an easy fix for this in the vraySettings node? if necessary i will use -preRender "setAttr \"vraySettings.vfbOn\" 0;" dynamically only on the farm machine.

              any more thoughts on this?

              doug

              EDIT:
              yea this check doesn't hold up across multiple scenes.
              oh well. thought i was onto something.
              Last edited by dougWilkinson; 26-06-2011, 05:57 PM.
              --=============--
              -DW
              -buck.co
              --=============--

              Comment


              • #8
                Hi there,

                this whole render region issue is worrying me since a long time now, because if you specify any kind of FilmOffset in your camera and the render via standalone with region=none flag then your filmOffset is not taken into account anymore....this is especially worse when you have a stereoRig which relies on filmOffset....hope this will be fixed some day

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

                Comment


                • #9
                  Originally posted by ultrasonic View Post
                  this whole render region issue is worrying me since a long time now, because if you specify any kind of FilmOffset in your camera and the render via standalone with region=none flag then your filmOffset is not taken into account anymore....this is especially worse when you have a stereoRig which relies on filmOffset....hope this will be fixed some day
                  Yep, working on it - this one is an easy fix.

                  Best regards,
                  Vlado
                  I only act like I know everything, Rogers.

                  Comment


                  • #10
                    I know this is an old thread ...but I was just wondering if it's at all possible to modify the vraySettings.vfbSA node somehow and force it to reset it to standard values...?

                    This is for V-Ray 2.0 and with the old VFB which is showing during batch rendering.
                    Best Regards,
                    Fredrik

                    Comment


                    • #11
                      Yes, see here: http://www.chaosgroup.com/forums/vbu...-the-V-Ray-VFB

                      Best regards,
                      Vlado
                      I only act like I know everything, Rogers.

                      Comment


                      • #12
                        This is what I'm currently doing to automatically disable region for V-Ray 2.00.04 jobs, initiated as pre-render MEL. However I'd like to identify which value(s) enables the sRGB button in the VFB. Anyone know?

                        Code:
                        if (`getAttr "defaultRenderGlobals.currentRenderer"` == "vray") {
                        	string $vrayVersion = (`pluginInfo -query -version "vrayformaya"`);
                        	if ($vrayVersion == "2.00.04") {
                        		int $posX = 310;
                        		int $posY = 200;
                        		int $width = 1920/1.5;
                        		int $height = 1080/1.5;
                        
                        		// Set the VFB matrix values
                        		setAttr vraySettings.vfbSA -type "Int32Array" 119 472 5 $posX $posY $width $height
                        		0 0 0 0 17409 1 0 0 0 0 0 404
                        		1 1 1 0 0 0 0 1 0 5 0 1065353216
                        		1 1 2 1065353216 1065353216 1065353216 1065353216 1 0 5 0 0
                        		0 0 1 0 5 0 1065353216 1 137531 65536 1 1313131313
                        		65536 944879383 0 -525502228 1065353216 1621981420 1034147594 1053609164 1065353216 2 0 0
                        		-1097805629 -1097805629 1049678019 1049678019 0 2 1065353216 1065353216 -1097805629 -1097805629 1049678019 1049678019
                        		0 2 1 2 -1 0 0 0 1869111636 24941 16952784 0
                        		864954400 0 1125564681 0 1125590192 0 868800996 0 1084177544 0 0 0
                        		0 0 1 0 0 0 373675504 0 1125564681 16777215 0 70
                        		1 32 0 0 0;
                        
                        	}
                        }
                        Best Regards,
                        Fredrik

                        Comment


                        • #13
                          So, in the code in my post above, the VFB opens with default values. With the code below, the sRGB button is active:

                          We run this as a pre render MEL script on all batch renders now, so that we will secure having region rendering inactivated as well as the color curves/exposure correction buttons inactive. Since we find the batch mode VFB fantastic in terms of quickly being able to see if anything is wrong with an ongoing render (and pray for this feature to some day come back in V-Ray 2.3+), the sRGB button is activated. Also, the size of the VFB window is quite roughly tweaked to fit a 1920x1200 monitor at all times.

                          The script goes through each renderable layer and identifies whether V-Ray of version 2.00.04 is the current renderer or not. It will not try to do anything with the VFB unless these criteria are true.

                          Code:
                          // Traverse through render layers
                          for ($layer in `ls -type "renderLayer"`){
                          	// Find the ones which are renderable
                          	if ((`getAttr ($layer+".renderable")` == 1)){
                          		string $buffer[] ;  
                          		$buffer = stringToStringArray($layer, ":");
                          		// Don't count renderlayers from references
                          		if(size($buffer) < 2){
                          			// Step through each render layer (needs selecting)
                          			editRenderLayerGlobals -currentRenderLayer $layer;
                          
                          			// If we find a render layer of type "vray" and of version "2.00.04", then reset the VFB and enable sRGB correction
                          			if (`getAttr "defaultRenderGlobals.currentRenderer"` == "vray") {
                          				string $vrayVersion = (`pluginInfo -query -version "vrayformaya"`);
                          				if ($vrayVersion == "2.00.04") {
                          
                          					// VFB window position
                          					int $posX = 310;
                          					int $posY = 20;
                          
                          					// VFB window size (adjusted for a 1920x1200 monitor)
                          					int $width = int(`getAttr "defaultResolution.width"`);
                          					int $height = int(`getAttr "defaultResolution.height"`);
                          					if ($width >= 1920) {
                          						$width = 1870;
                          						$posX = 50;
                          					}else {
                          						$width = $width/1.5;
                          					}
                          					
                          					if ($height >= 1200) {
                          						$height = 1150;
                          						$posY = 0;
                          					}else {
                          						$height = $height/1.5;
                          					}
                          
                          					// Set the VFB matrix values
                          					setAttr vraySettings.vfbSA -type "Int32Array" 119 472 5 $posX $posY $width $height
                          					309 316 309 0 17473 1 0 0 0 0 0 427 // Sets sRGB on. Default is "0 0 0 0 17409 1 0 0 0 0 0 404"
                          					1 1 1 0 0 0 0 1 0 5 0 1065353216
                          					1 1 2 1065353216 1065353216 1065353216 1065353216 1 0 5 0 0
                          					0 0 1 0 5 0 1065353216 1 137531 65536 1 1313131313
                          					65536 944879383 0 -525502228 1065353216 1621981420 1034147594 1053609164 1065353216 2 0 0
                          					-1097805629 -1097805629 1049678019 1049678019 0 2 1065353216 1065353216 -1097805629 -1097805629 1049678019 1049678019
                          					0 2 1 2 -1 0 0 0 1869111636 24941 16952784 0
                          					864954400 0 1125564681 0 1125590192 0 868800996 0 1084177544 0 0 0
                          					0 0 1 0 0 0 373675504 0 1125564681 16777215 0 70
                          					1 32 0 0 0;
                          
                          				}
                          			}
                          		}
                          	}
                          }
                          Last edited by Fredrik Averpil; 14-12-2012, 03:42 AM.
                          Best Regards,
                          Fredrik

                          Comment


                          • #14
                            Originally posted by Fredrik Averpil View Post
                            and pray for this feature to some day come back in V-Ray 2.3+
                            Until Maya remains Qt, we can't do it.

                            Best regards,
                            Vlado
                            I only act like I know everything, Rogers.

                            Comment

                            Working...
                            X