Announcement

Collapse
No announcement yet.

command line render flags and render layer

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

  • command line render flags and render layer

    hi,
    ok I'd like to do a simple batch render using terminal and .bat file which works fine using the string below :-

    render -r vray -x 1280 -y 720 -s 1 -e 442 -verb "S:/projects_current_Drv/my_Project/scenes/shed_11.mb"

    I would however like to render a particular render layers so looking at Maya help pages there's a render flag for render layers :

    -rl <boolean:name>

    so i've tried a variety of versions to get this to work but so far no joy can anyone advise please ?

    so far tried:

    render -r vray -x 1280 -y 720 -rl true:ground_RL -s 1 -e 442 -verb "S:/projects_current_Drv/my_Project/scenes/shed_11.mb"
    render -r vray -x 1280 -y 720 -rl True:ground_RL -s 1 -e 442 -verb "S:/projects_current_Drv/my_Project/scenes/shed_11.mb"
    render -r vray -x 1280 -y 720 -rl 1:ground_RL -s 1 -e 442 -verb "S:/projects_current_Drv/my_Project_/scenes/shed_11.mb"
    render -r vray -x 1280 -y 720 -rl yes:ground_RL -s 1 -e 442 -verb "S:/projects_current_Drv/my_Project/scenes/shed_11.mb"

  • #2
    forgot to say :
    using win 10 workstation
    Maya 2016
    vray 3.3

    thanks

    Comment


    • #3
      Are you sure the separator is ":" and not "|"? On linux the help of the Render executable states that the separator should be "|".
      V-Ray developer

      Comment


      • #4
        hi,
        thanks for the suggestion , gave it a go and it seemed to start working but then said completed render almost immediately( the render typically takes 6 mins to render a frame ) with a message ending in "maya exited with status 0" , double checked the name of the render layer and its correct in the string "ground_RL"

        just get the feeling that the -rl is redundant or something ...

        regards
        ignuf

        Comment


        • #5
          Can you check what the mayaRenderLog.txt says. It's usually in the default user's documents > maya folder.
          Alex Yolov
          Product Manager
          V-Ray for Maya, Chaos Player
          www.chaos.com

          Comment


          • #6
            hi Alex,
            it seems to be listing the last successful render i made on the same project, nothing in there about the attempted render using the -rl flag

            kind regards
            Guy

            Comment


            • #7
              Can you delete the log file and render again - Maya will create a new one.
              In case you can share the scene - please do, we could take a look and see what's wrong.
              It would also help to know you Maya, VRay and OS versions.
              Alex Yolov
              Product Manager
              V-Ray for Maya, Chaos Player
              www.chaos.com

              Comment


              • #8
                hi Alex,
                i've created a test scene with a load of cubes in it with a std vrMaterial applied and a dome light. there's two render layers, one called "test_useThis_RL" and another called "test_dontUse_RL"

                I did a test render inside of maya to make sure the scene rendered , which went through no probs,

                ive got a .bat file called batchRender_test_RL.bat which i created in notepad (win10)

                the string in side the .bat file is below , i used a pipe symbol copied from online "¦" and one using the keyboard "|",

                //--------------- test------------

                render -r vray -x 1280 -y 720 -rl true¦test_useThis_RL -s 20 -e 30 -verb "S:/projects_current_trboDrv/Old_shed_Project_trboDrv/scenes/test_rlRender_001.mb"

                render -r vray -x 1280 -y 720 -rl true|test_useThis_RL -s 20 -e 30 -verb "S:/projects_current_trboDrv/Old_shed_Project_trboDrv/scenes/test_rlRender_001.mb"



                i re-named the maya render log and tried to render using the . bat file but no new render log was created. but ive copied the output from the terminal :-




                ===============================================
                V-Ray Standalone, version 3.30.01 for x64
                Copyright (C) 2000-2015 Chaos Group Ltd. All rights reserved.
                Use -credits option for additional third-party copyright notices.

                Build from Feb 25 2016, 22:00:38
                Compiled with Intel C++ compiler, version 14
                Operating system is Microsoft(tm) Windows(tm), version 6.2,

                V-Ray core version is 3.25.01
                ===============================================

                ---- took out the instructions bit to cut down on the amount of text-------

                C:\Program Files\Autodesk\Maya2014\vray\bin>S:\projects_curre nt_trboDrv\Old_shed_Project_trboDrv\batchRender_te st_RL.bat

                C:\Program Files\Autodesk\Maya2014\vray\bin>render -r vray -x 1280 -y 720 -rl trueªtest_useThis_RL -s 20 -e 30 -verb "S:/projects_current_trboDrv/Old_shed_Project_trboDrv/scenes/test_rlRender_001.mb"

                Locale is: "English_United Kingdom.1252(0x0809) (LCID:0x0809)"
                // Using temp file "C:\Users\user\AppData\Local\Temp\ASTCBBB716540.tm p"

                ////////////////////////////////////////////////////////////////////////////
                // Starting Mel program

                proc renderIt(string $name) {

                string $opt=""; string $rl=""; string $rp=""; float $resize=-1.; vrayRegisterRenderer(); vrayCreateVRaySettingsNode(); select vraySettings;; // Before all flags

                setAttr "vraySettings.width" 1280;; // For flag -x

                setAttr "vraySettings.height" 720;; // For flag -y

                $rl="trueªtest_useThis_RL"; // For flag -rl

                removeRenderLayerAdjustmentAndUnlock defaultRenderGlobals.animation; setAttr defaultRenderGlobals.animation 1; removeRenderLayerAdjustmentAndUnlock defaultRenderGlobals.startFrame; setAttr defaultRenderGlobals.startFrame 20; // For flag -s

                removeRenderLayerAdjustmentAndUnlock defaultRenderGlobals.animation; setAttr defaultRenderGlobals.animation 1; removeRenderLayerAdjustmentAndUnlock defaultRenderGlobals.endFrame; setAttr defaultRenderGlobals.endFrame 30; // For flag -e

                setMayaSoftwareLayers($rl, $rp); setImageSizePercent($resize); mayaBatchRenderProcedure(0, "", "", "vray", $opt);; // After all flags

                }

                //
                // Main part
                //

                string $sceneName = "S:/projects_current_trboDrv/Old_shed_Project_trboDrv/scenes/test_rlRender_001.mb";

                int $checkScene = `file -q -ex`;
                if ($checkScene!=1) {
                quit -abort -force -exitCode 209;
                error ("Cannot load scene \""+$sceneName+"\". Please check the scene name.");
                } else if (catch(`renderIt($sceneName)`)) {
                quit -abort -force -exitCode 210;
                error ("Scene "+$sceneName+" failed to render.\n");
                } else {
                print ("Scene "+$sceneName+" completed.\n");
                quit -abort -force -exitCode 0; // Exit Maya
                }

                // Ending Mel program
                // Maya file is "S:/projects_current_trboDrv/Old_shed_Project_trboDrv/scenes/test_rlRender_001.mb"

                Starting "C:\Program Files\Autodesk\Maya2016\bin\mayabatch.exe"
                Arg[1]="-batch"
                Arg[2]="-file"
                Arg[3]="S:/projects_current_trboDrv/Old_shed_Project_trboDrv/scenes/test_rlRender_001.mb"
                Arg[4]="-script"
                Arg[5]="C:\Users\user\AppData\Local\Temp\ASTCBBB716540.t mp"
                Error: file: C:/ProgramData/Autodesk/ApplicationPlugins/MayaBonusTools/Contents/scripts-2016/bonusToolsMenu.mel line 1913: UI commands can't be run in batch mode.
                [2016/May/19|17:08:57] V-Ray: V-Ray for Maya version 3.30.02 from Apr 14 2016, 20:35:46
                [2016/May/19|17:08:57] V-Ray: V-Ray core version is 3.25.01
                Initializing V-Ray for Maya

                [2016/May/19|17:08:57] V-Ray: Loading plugins from "C:\Program Files\Autodesk\Maya2016\vray/vrayplugins/vray_*.dll"
                [2016/May/19|17:08:59] V-Ray: 74 plugin(s) loaded successfully
                [2016/May/19|17:08:59] V-Ray: Finished loading plugins.
                [2016/May/19|17:08:59] V-Ray: Registered dynamic node vrayMultiProjection (id: 1115335/0x001104C7)
                [2016/May/19|17:08:59] V-Ray: Registered dynamic node VRayCurvature (id: 1115347/0x001104D3)
                [2016/May/19|17:08:59] V-Ray: Registered dynamic node VRayTriplanar (id: 1115362/0x001104E2)
                [2016/May/19|17:08:59] V-Ray: Registered dynamic node VRaySkinMtl (id: 1115348/0x001104D4)
                [2016/May/19|17:08:59] V-Ray: Registered dynamic node VRayPointParticleMtl (id: 1115353/0x001104D9)
                [2016/May/19|17:08:59] V-Ray: Registered dynamic node VRayStochasticFlakesMtl (id: 1115359/0x001104DF)
                Error: line 1: line 1: Cannot find procedure "shaderBallRendererMenuUpdate".
                File read in 3.3 seconds.
                Result: S:/projects_current_trboDrv/Old_shed_Project_trboDrv/scenes/test_rlRender_001.mb
                Scene S:/projects_current_trboDrv/Old_shed_Project_trboDrv/scenes/test_rlRender_001.mb completed.
                // Maya exited with status 0

                C:\Program Files\Autodesk\Maya2014\vray\bin>render -r vray -x 1280 -y 720 -rl true | test_useThis_RL -s 20 -e 30 -verb "S:/projects_current_trboDrv/Old_shed_Project_trboDrv/scenes/test_rlRender_001.mb"
                'test_useThis_RL' is not recognized as an internal or external command,
                operable program or batch file.

                C:\Program Files\Autodesk\Maya2014\vray\bin>

                C:\Program Files\Autodesk\Maya2014\vray\bin>

                Comment


                • #9
                  That's a bit odd, to say the least. Can you send us the scene - the test one with cubes you made for the last example?
                  Also, can you try rendering through a command prompt by inputting directly the command-line? Maube try skipping the -verb flag (not that it has anything to , but who knows).
                  Alex Yolov
                  Product Manager
                  V-Ray for Maya, Chaos Player
                  www.chaos.com

                  Comment


                  • #10
                    hi Alex,
                    tried just entering the string into a terminal it started but then said completed almost straight away .

                    how/where do i upload the scene file ?

                    regards
                    ignuf

                    Comment


                    • #11
                      If it's less than 10MB you can upload it directly here. Another option would be to upload it on a shareable place like dropbox, google drive or similar and then send us a link. A third option is to provide you with ftp access to upload it directly to us.
                      Alex Yolov
                      Product Manager
                      V-Ray for Maya, Chaos Player
                      www.chaos.com

                      Comment


                      • #12
                        hi Alex, sorry for the delay getting back !
                        please see attached link to google drive
                        regareds
                        ignuf

                        https://drive.google.com/open?id=0B9...zFJd2FINjF1cVU

                        Comment

                        Working...
                        X