ImagineNation

Hi;

I'm currently doing my programming on a 37 inch Sharp Aquos TV.

My game is loading a moderately large mesh (64x64 triangles) and displaying it on screen in wire-frame mode.

The strange thing is, when I rotate the mesh .....the mesh dims! At a rough guess, it's only 50% of the brightness it's displayed at when not being rotated.

Because I run my apps at full speed for performance testing (about 459 FPS currently) at first I suspected that as I had synchronise with vertical retrace turned off, parts of the mesh were not being drawn in intermittent frames, therefore resulting in the overall apparent dimming.

But when I set this.isfixedtimestep to true and turned on synchronise with vertical retrace ... the same thing happens! AT 60FPS !

Currently, I suspect it's something to do with the TV itself ... maybe something like how much time delay there is before it can turn on a pixel

This is important though because a lot of people have LCD TV's these days so this is something you WONT see when debugging your app on your pc via your monitor, yet it WILL appear on your game when it's running on the 360 and displaying on your tv --- if you have an LCD TV.

Has anyone else seen this happening Am I right about the reasoning Or is it something else






Re: XNA Game Studio Express Why does my displayed mesh dim when rotating on an LCD TV?

r2d2-proton

Lighting






Re: XNA Game Studio Express Why does my displayed mesh dim when rotating on an LCD TV?

Shawn Hargreaves - MSFT

What resolution is your game running at What resolution is your Xbox display output set to What is the native resolution of your TV

Depending on the above answers, there could be all kinds of different video scaling going on, perhaps inside the Xbox or maybe also inside the TV. Depending on the details, this could easily cause the results you are seeing. The Xbox video scaler is very high quality, but I doubt it can be relied on to exactly preserve the brightness of a single-pixel thick line (that's not really a common case for video signals, so probably not what they tweaked it for) and if the TV is doing any scaling internally, things are all over the shop in terms of how good different TVs are at that.





Re: XNA Game Studio Express Why does my displayed mesh dim when rotating on an LCD TV?

ImagineNation

Doesn't matter what resolution I choose -- have tried 800x600, 1024x768 and 1360x768, windowed and full-screen.

My TV supports all of these, it's in the specs.

Can't be the brightness of a single-pixel line -- I'ev set up the mesh to rotate left or right if I hold down the arrow keys. Whenever rotating, it's dim -- as soon as I stop it's back to normal brightness. The mesh is identical rotating or not so it's nothing to do with line thickness. If it were some kind of scaling artifact, that shouldn't happen. I still suspect it's something to do with the reaction time of a single pixel for an LCD --- IE how long it takes a pixel to light up ...

Has anyone else seen this I suspect it will probably apply for ANY fast moving objects on a 3d screen ...


Strangely, i have never noticed it in any of my games ... Gothic 3, Civ4, they all look fine ... can it be something specific to XNA





Re: XNA Game Studio Express Why does my displayed mesh dim when rotating on an LCD TV?

ImagineNation

Nope -- lighting is unchanged, all I'm doing is rotating the mesh left or right whenever I pus hthe arrow keys....




Re: XNA Game Studio Express Why does my displayed mesh dim when rotating on an LCD TV?

Kyle_W

I wonder if turning on VSYNC would help:

myGraphicsDeviceManager.SynchronizeWithVerticalRetrace = true;

Edit:

Sorry, I see you've already done that. I missed it on the first read.





Re: XNA Game Studio Express Why does my displayed mesh dim when rotating on an LCD TV?

ImagineNation

Wow just tried it with fillmode.solid ... and guess what, the brightness level does not change! It stays bright and normal!

That explains why I have never noticed it in my games.

So looks like it's JUST something related to fillmode.wireframe -- not a big deal after all !

And it definitely can;t be the scaler or a lighting problem.

I'm very curious though -- what is it about wireframe that does this


Has anyone else seen this with wireframe mode




Re: XNA Game Studio Express Why does my displayed mesh dim when rotating on an LCD TV?

ImagineNation

Nope. Tried with it on and off, at 60 fps limited and full speed, made no difference.

But with fillmode.solid it goes away. Looks like it's strictly related to fillmode.wireframe AND LCD tv's ...




Re: XNA Game Studio Express Why does my displayed mesh dim when rotating on an LCD TV?

waruwaru

maybe posting your Draw() code would help.  I wonder what happens when you take out the GraphicsDevice.Clear() call and see what effect that has.  Put a break point at the begining/end of draw, and see if you see "blinks".

EDIT: somehow it reminds me of interlace mode.  But can you even set the TV/XBox to do non-P modes






Re: XNA Game Studio Express Why does my displayed mesh dim when rotating on an LCD TV?

Shawn Hargreaves - MSFT

ImagineNation wrote:
Whenever rotating, it's dim -- as soon as I stop it's back to normal brightness.


Ah, ok. That's actually exactly what I would expect. LCD hardware takes a certain amount of time to turn individual pixels on and off (how long depends a lot on the TV) so if you are moving a single pixel object over a black background, none of the display pixels are ever going to have long enough to reach full brightness before you start them fading back to black again.

That's just the way things are with LCD screens. It tends not to be a problem for games that are drawing more realistic images than just a single pixel line on black, though (except on very early or cheap LCDs, which can be so slow to respond they are unusable for games).





Re: XNA Game Studio Express Why does my displayed mesh dim when rotating on an LCD TV?

ImagineNation

Here is my draw code:

protected override void Draw(GameTime gameTime)
{
Device.Clear(ClearOptions.Target | ClearOptions.DepthBuffer, Color.Black, 1.0f, 0);
Device.RenderState.CullMode = CullMode.None;
Device.RenderState.FillMode = FillMode.WireFrame;
BasicEffect.Begin();
foreach (EffectPass pass in BasicEffect.CurrentTechnique.Passes)
{
pass.Begin();
Terrain.Draw();
pass.End();
}
BasicEffect.End();
base.Draw(gameTime);
}

And here is the terrain.Draw() code:

public void Draw()
{
Game.BasicEffect.World = Matrix.CreateTranslation(-(Width-1) / 2.0f, 0, -(Length-1) / 2.0f)*Matrix.CreateRotationY(Angle);
Game.Device.Vertices[0].SetSource(Vb, 0, VertexPositionColor.SizeInBytes);
Game.Device.Indices = Ib;
Game.Device.VertexDeclaration = new VertexDeclaration(Game.Device, VertexPositionColor.VertexElements);
Game.Device.DrawIndexedPrimitives(PrimitiveType.TriangleList, 0, 0, Width * Length, 0, (Width - 1) * (Length - 1)*2);
}

But looks like it WAS the pixel light up time. It only occurs with fillmode.wireframe and not with fillmode.solid .... because for solid, all the pixels are turned on, so even when rotating, they never get turned off, so they are already lit and threfore there is no delay time for them to achieve requried brightness. But when rotating, They might have to wait through 5 or ten draws before a line is rotated back onto them again -- and even then they're only lit for one frame and then back off again ... so they never manage to achieve the proper brightness!

Thanks Shaun and others who posted, an interesting problem, you'll only encounter it for LCD screens .... (NB I wasn't running this through the xbox at all, I don;t have one, I just have my PC to connected to the TV so I can do my coding/debugging on a 3-foot screen ... :-) )