Xbox Letterbox Issues
by Henry Shilling · in Torque X 2D · 08/17/2009 (11:36 pm) · 6 replies
I am getting some really weird results with my main GUI scene. I created my project with backbuffer at 1280x720, set in torqueSettings.xml. I have my game plauing in a GUISceneview.
the code for the GUIPlay
Pretty simple. When I view the game in standard def 4:3 I get my letterbox and all looks well. Change the Xbox to widescreen 720p or 1080i and I still get letterbox, with a very wide and squeezed image. After searching the forums I see in a post by Matthew Hoesterey that he set the size to 1280x960, I tried this and it worked... However it doesn't seem right at all. Is this what I should do or is something else wrong.
SceneLoader.Load(@"datalevelslevelData.txscene");
GuiPlay playGui = new GuiPlay();
GUICanvas.Instance.SetContentControl(playGui);the code for the GUIPlay
public GuiPlay()
{
Style = new GUIStyle();
Position = new Vector2(0, 0);
Size = new Vector2(1280, 720);
Style.PreserveAspectRatio = true;
ts1.FontType = @"dataSpriteFont1";
ts1.TextColor[0] = Color.White;
ts1.IsOpaque = false;
ts1.SizeToText = true;
text0.Text = "Score: ";
text0.Position = new Vector2(40, 40);
text0.Style = ts1;
text0.Folder = this;
}Pretty simple. When I view the game in standard def 4:3 I get my letterbox and all looks well. Change the Xbox to widescreen 720p or 1080i and I still get letterbox, with a very wide and squeezed image. After searching the forums I see in a post by Matthew Hoesterey that he set the size to 1280x960, I tried this and it worked... However it doesn't seem right at all. Is this what I should do or is something else wrong.
About the author
http://twitter.com/theBigDaddio
#2
08/18/2009 (1:42 am)
Yes it's letterboxed when changed to 720p, and yes I am using an HDTV. If I don't use PreserveAspectRatio then I get a 480p screen.
#3
In order to use PreserveAspectRatio = true, I set the following in the torquesettings.xml. You can either use the useDisplaySizeForBackBuffer or the PreferredBackBuffer sizes.
After doing this, I was able to keep PreserveAspectRatio = true, however, adding these settings seemed to me to looks exactly the same if I didn't use PreserveAspectRatio on the GUISceneView and it looked like it was displaying in 720p
08/18/2009 (6:23 am)
Henry, I was able to reproduce what you were seeing. However, I don't know what you mean by you see a 480p screen when you set PreserveAspectRatio to false...I see my 1280/720 as expected when in 720p resolution on TV.In order to use PreserveAspectRatio = true, I set the following in the torquesettings.xml. You can either use the useDisplaySizeForBackBuffer or the PreferredBackBuffer sizes.
<XboxGraphicsManagerSettings>
<PreferMultiSampling>false</PreferMultiSampling>
<UseDisplaySizeForBackbuffer>true</UseDisplaySizeForBackbuffer>
<PreferredBackBufferHeight>720</PreferredBackBufferHeight>
<PreferredBackBufferWidth>1280</PreferredBackBufferWidth>
</XboxGraphicsManagerSettings>After doing this, I was able to keep PreserveAspectRatio = true, however, adding these settings seemed to me to looks exactly the same if I didn't use PreserveAspectRatio on the GUISceneView and it looked like it was displaying in 720p
#4
Correct aspect, fullscreen 720p, also loos the same in 1080:

PreserveAspectRatio = true. 4x3 screen.

PreserveAspectRatio = false 4x3 screen.

It looks to me like it is scaling the vertical only. the width doesnt seem to change in either example. I feel this is also contributing to another issue I am having with a dialog I push to the screnn and it doesn't size correctly. I am going to dig into the source code.
the line in torqueSettings.xml <UseDisplaySizeForBackbuffer>false</UseDisplaySizeForBackbuffer> defaults to false. For the tests I had set it to true. Is this documented anywhere what it does, or for that matter anything in this file? I guess for the most part one can understand what they do from the name of the setting.
08/18/2009 (10:06 am)
Still is not right. Here are the images:Correct aspect, fullscreen 720p, also loos the same in 1080:

PreserveAspectRatio = true. 4x3 screen.

PreserveAspectRatio = false 4x3 screen.

It looks to me like it is scaling the vertical only. the width doesnt seem to change in either example. I feel this is also contributing to another issue I am having with a dialog I push to the screnn and it doesn't size correctly. I am going to dig into the source code.
the line in torqueSettings.xml <UseDisplaySizeForBackbuffer>false</UseDisplaySizeForBackbuffer> defaults to false. For the tests I had set it to true. Is this documented anywhere what it does, or for that matter anything in this file? I guess for the most part one can understand what they do from the name of the setting.
#5
08/18/2009 (6:44 pm)
Henry, in your original post you said you were having problems in 720p mode...in your last with the images it seems like you are saying that the problem is with your 4x3 ones...
#6
and torqueStettings.xml UseDisplaySizeForBackbuffer set to false (the default) I am able to get this image:

setting UseDisplaySizeForBackbuffer to true fixes that. Changing this makes no difference at all for 4:3.
08/18/2009 (7:11 pm)
Well it looked allright in 4:3 until I made the test pattern and found out all was not well. With this code:Style = new GUIStyle();
Position = new Vector2(0, 0);
Size = new Vector2(1280, 720);
Style.PreserveAspectRatio = true;and torqueStettings.xml UseDisplaySizeForBackbuffer set to false (the default) I am able to get this image:

setting UseDisplaySizeForBackbuffer to true fixes that. Changing this makes no difference at all for 4:3.
Torque Owner Jake Davis
I'll give it a test when I get home tonight.