© Square Enix © Goodbye Kansas


You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

This page offers a tutorial on how to set up a render farm using HQueue and V-Ray

 

Overview


 

In this step-by-step walk-through, we show the process of setting up an HQueue Server/Client configuration for render job submission using a CentOS 7 machine as both the job manager and the render client.

A Windows 10 machine is used as an artist workstation submitting the render jobs.

The main purpose of this tutorial is to cover common issues you may stumble upon while setting up V-Ray for Houdini to work with HQueue.

Setting up the HQueue Repository on a Shared Network folder on a Windows machine


 

Please be aware that a negative drawback of using a Window share for the HQueue Repository is the necessity to install Houdini separately on each client machine.

When using a native Linux file system for the share, It is possible to only provide a single Houdini installation inside the HQueue Repository folder for all slaves to share.

The setup presented here is for educational purposes only.

The repository is the place where the HQueue Client machines look for files. All machines which submit jobs to the HQueue server should be able to access it. V-Ray for Houdini is also placed in the repository to ensure all HQueue Clients load the same V-Ray for Houdini build.

We use a Windows Shared folder for the main repository in this guide because it is easier to set up such that the files are visible from other Windows machines on the network. Feel free to set up the repository on a Linux machine if that is your preferred procedure.

Note that the repository itself and the HQueue Server can be set up on a completely separate machine, as is the case in this guide.

 

 

 


 

You may skip this section if you already have local network sharing set up at your location.

  1. Create a folder on the Windows machine that is going to store the main files repository for HQueue. In this example, the folder is called HQRepository.
  2. Right-click on the folder → PropertiesSharing tab.
  3. Press the Advanced Sharing button.
  4. Enable "Share this folder" so it is visible on the local network.
  5. Press the "Permissions" button to select the Users or Groups who can modify the contents of this shared folder.
  6. Select the Users who will be granted access.
  7. Set their permissions in the field below. Because the HQueue server and all clients will need both read and write access, in this example we've given full control to "Everyone".
  8. Press Apply and OK to close all windows.

 

 

Mounting the share on Linux


The steps in this section should be repeated for each Linux HQueue Client on the farm.

You can check if the shared folder can be accessed by the Linux machines using Samba.

In the file browser's address bar, type smb://x.x.x.x/HQRepository , where "x.x.x.x" is the local IP address of the machine hosting the shared folder.

 

 

 


 

You may need to install the cifs-utils package.

For the HQueue Server and Clients to access this folder, you need to mount it to a specific location.

Create a new HQRepository folder under /mnt on your Linux machines by calling:

sudo mkdir /mnt/HQRepository

Use the following command to mount the shared folder as /mnt/HQRepository

sudo mount -t cifs -o user=YOURUSER,password=YOURPASSWORD,uid=$(whoami) \\\\x.x.x.x\\HQRepository /mnt/HQRepository

where YOURUSER is the name of a Windows user with access rights to the share and YOURPASSWORD is the password of the user, if any.

x.x.x.x is the local IP address of the machine hosting the shared folder. This could also be the name of the machine, rather than the IP.

uid=$(whoami) is added for permission purposes. Houdini would not be able to write into this mounted folder if this is omitted because the owner would be root rather than the current user.

 

 

The step above only mounts the remote HQRepository folder for the current user session - it disappears on restart.

If you want the shared folder to be permanently mounted, you need to edit the /etc/fstab file.

Please search for "auto mount samba share fstab linux" for a guide on this process.

Installing HQueue Server on the Linux machine


 

Grab the Linux Houdini installer from SideFX and run it with sudo privilege. When prompted, disable all options but HQueue Server and start the installation.

During the installation process, a prompt asking if a shared location needs to be created appears - choose No. We have already taken care of this in the previous steps.

Once the installation is complete, open the /opt/hqueue/hqserver.ini file and edit:

  1. hqserver.sharedNetwork.mount.windows entry such that it points to the Windows mount point - this is the path used by Windows HQueue Clients.
  2. hqserver.sharedNetwork.mount.linux entry such that it points to the Linux mount point. In this example, /mnt/HQRepository.


Restart the HQueue Server to ensure the changes take effect. To do so, use the following commands:

cd /opt/hqueue/scripts – to go into the scripts folder.
sudo ./hqserverd restart – to restart the service.

 

 

 


 

Open a browser and navigate to localhost:5000. If everything went well, you should be able to see the window from the screenshot to the right.

 

 

 


 

Try doing the same on another machine in the same network.

In this example, the internal IP of the Linux HQueue Server machine is 10.0.0.105, so 10.0.0.105:5000 is written in the address bar.

If the HQueue window shows up, you're good to go.

If you can't connect from a remote machine, this is most likely a firewall issue. Ports 5000 and 5001 have to be opened.

 

 

 

Installing HQueue Client on the Linux Machine


 

Start the Linux Houdini installer on the client machine. Make sure not to run it with sudo.

Disable all options but the HQueue Client installation.

When prompted, specify the address and port of the HQueue server machine. E.g. 10.0.0.105:5000.

If you have already mounted the HQueueRepository folder, select NO when prompted for it by the setup.

The Client should now be visible in the HQueue window as seen in the image to the right.

 

 

Mounting the HQueue Repository on a Windows workstation


 

