We run V-Ray for Rhino this way. The spawners can be configured as Windows services using Microsoft’s srvany utility. They run when invoked (below) but don’t display to a user on the machine. A Deadline Event script plug-in runs on job start up with this kind of pattern:
def OnJobStarted( self, job ):
RunProcess(“C:\Wolcmd.exe”,’ “” ‘+’ “” ‘+’ “” ‘+’ “9” ', “C:\”, -1)
etc. for the number of machines running the render slaves. “Wolcmd” is a Wake on LAN applet that takes command
line parameters and, hence, fits well with this Event plug-in approach. This lets machines sleep when not in use.
RunProcess( "C:\\PsService.exe", ' "\\\\<machinename>" '+' "restart" '+' "<renderservicename>" ', "C:\\" , -1)
etc. for the same machines. This uses Microsoft's PsTools suite to start the service that launches the spawners.
At the end of this you have the machines awake and the spawners running. The Deadline Slave machine then gets the job. We’ve configured the Deadline Rhino plug-in, which provides the commands to start Rhino rendering, with a couple of Rhinoscript parameters that tell the Slave where to find the material library, inject a dummy material into the file (which then allows V-Ray to search the entire library* for any missing materials that came from it), and call a .rvb file that allows us to lock in some V-Ray parameters (e.g. SetDistributedRenderingOn…). The Slave’s copy of V-Ray for Rhino is configured with the addresses of the servers running the spawners, so when the job hits it knows where to find them. When the job is finished, in the normal Deadline fashion, the rendered file is saved and Rhino closes. There’s then a custom “onJobFinished” Event plug-in that stops the spawners, e.g.:
def OnJobFinished( self, job ):
RunProcess( “C:\PsService.exe”,’ “\\” ‘+’ “stop” ‘+’ “” ', “c:\”, -1)
etc.
We’ve found that it’s good to start and stop the spawners with each job, in terms of quality, and this does it.
We have other bells and whistles for our purposes, taking advantage of some Deadline features, like sending out mail to the user when their job starts. With this we’ve put in a free screen scraper app that’s web-accessible (ScreenStream) and include the URL in this e-mail notification, so a user can click on that link and watch the live progress of their job. We configured some of the Deadline scripts so the user can choose to run either Rhino 4 (V-Ray 1.029) or Rhino 5 (V-Ray 1.5) and the appropriate spawners are started. Deadline’s quite flexible for this and, combined with some of these other third-party tools, can let you manage the process without intervention.