Announcement

Collapse
No announcement yet.

OSLTex and Distributed Rendering

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

  • OSLTex and Distributed Rendering

    Hello,

    It seems that any OSL Texture will not render with distributed rendering. My local / host machine renders OSL textures just fine, but any render node on the network ignores the VrayOSLTex node.
    Transfer missing assets is enabled.
    Error happens on Vray 3.6 for Maya 2016sp6, 2017, and 2018. Local / Host machine is running OS X Sierra, render nodes are running Linux CentOS.

    Any help would be greatly appreciated.

    Thanks

  • #2
    It works fine for me with 3.6. Could you post the logs from the DR slave so we can check for errors?
    Alex Yolov
    Product Manager
    V-Ray for Maya, Chaos Player
    www.chaos.com

    Comment


    • #3
      Hi Yolov,

      Thanks for the reply. Enclosed is the log file.
      I noticed an error towards the bottom of the log, (don't have a line #, sorry). It states:
      [compileOSLShaderToOSO] Could not find stdosl.h. Please check VRAY_OSL_PATH_MAYA2016_x64

      We checked the DR slave and the file does exist
      /usr/ChaosGroup/V-Ray/Maya2016/3.6/opensl/stdosl.h

      Also enclosed are 2 renders, 1 rendered locally, (OSL flakes rendered correctly in reflection), 1 with distributed rendering, (OSL flakes absent from render).
      In the DR render, all of the distributed buckets render incorrectly, however there a few isolated buckets rendered locally that produce a correct result.

      Many Thanks
      vraysl_log_20207.txt.zip
      Click image for larger version

Name:	OSL_Distributed.jpg
Views:	271
Size:	124.6 KB
ID:	983836Click image for larger version

Name:	OSL_local.jpg
Views:	238
Size:	142.5 KB
ID:	983837

      Comment


      • #4
        The log says
        Code:
        OSL include variable is VRAY_OSL_PATH_MAYA2016_x64=(null)
        You will need to set that environment variable to /usr/ChaosGroup/V-Ray/Maya2016/3.6/opensl/stdosl.h on the slave. We will see if we can handle this automatically in the future.

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

        Comment


        • #5
          Thanks Vlado & Yolov,

          How exactly do you set the environment variable (in a Linux environment)? Is there a .txt file to edit? Or is there a specific command to use?

          Comment


          • #6
            Are you using the installer to install vray or is this an installation from a .zip file (where everything's unpacked from a zip to an arbitrary location and then the environment is set up manually)? Judging by the path of your vray install, I'm guessing it's a zip install. In this case, it matters how you start your slaves. Ideally, you would use the provided shell script "vrayslave" in the zip archive /vray/bin/ and you can edit it in a text editor and add the variable there: export VRAY_OSL_PATH_MAYA2016_x64= /usr/ChaosGroup/V-Ray/Maya2016/3.6/opensl/ .
            Let me know about the install type that you're using so I can give you more details.
            Alex Yolov
            Product Manager
            V-Ray for Maya, Chaos Player
            www.chaos.com

            Comment


            • #7
              It was not installed via zip file. It was installed using the silent install method using a config.xml file and the render slave is running as a service.

              Comment


              • #8
                It may happen when you register and start the slave using sudo/su. Can you try to register it using sudo/su and then start it with the user you installed vray with?


                Stop the service using su/sudo:
                Code:
                [ralenekov@localhost]$ sudo /usr/ChaosGroup/V-Ray/Maya2016/3.6/bin/stopVRaySlaveDaemon
                Stopping V-Ray for Maya render server (PID 9953)...done

                Open another terminal and make sure it gets the current env variables on login:
                Code:
                [ralenekov@localhost]$ export | grep MAYA2016
                declare -x VRAY_FOR_MAYA2016_MAIN_x64="/usr/autodesk/maya2016/vray"
                declare -x VRAY_FOR_MAYA2016_PLUGINS_x64="/usr/autodesk/maya2016/vray/vrayplugins"
                declare -x VRAY_OSL_PATH_MAYA2016_x64="/usr/ChaosGroup/V-Ray/Maya2016/3.6/opensl"
                declare -x VRAY_TOOLS_MAYA2016_x64="/usr/ChaosGroup/V-Ray/Maya2016/3.6/bin"

                Start the service as user:
                Code:
                [ralenekov@localhost]$ /usr/ChaosGroup/V-Ray/Maya2016/3.6/bin/startVRaySlaveDaemon
                Starting V-Ray for Maya render server...PID 9974
                done

                Get the env variables for the service process and they will should look like this:
                Code:
                [ralenekov@localhost]$ xargs --null --max-args=1 < /proc/9974/environ | grep MAYA2016
                VRAY_FOR_MAYA2016_PLUGINS_x64=/usr/autodesk/maya2016/vray/vrayplugins
                VRAY_TOOLS_MAYA2016_x64=/usr/ChaosGroup/V-Ray/Maya2016/3.6/bin
                VRAY_FOR_MAYA2016_MAIN_x64=/usr/autodesk/maya2016/vray
                VRAY_OSL_PATH_MAYA2016_x64=/usr/ChaosGroup/V-Ray/Maya2016/3.6/opensl

                Comment


                • #9
                  [render@centos-render-01 ~]$ export | grep MAYA2016

                  declare -x VRAY_FOR_MAYA2016_MAIN_x64="/usr/ChaosGroup/V-Ray/Maya2016/3.6"
                  declare -x VRAY_FOR_MAYA2016_PLUGINS_x64="/usr/ChaosGroup/V-Ray/Maya2016/3.6/vrayplugins"
                  declare -x VRAY_OSL_PATH_MAYA2016_x64="/usr/ChaosGroup/V-Ray/Maya2016/3.6/opensl"
                  declare -x VRAY_TOOLS_MAYA2016_x64=?/usr/ChaosGroup/V-Ray/Maya2016/3.6/bin?


                  Instructions say to start the service as the user, and not as sudo. I can?t start the service as a regular user, as it kicks an error.

                  [render@centos-render-01 ~]$ /usr/ChaosGroup/V-Ray/Maya2016/3.6/bin/startVRaySlaveDaemon
                  Starting V-Ray for Maya render server...head: cannot open ?/tmp/vraymayaslave2016/pid? for reading: No such file or directory
                  PID
                  FAILED


                  I have to escalate privileges with sudo for the service to start up.

                  [render@centos-render-01 ~]$ sudo /usr/ChaosGroup/V-Ray/Maya2016/3.6/bin/startVRaySlaveDaemon
                  [sudo] password for render:
                  Starting V-Ray for Maya render server?PID
                  13563
                  done


                  Running this command even with sudo gives a permission error.


                  [render@centos-render-01 ~]$ sudo xargs --null --max-args=1 < /proc/13563/environ | grep MAYA2016
                  -bash: /proc/13563/environ: Permission denied



                  Running that command as root does not create an error, but returns nothing.


                  [render@centos-render-01 ~]$ sudo su
                  [root@centos-render-01 render]# xargs --null --max-args=1 < /proc/13563/environ | grep MAYA2016
                  [root@centos-render-01 render]#






                  Comment


                  • #10
                    Can you try these commands as user:
                    Code:
                    $ sudo /usr/ChaosGroup/V-Ray/Maya2016/3.6/bin/stopVRaySlaveDaemon
                    $ sudo rm -rf /tmp/vraymayaslave2016/
                    $ /usr/ChaosGroup/V-Ray/Maya2016/3.6/bin/startVRaySlaveDaemon
                    $ xargs --null --max-args=1 < /proc/slavepid/environ | grep MAYA2016

                    Comment


                    • #11
                      Hi,

                      Success! Starting the VraySlaveDaemon under the user name rather than the root worked:

                      [render@centos-render-01 ~]$ sudo /usr/ChaosGroup/V-Ray/Maya2016/3.6/bin/stopVRaySlaveDaemon
                      [sudo] password for render:
                      Stopping V-Ray for Maya render server (PID 1492)...done
                      [render@centos-render-01 ~]$ sudo rm -rf /tmp/vraymayaslave2016/
                      [render@centos-render-01 ~]$ /usr/ChaosGroup/V-Ray/Maya2016/3.6/bin/startVRaySlaveDaemon
                      Starting V-Ray for Maya render server...PID 30454
                      done
                      [render@centos-render-01 ~]$ xargs --null --max-args=1 < /proc/30454/environ | grep MAYA2016
                      VRAY_FOR_MAYA2016_PLUGINS_x64=/usr/ChaosGroup/V-Ray/Maya2016/3.6/vrayplugins
                      VRAY_TOOLS_MAYA2016_x64=/usr/ChaosGroup/V-Ray/Maya2016/3.6/bin
                      VRAY_FOR_MAYA2016_MAIN_x64=/usr/ChaosGroup/V-Ray/Maya2016/3.6
                      VRAY_OSL_PATH_MAYA2016_x64=/usr/ChaosGroup/V-Ray/Maya2016/3.6/opensl
                      [render@centos-render-01 ~]$

                      So how do we automatically launch the VraySlaveDaemon on reboot as the user, (rather than stopping the service and restarting as user)?

                      Many Thanks!

                      Comment


                      • #12
                        The problem is that after a fresh installation the root account doesn't get the env variables until restarted. Our devs stated that this will be fixed in future builds and the slave will run using a dedicated user account.

                        There are different approaches to solving it with the current builds:
                        1. Install V-Ray, register the service using sudo, start the service as user (since it has the env set correctly).
                        2. Install V-Ray, register the service using sudo and reboot the machine.
                        3. Install V-Ray, register the service using sudo, source the env variables and run the service using sudo. For example:
                        Code:
                        sudo /usr/ChaosGroup/V-Ray/Maya2016/3.6/bin/registerVRaySlaveDaemon
                        sudo bash -c 'source /etc/profile.d/chaos.sh; /usr/ChaosGroup/V-Ray/Maya2016/3.6/bin/startVRaySlaveDaemon'
                        sudo bash -c 'xargs --null --max-args=1 < /proc/mayaslavepid/environ | grep MAYA2016'
                        Etc.

                        When changing permissions always check the /tmp/vraymayaslave* directories for permission conflicts (or delete them).

                        In your case a reboot of the OS should be enough. The service should auto start as root, the env variables should be set automatically and you should be able to check them as root and continue to use the render slave without problems.

                        Comment

                        Working...
                        X