Cluster Rendering with Unity

I have one master and three slaves. Each slave is attached to a projector. So 3 projectors make the full screen area where the scene has to be rendered. How can we achieve that with Unity?

I was thinking that if we run the same application on all the three machines and have them synchronized(using master) then we can achieve this provided each slave can render one-third of the scene. Is there a way in unity which can let a slave machine render only a part of the full scene visible by the camera?

Have 3 cameras parented to an empty/char controller/something? Each slave enables only one of them depending on which screen it’s attached to (you select screen at program startup). The slaves connect to the master and the master sends out the position/rotation information for the parent empty/char controller/etc every frame over the network?

Not really sure what your projector layout is like.

Thanks for your response.

The three projectors are placed horizontally. So I have three side by side screens.

I have a question about your suggestion. In my layout the scene has to be divided horizontally into three parts. How will you make sure that each camera sees only one-third of the scene (left,middle or right part only)?

You could adjust the field of view and rotation of the cameras until they line up, but it might be difficult.

If you’re using Pro, another option would be have all 3 cameras at the exact same position/orientation so they render the same thing. But instead of rendering to the screen, render to a texture which is placed onto a gui texture or a fullscreen quad. You could then adjust the tiling and offset of the texture so that each projector shows 1/3 of the scene.

Thanks again for your response. Unfortunately I don’t have Unity Pro.

Is it possible to control the horizontal field of view of the camera? If we can restrict the horizontal FOV then also it might be possible.

Hmm, I don’t know if you can set separate horizontal and vertical FOV’s, I don’t think so though.

I can’t really think of any way to do it w/out using Pro, but maybe someone smarter than me can.

Does the graphics hardware map the three projectors side by side on a wide virtual screen? If so, you can use each camera’s Normalized Viewport Rect property to render to only a section of the virtual screen. Basically, the components of this property are measured in fractions of the total screen width and height, so if you set a camera’s viewport width to 0.33333… it will render to only a third of the width of the full screen. The first thing to do is to set up the three cameras’ viewports so that they render three adjacent vertical sections on the screen.

To combine the three cameras so they behave as a single wide camera, you need to make the leftmost and rightmost sections horizontally oblique. There isn’t an API command for this, but you can do it by setting the camera’s projection matrix directly. There’s an explanation of the projection matrix values in this thread.

I think he’s actually using 3 different computers, each hooked up to a projector. So if he uses the normalized viewport rect in that situation he’d end up w/ the same width as a single projector, wouldn’t he?

Yes I am using three different computers (each attached to a projector). So the idea of viewport rect will not work.

By the way i got Unity Pro trial because I could not think of anything else which could avoid render-to-texture feature. So if it will work then I will buy it.

I am thinking of creating three separate cameras each should be able to view only a part of the screen which can be achieved using render-to-texture somehow. I will see if that works.