[TUTORIAL] Iray Server render farm / batch rendering for DAZ Studio

cridgitcridgit Posts: 1,314
edited December 2016 in The Commons

DAZ Studio’s new Iray Server integration currently only supports Iray Server’s “streaming” mode, which means you need a machine with a pro GPU (Quadro or Tesla) or a VCA ($50K). Once DAZ Studio supports Iray Server’s “batch” (queue) mode, you can run distributed renders on multiple machines using any available hardware (CPU and/or all Nvidia GPU’s not only Quadro/Tesla).

After much kerfuffling, I have finally run a distributed render in Iray Server batch mode across multiple machines (with a manual step between DAZ Studio and Iray Server). This means that DAZ Studio + Iray Server is a viable high performance distributed rendering solution on any available hardware, available NOW at a reasonable price.

This tutorial explains the entire process, from “normal” DAZ Studio Iray render, to a DAZ Studio Iray Server standalone render on 1 machine, to a DAZ Studio Iray Server distributed render on multiple machines, so that you can benchmark the results. The tutorial should take around 1-2 hours on 2-3 machines. See details of each step below with screenshots.

Once your render farm is up and running, you can start using spare PC’s, buying new PC’s and/or buying Nvidia GPU’s to boost your render capabity. Don’t forget that you will need to buy an Iray Server license for every machine in the render farm ($295 per year), so be careful deciding whether you should add a spare PC with a CPU only (an additional Iray Server license) or upgrade the GPU of one of your existing machines (more rendering horsepower without an additional Iray Server license).

 

Perform a “normal” Iray render in DAZ Studio (for benchmarking)

1. Load benchmark scene in DAZ Studio.

2. Setup benchmark scene Render Settings.

3. Setup benchmark scene Rendering Devices and RENDER!

4. Check render performance statistics (for benchmarking).

 

Setup Iray Server

5. Get Iray Server trial license and install Iray Server.

6. [OPTIONAL] Change default install paths.

7. Start Iray Server standalone.

8. Login to Iray Server web GUI.

9. Check cornell_box benchmark scene (installed with Iray Server). [OPTIONAL] Render cornell_box to ensure Iray Server is working.

10. Check cornell_box folder main.mi file and shaders subfolder (you need the same structure for your DAZ Studio renders).

11. Start Iray License Manager.

 

Perform an Iray Server standalone render on 1 machine

12. Load benchmark scene in DAZ Studio and drool over the Cloud [BETA] rendering options (only available for Nvidia Quadro/Tesla GPU).

13. Create new scene folder (for standalone render).

14. Copy DAZ Studio Iray rendering resources to new scene folder. [OPTIONAL] Copy this folder as a template to easily recreate this structure for future renders.

15. In DAZ Studio, export .MI scene file to new scene folder.

16. Add exported .MI scene to Iray Server queue.

17. Start Iray Server queue and RENDER!

18. Check render performance statistics (for benchmarking).

19. Download rendered image.

 

Perform an Iray Server distributed render on multiple machines (render farm)

20. Create new scene folder (for distributed render).

21. Create Iray Cluster master shortcut.

22. Start the Iray Server cluster master.

23. Setup Iray Server on every slave machine, create Iray Cluster slave shortcut on each slave and start each slave using its Iray Cluster slave shortcut.

24. Check the cluster master to make sure all slaves correctly joined the cluster.

25. Login to the web GUI on the cluster master, add the scene to queue and start queue to RENDER!

26. Check render performance statistics (for benchmarking) and download rendered image.

Post edited by cridgit on
«13