This step is the same when setting up a Windows farm on your network.

Before you submit jobs to the HQueue Server from your Windows workstation, you need to map the HQRepository shared folder to a Windows drive (e.g. H:\)

To do so:

  1. Open the File Browser and go to This PC.
  2. Press the Computer tab at the top and select "Map Network Drive".
  3. Choose a letter (e.g. H:) and point the "Folder" parameter to the shared HQRepository folder on the Windows host machine.
  4. If you required by your setup, enable the "Connect Using Different Credentials" option.

 

 

 

Setting up the V-Ray Renderer ROP for HQueue


 

To render the scene with HQeueue, a HQueue Renderer ROP should be created.

Either plug the V-Ray Renderer ROP directly into the HQueue Renderer input or specify it under the General tab → Output Driver.

In this example, the HQueue Server address is 10.0.0.105:5000 (where 5000 is the port number).

The Target HFS parameter is used to specify the Houdini installation folder for the Client machines. In this example, the local path for the Client is "/opt/hfs17.5.327". If the Clients were Windows machines with a default Houdini installation, the path would be "C:\Program Files\Side Effects Software\Houdini 17.5.327".

 Please recall that:

  1. The HQRepository folder is placed on a Windows partition
  2. The Windows partition is mounted on the Linux Client machines

Ideally, both the machine hosting the HQRepository and the Client machines will be running the same operating system (e.g. Linux). When that is the case, Houdini could be installed in the HQRepository folder once instead of locally for each and every Client machine.

 

 

 


 

As mentioned already, the Client machines need to know where to find Houdini. The same is true for V-Ray.

The V-Ray for Houdini folder extracted from the archive is renamed to vray_lin (for simplicity) and placed inside the HQRepository so all client machines load V-Ray from the same location.

 

 

 

 


 

When an HQueue job is sent to the HQ Server, the environment is wiped clean.

The location of the V-Ray files need to be specified so V-Ray is loaded before rendering on the Client machines is executed.

You could go about this in 2 ways:

  1. Set up the required environment variables in the houdini.env file located in the home directory of every Client machine. For more information on this approach, please check the Quick Start Guide.
  2. Set up the required environment variables on the HQueue Renderer ROP.

In this walk-through, we cover the second option.

Listed below are the required environment variables that need to be set up under the HQueue Renderer → Advanced tab → Environment.

Consider saving this setup as a Preset from the Gear icon on the HQueue Render ROP.

 

 

 


 

VFH_ROOT
/mnt/HQRepository/vray_lin

VRAY_APPSDK
`chs("var_value0")`/appsdk

VRAY_OSL_PATH
`chs("var_value0")`/appsdk/bin

VRAY_UI_DS_PATH
`chs("var_value0")`/ui

VFH_HOME
`chs("var_value0")`/vfh_home

VRAY_FOR_HOUDINI_AURA_LOADERS
`chs("var_value0")`/vfh_home/libs

VFH_PATH
`chs("var_value0")`/vfh_home/bin:`chs("var_value0")`/appsdk/bin:`chs("var_value0")`/vfh_home/libs

PATH
`chs("hq_hfs")`/bin:`chs("var_value0")`/vfh_home/bin:`chs("var_value0")`/appsdk/bin:`chs("var_value0")`/vfh_home/libs

HOUDINI_PATH
`chs("var_value0")`/vfh_home:&

LD_LIBRARY_PATH
`chs("hq_hfs")`/dsolib:`chs("var_value0")`/appsdk/bin:`chs("var_value0")`/vfh_home/libs:

HOUDINI13_VOLUME_COMPATIBILITY
1

HDF5_DISABLE_VERSION_CHECK
1

 


 

Save the hip file in the HQRepository folder and start a render.

You know the environment variables setup is correct and V-Ray is loaded if the following message appears in the Prepare Render Jobs entry of the log for the current job:

VFH [Info] * Build 3551ba6 from 26 Jul 2019 18:54

 

 

 


 

The default Render Current HIP File option expects the scene and all assets to be present in the HQRepository, with correct paths.

Alternatively, you may want to let Houdini take care of the project structure.

By default, setting the HQueue Renderer → General tab → Copy Project Files to Shared Folder and Render option only works with Mantra.

The following error appears if you attempt to Submit Job : "Invalid output path specified in output driver".

 Until the issue is resolved, a minor modification of a python file inside the Houdini installation folder is required.

 


 

To resolve this error, the following file inside the Houdini installation folder needs to be modified:

"C:\Program Files\Side Effects Software\Houdini 17.5.368\houdini\python2.7libs\hqrop.py"

Open the file in a text editor and add the following:

Inside getOutputParm(), under line 87 add:

elif rop_type == 'vray_renderer':
output_parm = rop_node.parm('SettingsOutput_img_file_path')

Inside checkPath(), replace line 139 with:

if not (path.startswith("$") or path.startswith("{")):

Inside checkPath(), replace line 143 with:

return (variable if variable in ("HIP", "JOB", "{HIP}", "{JOB}") else None)

Please make sure you've matched the indentation level!

Houdini should be restarted (if running) for the changes to take effect.

 

 

 


 

After modifying the hqrop.py file, you should be able to Submit Job with the Copy Project Files to Share Folder and Render option selected.