TX2D 3.1.5 Beta - Screen flickers for random objects changing size (pink is transparent)
by Will O-Reagan · in Torque X 2D · 06/07/2010 (3:56 pm) · 23 replies
Build: 3.1.5 Beta
Platform: Windows 7 and Xbox 360
Target: Xbox 360 / Windows game
Issues: When flicking through objects which are resized, screen tends to flicker on one specific object. Not sure how pronounced this is throughout game, as only got to first screen and found the issue.
Steps to Repeat:
1. Start a new game with 3.15, basic no GUI
2. add these 5 classes, and images and level www.modernintrigues.com/bugreporting/
3. build and run
4. flick x box controller up and down, and press A on the "Start" button, you will notice flickering. More so on 360 platform, but still quite noticeable on windows platform.
Suggested Fix: See below, changed T2DSceneObject
Platform: Windows 7 and Xbox 360
Target: Xbox 360 / Windows game
Issues: When flicking through objects which are resized, screen tends to flicker on one specific object. Not sure how pronounced this is throughout game, as only got to first screen and found the issue.
Steps to Repeat:
1. Start a new game with 3.15, basic no GUI
2. add these 5 classes, and images and level www.modernintrigues.com/bugreporting/
3. build and run
4. flick x box controller up and down, and press A on the "Start" button, you will notice flickering. More so on 360 platform, but still quite noticeable on windows platform.
Suggested Fix: See below, changed T2DSceneObject
About the author
I have a degree in dramatic art, and literature, from UC Santa Barbara. I've worked for a few studios, also at Animax Ent in 2008, and some smaller studios. Currently studying Computer Science at CSU Channel Islands.
#2
Anyways, theres alot of bugs in this new release. I'm sure it has something to do with how things are being hashed or deleted, like the bug I already found with the Sound Manager.
06/07/2010 (11:07 pm)
Not really, my later GUI's are way more intricate, and then this is not the final art. I will eventually be resizing and moving everything.Anyways, theres alot of bugs in this new release. I'm sure it has something to do with how things are being hashed or deleted, like the bug I already found with the Sound Manager.
#3
06/08/2010 (6:40 am)
Just a thought, but maybe this could be related to the layering issue... I mean, having objects switch layers is something I have never seen before, besides maybe the sorting point bug, but that was totally different. It could be related to what is causing the flickering.
#4
This lead me to believe it had something to do with the start.png file. However if I changed one of the other gui objects to use the start material the flicker did now show up.
I'll look at this again tomorrow but I am a little stumped at the moment.
06/08/2010 (5:42 pm)
Will - this is a very odd bug and hard to track down. When I was testing it on the Xbox it only seemed to effect the "Start" object and none of the others. Changing the material for that object made the problem go away.This lead me to believe it had something to do with the start.png file. However if I changed one of the other gui objects to use the start material the flicker did now show up.
I'll look at this again tomorrow but I am a little stumped at the moment.
#5
06/08/2010 (7:08 pm)
ok, i guess I'm just the guy with the freaky png... lol
#6
06/25/2010 (4:26 pm)
Logged as TQA-440.
#7
07/03/2010 (1:42 pm)
You may be happy to know, I have honed in on an issue with this. I have recently added several "pink" objects to the game, to test lights and things... and i'm seeing more "strange" behavior.. so i think it may have something to do with the color pink
#8
07/04/2010 (7:47 am)
I'm not sure if it's related, but the default Color Key value in XNA is magenta (RGB:255,0, 255), i.e. pink. I believe XNA converts it to transparent when it processes the textures. You can disable color keying in the properties of your images in VS.
#9
07/04/2010 (10:56 am)
Well then, that's very interesting to know. Because the two objects I was messing with, I had created in Corel Draw, by setting their RGB to 255, 0, 255, and they were "transparent" that was the problem! I'll mess with it a bit and see if I can get you some more information.
#10


