Screens problems

Hi, I am working on a car racing game, but so far I have 2 problems.

First we are working with 3 42’’ television for our render plugged on a matrox triplehead2go. We cant seems to be eable to get the right resolution, there is allways a distortion on the far edge of the 2 screens of the side. Everything get stretched. Enyone encounter that problem and has a solution for me ? The best we found is to put the FoV to 30 and run in 4098 x 768.

Second, we also have a small screen under those that act as a Dashboard. The question is, how could we start a second instance of unity specificly on that screen, either full screen or window mode ?

Once again I found my solution.

Its actualy quite easy. First you need 3 cameras (or the amount of screens you have) and a script.

While browsing the web I found a script called GUI_adjust that allows you to put 3 camera in one display.

var player1_cam : Camera;
var player2_cam : Camera;
var player3_cam : Camera;

private var fullScr : boolean = false;
private var toggleBool = true;
private var detailSlider : float = 80.0;
private var fogSlider : float;
private var fogScale : float = 0.0005;

function Start () {
Terrain.activeTerrain.detailObjectDistance = 40;
QualitySettings.softVegetation = false;

detailSlider = 80.0;
fogSlider = 20.0;
fullScr = true;
ScreenSetup(1);
}

function OnGUI(){
	
	GUI.BeginGroup( new Rect (10,Screen.height-400, 800,400) );
	toggleBool = GUI.Toggle (Rect (0, 25, 200, 30), toggleBool, "SoftVegetation : " + toggleBool);
	
	GUI.Label (Rect (0, 50, 100, 20), "Detail Distance : " + detailSlider);
	detailSlider = GUI.HorizontalSlider (Rect (0, 70, 200, 30), detailSlider, 0.0, 250.0);
	
	var fogString : String = "Fog Distance : " + (fogSlider*fogScale);
	GUI.Label (Rect (0, 90, 100, 20), fogString );
	fogSlider = GUI.HorizontalSlider (Rect (0, 110, 200, 30), fogSlider, 0.0, 100.0);
	
	
	
	if (GUI.Button (Rect (0,140,30,20), "1")) { ScreenSetup(1); }
	if (GUI.Button (Rect (50,140,30,20), "2")) { ScreenSetup(2); }
	if (GUI.Button (Rect (100,140,30,20), "3")) { ScreenSetup(3); }
	
	fullScr = GUI.Toggle (Rect (0, 160, 200, 30), fullScr, "FullScreen : " + fullScr);
	
	GUI.EndGroup ();
	
	
}

function Update(){
	Terrain.activeTerrain.detailObjectDistance = detailSlider;
	QualitySettings.softVegetation = toggleBool;
	fogStuff._fogDensity = fogSlider*fogScale;
}


function ScreenSetup (players : int) {
	if(players==1){
		player1_cam.enabled = true;
		player2_cam.enabled = false;
		player3_cam.enabled = false;
		if(fullScr){
			player1_cam.pixelRect = Rect(0,0,Screen.width,Screen.height);
		}
		if(!fullScr){
			player1_cam.pixelRect = Rect(0,0,Screen.width/3,Screen.height);
		}
	}
	
	if(players==2){
		player1_cam.enabled = true;
		player2_cam.enabled = true;
		player3_cam.enabled = false;
		if(fullScr){
			player1_cam.pixelRect = Rect( 0, 0, Screen.width/2, Screen.height);
			player2_cam.pixelRect = Rect( Screen.width/2, 0, Screen.width/2, Screen.height);
		}
		if(!fullScr){
			player1_cam.pixelRect = Rect( 0,0, Screen.width/3, Screen.height );
			player2_cam.pixelRect = Rect( Screen.width/3, 0, Screen.width/3, Screen.height );
		}
	}
	
	if(players==3){
		player1_cam.enabled = true;
		player2_cam.enabled = true;
		player3_cam.enabled = true;
		
		player1_cam.pixelRect = Rect( 0, 0, Screen.width/3, Screen.height);
		player2_cam.pixelRect = Rect( Screen.width/3, 0, Screen.width/3, Screen.height );
		player3_cam.pixelRect = Rect( (Screen.width/3)*2, 0, Screen.width/3, Screen.height );
	}
}

It has the part where you get the 3 screens in one display and a couple more thing wich I didint use (you can clean the script if you whant to)

Then you have to change the ‘‘ScreenSetup(1)’’ to ‘‘ScreenSetup(3)’’ in order to change the default number of screens showed from 1 to 3.

After that, in your cameras, you make sure the FoV is at 30, and you can input the rest as you like.

The last part is the tricky one, you have to set the rotation of your main camera left and right so that they act as if it was all one screen. But remember that there is a gap due to the edge of your screens. Keep that in mind.

So thats my solutions for the multiple displays, if you have eny other Idea id be really happy to test them, I have the gear.

Tough all that im still looking for a solution at my second screen problem.

I always appreciate when people find the solution to their problem and actually take the time to post it :slight_smile:

Still looking for our second screen problem tough

Ok while browsing I found part of my solution to my problem
By using the argument -adapter N
where N is the screen #
I can now start my second instance of unity on my second screen. But still one problem tough. That command force the game to be fullscreen. If I do that I loose my main screen and all controls.

Is there eny ways to use the windowed fullscreen mode ?

for windowed fullscreen mode, use -popupwindow through command line