Search Unity

Cluster Rendering Setup in 5.3.2

Discussion in 'Editor & General Support' started by Z8Dev, Feb 15, 2016.

  1. Z8Dev

    Z8Dev

    Joined:
    Feb 15, 2016
    Posts:
    4
    Hello everyone,

    I've been working recently on setting up a cluster of three machines with three monitors running the same executable with frame locking. These three machines are set up with Quadros/sync cards and are on their own network switch. I am currently using Unity 5.3.2f1 Pro. I've been referring to the Unity manual documentation on implementing this located at: http://docs.unity3d.com/Manual/ClusterRendering.html

    Unfortunately though, I have not had any success in actually properly creating the cluster network. As a test, I have a simple scene with a single script using the following OnGUI function:

    Code (CSharp):
    1.     void OnGUI()
    2.     {
    3.         GUI.Label(new Rect(10, 10, 500, 30), "Is Master of Cluster? " + ClusterNetwork.isMasterOfCluster);
    4.         GUI.Label(new Rect(10, 40, 500, 30), "Is Disconnected? " + ClusterNetwork.isDisconnected);
    5.         GUI.Label(new Rect(10, 70, 500, 30), "Node Index: " + ClusterNetwork.nodeIndex);
    6.     }
    When executing the project with batch files reading "ClusterTest.exe -server 2 *:20000 *:* 60 -logfile output.txt", the master will not wait for the clients to connect (as the documentation references that it will), and what is printed on screen upon startup is:

    Is Master of Cluster? False
    Is Disconnected? True
    Node Index: -1

    Even after starting clients with their respective batch files ("ClusterTest.exe -client 1 127.0.0.1:20000 *:20000 60 -logfile output.txt" when I test locally on a single machine, "ClusterTest.exe -client 1 192.168.168.123:20000 *:* 60 -logfile output.txt" when trying it on the cluster), I would expect IsMasterOfCluster on the master to update, and IsDisconnected to be set to false on the master and clients, but the above data is all that is printed.

    Generated log files do not display any references to cluster setup and only display typical startup and platform assembly information.

    Any assistance is greatly appreciated. Thanks!
     
  2. Jordi-Bonastre

    Jordi-Bonastre

    Unity Technologies

    Joined:
    Jul 6, 2015
    Posts:
    102
    Hi, could you build your game with the Development build option checked and see if there is any message?
     
  3. Z8Dev

    Z8Dev

    Joined:
    Feb 15, 2016
    Posts:
    4
    Hi Jordi,

    Here are log files coming from both the master and one of the clients on Development builds.
     

    Attached Files:

  4. Jordi-Bonastre

    Jordi-Bonastre

    Unity Technologies

    Joined:
    Jul 6, 2015
    Posts:
    102
    This is my .bat for the master: start ClusterRenderingTest.exe -server 1 *:9999 *:* 60 -logFile masterLog.txt
    and this is the .bat for the slave: start ClusterRenderingTest.exe -client 0 127.0.0.1:9999 127.0.0.1:9998 60 -logFile slaveLog.txt

    I have tried with 5.3.2f1 and the master doesn't show the camera view until the slave is connected. Could you try those command lines? I used an empty project with a script attached to the main camera that logs ClusterNetwork.isMasterOfCluster.ToString().
     
  5. Z8Dev

    Z8Dev

    Joined:
    Feb 15, 2016
    Posts:
    4
    Hi Jordi,

    I've set up a test scene in 5.3.2f1 with the same details (a script whose Update simply has a debug log for isMasterOfCluster. Unfortunately both master and slave print false. The master opens and begins rendering immediately after using its associated batch file.

    Thank you so much for your continued support on this!
     
  6. jbarbeau

    jbarbeau

    Joined:
    Dec 21, 2012
    Posts:
    46
    What was the RESOLUTION of this? Z8Dev, did you get it working? I am trying to get Cluster Rendering to work too. Documentation is strangely sparse.

    Do you have to open a port on your local machine for testing?

    Can you use "localhost" instead of 127.0.0.1 in your .bat file?

    Jordi - I assume you have it working!??

    I have Unity Pro 5.3.4. Is Cluster Rendering AUTOMATICALLY enabled? the documentation says you have to have an enabled Editor..... I have Pro 5.3.4 is it enabled?

    There are so many possible points of failure, good documentation AND EXAMPLES THAT WORK, are critical. I find nothing like this in the Unity Documentation. It's like a big secret, that I'm not privy to.

    Please help....
     
  7. jbarbeau

    jbarbeau

    Joined:
    Dec 21, 2012
    Posts:
    46
    Jordi,

    I just used your bat file with my EXE. The server does wait until the client starts to render.... I didn't open port 9999 so I assume it's automatically open on my Win 7 machine.

    The 2 instances don't render together, if I click on 1 it renders, if I click on the other it renders.

    I looked at the log files and found nothing enlightening.

    Does this mean that the MASTER and SLAVE are starting properly? I need to put the GUI in that exposes .isMasterOfCluster. to see....

    How can I get both instances to render at the same time?

    J
     
  8. jbarbeau

    jbarbeau

    Joined:
    Dec 21, 2012
    Posts:
    46
    I ran my test scene using the GUI components as suggested and the Bat file that Jordi suggested.

    The first instance (master) waits until the second instance starts up, but the ClusterNetwork reports that Master of Cluster = false and Disconnected = true.

    What should I do?

    Also the apps don't render together, only one or the other... will this be resolved if the Cluster is working?

    What do I need to do for the ports 9998 and 9999? Do I need to open them on a Win 7 machine?

    Please help...
     
  9. Z8Dev

    Z8Dev

    Joined:
    Feb 15, 2016
    Posts:
    4
    After a bit of back and forth with Jordi, he determined that we still needed a special license for cluster rendering in Unity 5.3 and later. The documentation (at that time at least) made no indication that this license was needed. We talked to a number of sales agents, but they replied saying they had no idea what license we were even talking about.

    We ultimately gave up on Unity's cluster rendering and just used network messages over a gigabit connection and uniform clocks along with frame syncs on quadro cards to get as close to cluster rendering as we could while faking it. Not exactly ideal, but we got very close to our original desired outcome in the end.

    Hope that helps.
     
    Jordi-Bonastre likes this.
  10. cms

    cms

    Joined:
    Sep 19, 2011
    Posts:
    43
    Hello, is there any update on the licence ? Who do we need to contact to obtain a licence ?
     
  11. shantanu01

    shantanu01

    Joined:
    Jan 15, 2018
    Posts:
    4
    Can anybody please tell me where should I store/save my unity build player files on the client machine for cluster rendering to work properly? (filename_data folder/ filename.exe / UnityEngine.dll) etc...
    I am able to test the cluster rendering build locally, but how will the batch file know where my executable build file is saved on the client machines?

    The documentation for Cluster Rendering is too short and it does not have any video tutorials explaining how can we make this cluster rendering work step by step. If you have any links to such video tutorials or documents / forum posts / blogs posts please share.

    Thanks