Basically what I see is a black border, and the pink is all rendered as transparent.
07/04/2010 (12:47 pm)
Just adding these materials to a scene, is odd.. they don't render at all, pretty much.

Basically what I see is a black border, and the pink is all rendered as transparent.
#11
07/04/2010 (12:54 pm)
I remade another image in photoshop, black border, pink middle, same thing.. no render of the "pink" i have to think theres a bug somewhere someone is missing.
#12
Those are still the 255,0,255 pink. Heck, even with transparency in pngs they still use it as a transparent color(in my sprite font pngs I have an 8 pixel padding of pink around each character along with the normal transparency around the letters).
07/04/2010 (1:06 pm)
Its no bug, XNA sees that color as transparent. Well thats already been answered, but I'd stay away from pure pinks like that just in case.Those are still the 255,0,255 pink. Heck, even with transparency in pngs they still use it as a transparent color(in my sprite font pngs I have an 8 pixel padding of pink around each character along with the normal transparency around the letters).
#13
07/04/2010 (4:00 pm)
Thats good to know.. man i feel silly for creating this thread in the first place, but you never know what could turn out to be an issue.
#14
Besides the magenta thing your OP issue is an actual bug in the rendering infrastructure introduced in the 3.1.5 beta, so don't feel silly... yours is a good catch ;)
07/09/2010 (5:44 am)
@Will:Besides the magenta thing your OP issue is an actual bug in the rendering infrastructure introduced in the 3.1.5 beta, so don't feel silly... yours is a good catch ;)
#15
It was working just fine before installing the final 3.1.5:
07/22/2010 (2:37 pm)
This bug is nastier than expected. The translucent particles are affected as well: there is a magenta/blueish flashing showing in the game, maybe also related to lighting. It was working just fine before installing the final 3.1.5:
#16
07/22/2010 (4:07 pm)
I did once see a little pink particle thing similar to what you are experiencing there, but it disappeared. by the way, just doing normal lighting and no specular seems to be much better for me, just fyi. Lights collide funny when i do specular, it looks really weird.
#17
07/22/2010 (4:15 pm)
That conic structure is what I'm talking about about lighting, thats one of those annoying things thats been frustrating, that looks like a specular light collision, right about the base of that pyramid, opposite the weird pink particle.. this is interesting, I may take a look into this too at some point, though .fx files are far above my head.
#18
07/22/2010 (10:09 pm)
Well my wild guess is that it's an alpha blending issue: the blending has been turned off in the wrong place. I'm looking into this to understand what has been changed.
#20
Add the following to Line 201:
Line 632 and 650: Remove the following line from BOTH FlipX and FlipY:
Line 665: Remove the following lines before _worldClipRectangle returns:
Let me know if this works out okay.
07/27/2010 (12:14 am)
Fixed. It looks like the spatial data wasn't being refreshed every time it was set (Alongside being set dirty in situations it shouldn't have been). Make the following changes to your T2DSceneObject.cs file:Add the following to Line 201:
public virtual Vector2 Size
{
get { return _size; }
set
{
if (_size.Equals(value))
return;
_size = value;
IsSpatialDirty = true;
UpdateSpatialData(); //Add this lineLine 632 and 650: Remove the following line from BOTH FlipX and FlipY:
public virtual bool FlipX
{
get { return (InheritMountFlip && IsMounted) ? MountedTo.FlipX : TestFlag((TorqueObjectFlags)T2DFlags.FlipXFlag); }
set
{
_SetFlag((TorqueObjectFlags)T2DFlags.FlipXFlag, value);
IsSpatialDirty = true; //Remove this line from FlipX and FlipY
if (Collision != null)
Collision.MarkCollisionDirty();
}
}Line 665: Remove the following lines before _worldClipRectangle returns:
public RectangleF WorldClipRectangle
{
get
{
if (IsSpatialDirty) //Remove this line
UpdateSpatialData(); // Remove this one too!
return _worldClipRectangle;
}
}Let me know if this works out okay.
Torque 3D Owner Henry Shilling
Smokin Skull