Network rendering - LuxRender Wiki
Luxrender GPL Physically Based Renderer

Network rendering

Personal tools

From LuxRender Wiki

Jump to: navigation, search

LuxRender has the built-in functionality to render on networks, so that multiple computers can work together to increase render speed. This feature works both on local networks and over the internet.

When using network rendering, it is important to make sure that the same version of LuxRender is installed on all computers.


Network rendering (local network)

The basic concept of network rendering with LuxRender involves one managing computer (or master) and one or more rendering servers (or slaves). The client sends the rendering job to the servers, receives the result of the rendering at regular time intervals and displays the combined result.

The process of setting up network rendering consists of just a few steps: -on all of the servers, start the luxconsole program and write down the computers's IP address -on the client, start the rendering and add the IP addresses of the rendering servers

Start Luxconsole

Luxconsole is a stripped down version of LuxRender that runs without a graphical user interface. This means it has to be started from a terminal or command line. The exact command to be typed depends on the operating system you are using. For the available command line options see here : luxconsole.

starting luxconsole with the -s option

Starting Luxconsole on Windows

If you've installed LuxRender using the official Windows installer you can start Luxconsole by using the "Start LuxRender Slave" shortcut in the Start Menu. This shortcut will list the local IPv4 addresses for convenience before starting Luxconsole.

If you did not use the installer then the easiest way to use Luxconsole on Windows is by creating a shortcut for it. After having gone through this procedure once, you'll be able to start a network rendering server just by double clicking the shortcut.

-go to the folder in which luxconsole.exe is located, right click luxconsole.exe and select Create Shortcut
-right click on the shortcut icon that was just created, choose Properties and go to the Shortcut tab
-In the Target field, add a space at the end and type “-s” without the quotes. The complete line should read something like “C:\Program Files\luxrender\luxconsole.exe” -s

After applying the changes double clicking the shortcut should bring up a terminal window. A text should show up saying including something like “Launching server [2 threads] mode on port '18018'”. If this is the case, you have successfully started a network rendering server.

On some Windows systems you might see a warning dialog appear from your Windows firewall or Anti-Virus software. This is because luxconsole.exe is trying to open a network port. Using this port must be allowed both on the host and client machine for network rendering contributions to take place.

Starting Luxconsole on Windows using the Command Prompt

If you prefer starting Luxconsole from a Windows command window, just browse to the folder in which Luxconsole is located and type “luxconsole.exe -s”.

Starting Luxconsole on OSX

After moving the LuxRender folder to your Applications folder to install LuxRender, navigate to the /Applications/LuxRender/scripts_interactive folder and double click on the "create_systemwide_symlinks" executable. As the name implies, this will run a script that creates symlinks allowing you to simply open a Terminal window and type "luxconsole -s" and hit enter, without typing the whole path to the executable. You should see some text saying something like “Launching server mode [2 threads] Server listening on port '18018'”.

Alternatively you can open a terminal window and drag the run_luxconsole_server icon onto a terminal window – this will show something like /Applications/LuxRender/scripts_interactive/run_luxconsole_server. Then press enter, after which you should see some text saying something like “Launching server mode [2 threads] Server listening on port '18018'”

Starting Luxconsole on Linux

In a terminal window, type “./luxconsole -s”. If all goes right, you should see some text saying something like “Launching server [2 threads] mode on port '18018'”.

Find the computer's IP address

On Windows, type “ipconfig /all” in a terminal and network information (including the IP address) will show. On OSX, the address is listed in the Network section of the System preferences. On Linux, you probably know where to look.

Start the rendering and add render servers

Now that the render servers are set up, open LuxRender on the client and start the rendering (or start LuxRender directly from an exporter). In LuxRender, go to the network tab, for all of the render servers fill in the IP address in the Server field and press the “+” button. That's all!

Two render servers showing on the LuxRender network tab

After a while, the first contributions of the render servers will be sent back to the client. The contributions of the render servers will be added to the rendering in progress right away, so they can be seen in the Render tab. Also the S/px value should jump up any time a rendering contribution from a server arrives. Additionally, information about interaction between the client and servers can be followed in the Log tab.

Network rendering using the terminal (optional)

Instead of starting the rendering from LuxRender's graphical interface, it is also possible to start the rendering from the terminal/command line. For example:

luxconsole -u -u -t 2 fullcornell-metropolis.lxs

Where "" and "" are the IP addresses of 2 servers. You can use as many "--useserver" (or "-u") options as you like (one for each server available). By default every 180 seconds the client will contact the server in order to download the traced samples. This interval can be changed by using the "--serverinterval" (or "-i") option:

luxconsole -u -u -t 2 -i 300 fullcornell-metropolis.lxs

The default TCP port used for client/server communication is 18018. You can use the "--serverport" (or "-p") option in order to change the tcp port:

luxconsole -s -p 10001

The "--useserver" (or "-u") also supports an extended format in order to define the port used by the server:

luxconsole -u -u -t 2 fullcornell-metropolis.lxs

Network render (over the internet)

Network rendering over the internet works in the same way as on a local network, with the exception that one should use a proper IP address instead of an address on the local network.

On the render servers, network port 18018 should be available. If it is blocked by a firewall or router, LuxRender will be unable to connect, so you may need to adjust the firewall settings accordingly. It is also a good idea to specify the port explicitly in LuxRender's network tab, so for example instead of just

Using DrQueue with Luxrender

Including support for all features required by a render farm (like job queues, accounting, authentication, etc.) is currently out of the scope of LuxRender. However, you can easy integrate LuxRender in one of the existing Distributed Render Queue Managers, for example the open source program DrQueue.

LuxRender is supported in DrQueue in the webinterface DrQueueOnRails through Ruby bindings. It does not yet work with the GTK gui drqman. Please try out the 0.64.x SVN branch at [1].

You can find all needed additional information in their Trac wiki and community forums.

Automatisation of network rendering under Windows using .bat files (optional)

If you are using Windows XP, Vista or 7, as an alternative to shortcuts you could create .bat files to automate the process of starting a rendering server or client.

Creating a .bat file is quite a simple procedure: just open a new text document (for example in Notepad) and paste the necessary code in it. Then save and change the extension from .txt -> .bat. If on your computer the version or location of LuxRender are different, adjust the text accordingly.

For the server, the code would be:

cd C:\Program Files\LuxRender
START Luxconsole -s

Save this .bat file on your desktop and name it for example "StartLuxrenderServer.bat". When double clicking the file, you will see that the server account gets activated.

For the clients (also known as master):

cd C:\Program Files\LuxRender
START Luxconsole -u -u -u -u //

Replace the xxx with the correct IP of the servers, replace the number of servers to the ones you have available and set the correct path to the scene you want to render. Save this .bat file on your desktop and name it for example "StartLuxrenderClient.bat" (or StartLuxrenderMaster.bat). When you want to start the client just double click the file and you will see that the client account will run, connect to the servers and start rendering.

If you want to even do even more automatisation you can look here or here.