Game Development Community

Black Lines in 3D Image on SDTV

by Tony Pitman · in Torque X 3D · 04/13/2010 (5:22 pm) · 13 replies

I am writing a TX3D game for xBox. On an HD TV everything looks fine. On a SD TV there are some random length, random position horizontal black lines that appear in the upper right corner of the screen. The extend from the edge of the screen to anywhere from 1/4 towards the center to all the way in the center.

They are very random and quick to come and go. I can't seem to narrow down what is causing them. They appear both during GUI screen transition, splash screen transition and while the screens are stationary.

Any ideas?

#1
04/13/2010 (6:36 pm)
I just noticed that the black lines are NOT there on the main playing screen. They only show up during the initial splash, GG splash and then title screen. Once I get into my main level screen (GUIPlay) the lines are gone.

Could it have something to do with those other screens refreshing too fast or something?
#2
04/28/2010 (11:01 am)
I think so. The engine by default squeezes as many fps as it can (not fixed stepping) so the simplest is the scene the higher is the frame rate so that will be a lot more than the TV refresh rate (depending on the images and the type of effects) resulting in those lines on top of the screen.
#3
04/28/2010 (11:04 am)
Any suggestions on how to fix this? It only happens while on my intro screens and scenes. Once I get into my 3D scene everything is fine.
#4
04/28/2010 (11:17 am)
IMO the only way is to set the engine at fixed time step when you load simple scenes:

ProcessList.Instance.UseInterpolation = false;
Game.IsFixedTimeStep = true;
Game.TargetElapsedTime = new TimeSpan(0, 0, 0, 0, 16);

Then go back to variable time step during the gameplay:

ProcessList.Instance.TickMS = 0;
ProcessList.Instance.UseInterpolation = false;
Game.IsFixedTimeStep = false;

Hope this helps ;)
Pino
#5
04/28/2010 (11:24 am)
I will have to try that. Awesome!
#6
05/11/2010 (6:06 pm)
I can't figure out where to call this. Do I do it at the beginning of the game or after loading each scene?

I tried setting it in BeginRun and also in the Main method and it doesn't work. I set break points in the places where the engine is setting things up and it is being read from a settings file during start up. That stuff overrides the changes I made or doesn't set the TickMS if I do it in BeginRun.

The result is that when I do the settings you suggested I don't see the splash screen except for a single frame of it as it fades in. Then I don't see the next screen at all.
#7
05/11/2010 (6:16 pm)
Another note. If I go ahead and continue with the Start button and start the game the rest of the game works fine.

If you remember what my game is like I have a Title screen that fades in and then out, then the Torque GG splash that fades in and out and then the Start screen where you hit the Start button.

The first 2 screens are the ones that have the black lines on the SD TV. They are also the ones that when I put in the fix you recommended they don't fade in or out. All I see is a half faded in GG splash screen until I hit the Start or A button to get passed it. Then I see the Start screen and everything works fine from there.

So for some reason the fix messes up the updating of the fading in and out and it never gets all the way through the fading so it doesn't time out and never goes to the next screen.

Thoughts?
#8
05/11/2010 (6:19 pm)
Oh, one other note (hopefully the last one). My games was created as a Torque X 3D Pro WITH GUI project.
#9
05/12/2010 (12:45 am)
Hey Tony,

sorry for answering slowly but... I'm in the GMT time zone ;) My guess is that you don't have one of the GUI forum fixes:

http://www.torquepowered.com/community/forums/viewthread/112265

Can you check that?

Pino
#10
05/12/2010 (12:47 am)
About where to set the engine speed: I do that before loading the scene.
#11
05/12/2010 (7:02 am)
I understand the lag time. How is the weather over there anyway?

I won't know for sure until I get back home and can try it on my xBox, but on Windows it works now.

Would you recommend leaving the settings for the 3D mode as well or switch back to interpolated and all that?
#12
05/12/2010 (8:37 am)
Here it's Ireland so... rain/sun/rain/sun... and so on all day long :)

For the game itself it's better to set back the engine at full speed (no interpolation). In the community project I've added these 2 static methods that are quite useful to do that cleanly:

/// <summary>
        /// Set the Engine to fixed time step at the standard of 60FPS
        /// This will avoid the flickering of a few lins on top
        /// of the screen while in menu and other slow fps scenes
        /// </summary>
        public static void SetEngineTimeStepTo60FPS()
        {
            ProcessList.Instance.UseInterpolation = false;
            TorqueEngineComponent.Instance.Game.IsFixedTimeStep = true;
            TorqueEngineComponent.Instance.Game.TargetElapsedTime = new TimeSpan(0, 0, 0, 0, 16);
        }

        /// <summary>
        /// Set the Engine to get as much FPS as possible (no fixed time step)
        /// </summary>
        public static void SetEngineTimeStepToFree()
        {
            ProcessList.Instance.TickMS = 0;
            ProcessList.Instance.UseInterpolation = false;
            TorqueEngineComponent.Instance.Game.IsFixedTimeStep = false;
        }
#13
05/12/2010 (8:42 am)
I saw those functions and will use something similar.

I mis-spoke. I meant is it better to set IsFixedTimeStep back to false or not. It sounds like that is the right thing to do.

Thanks a ton for this. If it works I will put my game back into review tonight!