Comments

  • cridgitcridgit Posts: 1,314
    edited December 2016

    For questions and support regarding Iray Server please see the Nvidia Iray Server forum https://forum.nvidia-arc.com/forumdisplay.php?207-Iray-Server

    FAQ

    1. Can I do this without buying my own hardware and building my own datacenter?
      Yes. Instead of buying additional PC's you can rent cloud instances (e.g. AWS) and setup Iray Server on those instances instead.

     

    Post edited by cridgit on
  • cridgitcridgit Posts: 1,314

    1. Start up DAZ Studio, load a scene and set Render Settings / Pixel Size to 1920 x 1080. This matches Iray Server’s default settings (for benchmarking).

    Picture1.jpg
    1600 x 900 - 243K
  • cridgitcridgit Posts: 1,314

    2. Set Render Settings / Max Samples to 1000, Max Time to 3600 and Rendering Converged Ratio to 100%. Normally we would not use these settings but it matches Iray Server’s default settings (for benchmarking).

    Picture2.jpg
    1600 x 900 - 236K
  • cridgitcridgit Posts: 1,314

    3. Under Render Setting / Photoreal Devices enable CPU and all available GPU’s, enable OptiX Prime and disable all Interactive Devices. Now render in DAZ Studio using Nvidia Iray. ( this is a “normal” Iray render - you can’t use DAZ Studio during rendering).

    Picture3.jpg
    1600 x 900 - 278K
  • cridgitcridgit Posts: 1,314

    4. Once the render is finished, open the DAZ Studio log file (About / Troubleshooting / View Log) and make note of total render time and device statistics (for benchmarking).

    Picture4.jpg
    1600 x 900 - 116K
  • cridgitcridgit Posts: 1,314
    edited December 2016

    5. Go to http://www.nvidia.com/object/iray-server.html and obtain an Iray trial license. Download and install Iray Server (it will automatically install Iray License Manager too) and UNCHECK LAUNCH IRAY SERVER before closing. DO NOT START IRAY SERVER/LICENSE MANAGER AND DO NOT INSTALL ANY UPDATES yet.

    Picture5.jpg
    594 x 439 - 38K
    Post edited by cridgit on
  • cridgitcridgit Posts: 1,314
    edited December 2016

    6. The default install paths are "C:\Program Files\NVIDIA Corporation\Iray Server” for binaries and "C:\ProgramData\NVIDIA Corporation\Iray Server“ for renders. If you DO NOT want to change the default paths, skip to the next step.

    If you want to change the binaries default path, move "C:\Program Files\NVIDIA Corporation\Iray Server” anywhere you like (I moved mine to “D:\Program Files\NVIDIA Corporation\Iray Server” because all programs go on my 2TB HDD). Open the Iray Server shortcut installed to your desktop, and update both paths in Target "C:\Program Files\NVIDIA Corporation\Iray Server\iray_server.exe" --install-path "C:\Program Files\NVIDIA Corporation\Iray Server“.

    If you want to change the renders default path, move "C:\ProgramData\NVIDIA Corporation\Iray Server" anywhere you like (I moved mine to “D:\Users\...\Documents\Iray Server”). Open the Iray Server shortcut installed to your desktop, and update the path in Start In "C:\ProgramData\NVIDIA Corporation\Iray Server".

    Picture6.jpg
    363 x 527 - 45K
    Post edited by cridgit on
  • cridgitcridgit Posts: 1,314

    7. Start Iray Server by launching the Iray Server shortcut installed to your desktop (you may have modified the paths in the previous step). It should start with no problems and show you are using a trial license.

    Picture7.jpg
    1530 x 1095 - 390K
  • cridgitcridgit Posts: 1,314

    8. Open 127.0.0.1:9090 in a web browser. This is the port (9090) of Iray Server’s web GUI on your current machine (127.0.0.1). After logging in the first time using the default admin/admin you’ll need to change the password.

    Picture8.jpg
    1288 x 825 - 47K
  • cridgitcridgit Posts: 1,314

    9. Go to the Resources tab and scroll down to see the cornell_box benchmark scene (installed with Iray Server). If you want, you can render cornell_box now to make sure Iray Server is working, but it is not necessary (click Add to Queue then go to the Queue tab and start the queue; results can be viewed/downloaded in the Results tab).

    Picture9.jpg
    2000 x 1106 - 308K
  • cridgitcridgit Posts: 1,314
    edited December 2016

    10. Navigate to "C:\Program Files\NVIDIA Corporation\Iray Server\benchmarks” (or wherever you moved it to if you changed the default install paths in step 6). This is where you will put your DAZ Studio renders. Open the cornell_box folder and see the main.mi file and shaders subfolder (you need the same structure for your DAZ Studio renders).

    Picture10.jpg
    943 x 537 - 73K
    Post edited by cridgit on
  • cridgitcridgit Posts: 1,314
    edited December 2016

    11. Stop Iray Server (close the window) then start Iray License Manager by launching the Iray License Manager shortcut installed to your desktop. You can expand Iray Server to confirm your license or to purchase a license. Iray License Manager might notify you of updates for Iray License Manager and/or Iray Server but DO NOT UPDATE ANYTHING yet (get it working first then you can update later). Close Iray License Manager now.

    Picture11.jpg
    546 x 625 - 39K
    Post edited by cridgit on
  • cridgitcridgit Posts: 1,314
    edited December 2016

    12. Start up DAZ Studio, load a scene. Go to Render Settings / Advanced / Cloud [BETA]. If you have an Nvidia pro GPU (Quadro/Tesla) you can enter your Iray Server info here and render. But if you have no GPU or only a regular Nvidia GPU, you won’t be able to use this feature. Good news ... read on winkyesheart

    Picture12.jpg
    2000 x 1126 - 319K
    Post edited by cridgit on
  • cridgitcridgit Posts: 1,314
    edited December 2016

    13. Navigate to "C:\Program Files\NVIDIA Corporation\Iray Server\benchmarks” (or wherever you moved it to if you changed the default install paths in step 6) and create a new folder called test1 with a subfolder called shaders (this reflects the structure of the cornell_box default scene you looked at in step 10).

    Picture13.jpg
    943 x 537 - 43K
    Post edited by cridgit on
  • cridgitcridgit Posts: 1,314
    edited December 2016

    14. Navigate to “D:\Program Files\DAZ 3D\DAZStudio4\shaders\iray” and copy the 3 subfolders into your test1\shaders subfolder "C:\Program Files\NVIDIA Corporation\Iray Server\benchmarks\test1\shaders” (or wherever it is if you changed the default install paths in step 6). This is the basic template of a DAZ Studio Iray Server scene so you may want to keep a copy of the entire test1 folder to easily recreate this structure for future renders.

    Picture14.jpg
    943 x 537 - 48K
    Post edited by cridgit on
  • cridgitcridgit Posts: 1,314
    edited December 2016

    15. In DAZ Studio, select File / Export and choose the .MI file type then save main.mi into your test1 folder "C:\Program Files\NVIDIA Corporation\Iray Server\benchmarks\test1” (or wherever it is if you changed the default install paths in step 6).

    Picture15.jpg
    2000 x 1125 - 324K
    Post edited by cridgit on
  • cridgitcridgit Posts: 1,314

    16. Start Iray Server, login to the web GUI in a web browser and open the Resources tab (see steps 7-9). You will now see your DAZ Studio test1 scene under benchmarks. Click Add to Queue. It could take 10-60 seconds to load depending on scene complexity. It will popup a green message in the top right corner if the scene was processed successfully or show an error if not – in this case view the errors displayed in the log on this screen to see what is wrong.

    Picture16.jpg
    2000 x 1125 - 321K
  • cridgitcridgit Posts: 1,314

    17. Go to the Queue tab and click Start Queue. The DAZ Studio scene starts running in batch (queue) mode. Yay!

    Picture17.jpg
    1600 x 900 - 87K
  • cridgitcridgit Posts: 1,314
    edited December 2016

    18. When the render is done, click the test1 job name and make a note of the performance details (for benchmarking). They should be comparable to your “normal” DAZ Studio render if you were using the same settings on the same machine.

    Picture18.jpg
    1600 x 900 - 104K
    Post edited by cridgit on
  • cridgitcridgit Posts: 1,314

    19. Go the Results tab to download the rendered image, and compare it to your “normal” DAZ Studio Iray render. Logout of the web GUI and stop Iray Server.

    Picture19.jpg
    1600 x 900 - 72K
  • cridgitcridgit Posts: 1,314
    edited December 2016

    20. Navigate to "C:\Program Files\NVIDIA Corporation\Iray Server\benchmarks” (or wherever it is if you changed the default install paths in step 6) and copy/paste the test1 folder. Call it test2 which will be your distributed render (for benchmarking).

    Picture20.jpg
    885 x 537 - 50K
    Post edited by cridgit on
  • cridgitcridgit Posts: 1,314
    edited December 2016

    21. Copy/paste the Iray Server shortcut installed to your desktop and rename it Iray Cluster. Append the cluster master command -c 192.168.2.1 –m to the Target using the IP address of the machine on your home network. The –m tells Iray Server this machine will be the cluster master.

    You can check the machine’s IP address using ipconfig or lookup the IP address in the command line output when Iray Server starts up if you’re not sure. Note that 127.0.0.1 will NOT work because that only allows a machine to talk to itself not to other machines.

    Picture21.jpg
    596 x 823 - 85K
    Post edited by cridgit on
  • cridgitcridgit Posts: 1,314

    22. Start the Iray Server cluster by launching the newly created Iray Cluster shortcut. The master (this machine) should start without problems.

    Picture22.jpg
    1508 x 1125 - 412K
  • cridgitcridgit Posts: 1,314
    edited December 2016

    23. Now setup Iray Server on every slave machine you want to include in the cluster (see steps 5-6). Make an Iray Cluster shortcut for each slave (see step 21) by appending the cluster slave command -c 192.168.2.1 (for slaves there is no –m option, as a cluster has only 1 master).

    You can use any spare/idle machines with CPU only, CPU + regular GPU or CPU + pro GPU (obviously only Nvidia GPU’s will be used by Iray Server).

    Picture23.jpg
    596 x 823 - 85K
    Post edited by cridgit on
  • cridgitcridgit Posts: 1,314

    24. When you start a cluster slave by launching its Iray Cluster shortcut, the cluster master log will show that a slave (host 2 etc.) has joined.

    Picture24.jpg
    1508 x 1125 - 437K
  • cridgitcridgit Posts: 1,314
    edited December 2016

    25. Login to the web GUI on the cluster master (you cannot login to the web GUI on a cluster slave) and open the Resources tab (see steps 7-9). You will see your DAZ Studio test2 scene under benchmarks. Click Add to Queue. Go to the Queue tab and click Start Queue. The distributed render will start using the master and all cluster slaves.

    Picture25.jpg
    2000 x 1125 - 187K
    Post edited by cridgit on
  • cridgitcridgit Posts: 1,314

    26. When the distributed render is finished, you can view the performance (for benchmarking) and go to the Results tab to download the rendered image for comparison against your DAZ Studio “normal” Iray render and the Iray Server standalone render.

    Picture26.jpg
    1600 x 900 - 113K
  • AMAZING post!

    thx cridgit!yes

  • GaryHGaryH Posts: 66
    edited December 2016

    Brilliant!  Your "kerfuffling" really paid off.

    The problem is cost, even the minimum two PCs in a render farm would be $590 per year in license fees - you can get a new high end GPU for that.  That's why I still think PCI-E extenders are the way to go for non-professional rendering.

    Also, would your technique work for animations (does the .mi file contain the needed info)?  

    Post edited by GaryH on
  • posecastposecast Posts: 386

    Gary can you recommend a pci-e extender? I am wanting to build a small form factor pc, but add an external video card or two that are too big for the case. Thanks!

Sign In or Register to comment.