Announcement

Collapse
No announcement yet.

V-Ray DR Spawner command line options

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

  • V-Ray DR Spawner command line options

    Hello,

    We often run different versions of Max, especially when testing the next version before migrating over, and as such we often run multiple versions of the V-Ray DR Spawner simultaneously. We were able to solve issues with this by running each spawner on a different port. The options we currently use for the spawner look something like this (with each Max version running on a different port);

    "C:\Program Files\Autodesk\3ds Max 2017\vrayspawner2017.exe" -TempDir="%TEMP%\vray2017temp" -port=20217

    We found this info in a forum post, and I was wondering, is it possible to please document all the options for the V-Ray DR Spawner? I checked the documentation here:

    https://docs.chaosgroup.com/display/...andlineoptions

    And it only refers to NUMA options, none of the other options are listed.

    The reason I ask is, is it seems that when running multiple spawners, it is only generating a log file for whichever spawner loads first. Is there an option to specify the location of the log file? It would make it much easier to find problems when loading multiple spawners.

    Any help with this would be greatly appreciated.

    Tristan

  • #2
    Hi Tristan,

    There is no option to show the vrayspawner.exe arguments, it may be a good idea to have one, so I'll add a note about it. But even if there was there is no option to redirect the log through the spawner. There is however an environment variable to override the system log path in V-Ray Next "set VRAY_SYSTEM_LOG_FILE=<logfile_path>". If that works for you generally there would be problem that you would have to have separate environments for each spawned 3ds Max.

    Best regards,
    Alexander
    Alexander Kazandzhiev
    V-Ray for 3ds Max developer

    Comment


    • #3
      Hi Alexander,

      Thanks so much for getting back to me.

      Either an option to show the vrayspawner.exe arguments, or to have it all documented at https://docs.chaosgroup.com (or both!) would be great if possible. The options for '-TempDir' and '-port' I only found by chance somewhere in the forum, and were essential for getting multiple spawners to work reliably.

      As for the log file, perhaps we can run the spawner with a batch file that sets the VRAY_SYSTEM_LOG_FILE and then loads the spawner. I think this should be fairly easy enough for us to implement.

      Thanks again for your help.

      kind regards,
      Tristan.

      Comment


      • #4
        Hi Tristan,
        Yup I'll see it to improving the spawner documentation.

        Best regards,
        Alexander
        Alexander Kazandzhiev
        V-Ray for 3ds Max developer

        Comment


        • #5
          Hi Alexander,

          Thanks so much for that, much appreciated.

          I did some testing, and unfortunately it seems it is not so easy to set the environment variable for each spawner. I was testing the technique described here;

          https://stackoverflow.com/questions/...cut-in-windows

          However, as someone notes in a comment, this approach no longer works in Windows 10 Version 1809 unfortunately.

          Essentially, a basic batch file with;

          echo off
          set VRAY_SYSTEM_LOG_FILE=%TEMP%\vrayspawner2020.log
          start "vrayspawner2020" "C:\Program Files\Autodesk\3ds Max 2020\vrayspawner2020.exe" -TempDir="%TEMP%\vray2020temp" -port=20220

          Doesn't work as hoped, as the environment variable isn't passed to the spawner.

          If anyone has any ideas about how to make this work, it would be much appreciated!

          Comment


          • #6
            I did some more testing, and VRAY_SYSTEM_LOG_FILE seems to have no effect. It seems to always be ignored unfortunately.

            I performed the following commands (omitting the START command so that the spawner would be executed within the same environment)

            set VRAY_SYSTEM_LOG_FILE=%TEMP%\vrayspawner2020.log
            "C:\Program Files\Autodesk\3ds Max 2020\vrayspawner2020.exe" -TempDir="%TEMP%\vray2020temp" -port=20220

            Unfortunately it still uses the system default of %TEMP%




            I also checked in the default environment, I wasn't able to find a system environment variable named VRAY_SYSTEM_LOG_FILE but perhaps I'm not looking in the right place?

            Opening a command prompt and running

            SET VRAY

            I see a lot of VRAY variables but none named VRAY_SYSTEM_LOG_FILE

            Or does that variable only exist when you want to try to override the default location?

            Comment


            • #7
              Hmm start should work fine as it should inherit the current environment, at least up till now.
              If you perform "set vray" manually in a new console it won't show the environment variables from another console or that have been set in the scope of a bat file.
              I am using currently Windows 10 Version 1809 (Build 17763.404) and it seems to be working properly. Can you try the attached cmd file, it should be placed in the "Program Files/Autodesk/3ds Max.../" folder, unless edited? It should start two instances of vrayspawner2020 on ports 12345/12346 with "%temp%/vraylog1.txt"/"%temp%/vraylog2.txt".

              An easy way to check if the environment is set properly would be to run process explorer (https://docs.microsoft.com/en-us/sys...ocess-explorer) if you have the permissions and check for the variable in the Environment tab.

              Can you tell me the Windows version by your side, reported by "winver" command?

              Best regards,
              Alexander
              Attached Files
              Alexander Kazandzhiev
              V-Ray for 3ds Max developer

              Comment


              • #8
                Hi Alexander,

                I ran your startLog.cmd as instructed, and only the VRSpawner.log in %TEMP% is generated. There is no vraylog1.txt and vraylog2.txt generated.

                The test machine I am currently running on is actually version 1803 (OS Build 17134.706), according to winver.

                Checking with Process Explorer, I can see that the environment variables are in fact correctly passed to the Spawner, so it actually seems in my case that the Spawner is ignoring this variable.

                Can you confirm that in your test the actual log files were generated?

                Click image for larger version

Name:	Screen Shot 2019-04-23 at 10.39.19 am.png
Views:	628
Size:	70.8 KB
ID:	1033809

                Comment


                • #9
                  Yes, they are created and data is written. Which V-Ray version are you using? It should be available from Build 3.60.02 (official) (12 July 2017).

                  Best regards,
                  Alexander
                  Alexander Kazandzhiev
                  V-Ray for 3ds Max developer

                  Comment


                  • #10
                    On this test machine the V-Ray version is 4.10.03

                    Comment

                    Working...
                    X