TGEA 1.7.1 - Visible cloud pixels
by Konrad Kiss · in Torque Game Engine Advanced · 09/28/2008 (9:30 am) · 9 replies
I am not sure about whether this is in TGEA only or not - this is where I've seen this.

When I start a mission, my clouds look ok. Then I try to turn off my GUI elements - I am turning off everything as far as I can tell, so there's no HUD at all. Then I turn them back on, and I see the clouds pixelized (A). Even when I see the horizon as well (B). Then turning the GUI back off and looking at only the sky still has the pixely clouds (C), but when I turn the cam to render the horizon (terrain? fog?) the clouds jump back to the correct blurry look (D). I tried to reproduce this as much as I could, and sometimes, C was working fine (just like D).
Did anybody else notice this? My code is heavily modified already, but the sky and cloud classes are almost untouched. I understand that this may not be in connection with the cloud class, so I wanted to see if anzone has seen this problem before.
When I start a mission, my clouds look ok. Then I try to turn off my GUI elements - I am turning off everything as far as I can tell, so there's no HUD at all. Then I turn them back on, and I see the clouds pixelized (A). Even when I see the horizon as well (B). Then turning the GUI back off and looking at only the sky still has the pixely clouds (C), but when I turn the cam to render the horizon (terrain? fog?) the clouds jump back to the correct blurry look (D). I tried to reproduce this as much as I could, and sometimes, C was working fine (just like D).
Did anybody else notice this? My code is heavily modified already, but the sky and cloud classes are almost untouched. I understand that this may not be in connection with the cloud class, so I wanted to see if anzone has seen this problem before.
About the author
http://about.me/konrad.kiss
#2
09/28/2008 (11:41 am)
Tom, thanks for your help. I never would have guessed it.
#3
Try adding GFX->pushState(); before the call to GFX->disableShaders() and replace all that GFX cleanup at the bottom with GFX->popState();.
09/28/2008 (12:58 pm)
My guess would be FontRenderBatcher::render().Try adding GFX->pushState(); before the call to GFX->disableShaders() and replace all that GFX cleanup at the bottom with GFX->popState();.
#4
09/29/2008 (12:13 am)
@Andy: Thanks, I'm gonna give both a try once I get home. I haven't found the time yet to poke the source. Maybe tonight.
#5
Thanks to both of you guys for the help.
09/30/2008 (8:52 am)
It turned out to be a bad texture stage state. (Bad, as in not set up at all.) Thanks to both of you guys for the help.
#6
11/18/2008 (12:55 pm)
I'm getting this same artifact on a clean build of 1.7.1. Haven't tested on 1.8.
#7
The only difference I saw was that I had PrimBuild::End(false); -s all over to be able to use a shader to blend sky textures together (to simulate explosions behind clouds).
I've also checked a clean 1.7.1 and I couldn't see this problem. You could still check Andy's fix, it looks like a fix to a problem that's present in a clean 1.7.1.
11/18/2008 (1:14 pm)
@Stefan: When I had this problem, I had a lot of the sky code ripped apart, and I put everything back together almost the way it was. I've compared a clean version with my sky, and I could not find differences regarding texture stage states. So although that was my problem in this thread, with a clean 1.7.1, it should be something else as far as I could tell by the comparison.The only difference I saw was that I had PrimBuild::End(false); -s all over to be able to use a shader to blend sky textures together (to simulate explosions behind clouds).
I've also checked a clean 1.7.1 and I couldn't see this problem. You could still check Andy's fix, it looks like a fix to a problem that's present in a clean 1.7.1.
#8
Cool idea about explosions in the distance. Keep us "plan"ned :)
11/18/2008 (1:22 pm)
Thanks Konrad. Yeah, I was hoping his fix would help but I'm not seeing any differences. It's more apparent and visible on a dark skybox.Cool idea about explosions in the distance. Keep us "plan"ned :)
#9
Found a seam in a cloud layer though, so thanks I guess. :)
It'll be my pleasure to show it off, hehe, I like things like that. :) Except, it wouldn't serve this any justice to use my current placeholder art on it, so I'll just wait until I feel like I could do quality work on that, or find someone else who would.
11/18/2008 (1:29 pm)
I have checked with a dark skybox, but still couldn't see it. Might be that I'm already half-asleep. Found a seam in a cloud layer though, so thanks I guess. :)
It'll be my pleasure to show it off, hehe, I like things like that. :) Except, it wouldn't serve this any justice to use my current placeholder art on it, so I'll just wait until I feel like I could do quality work on that, or find someone else who would.
Associate Tom Spilman
Sickhead Games
The issue is that something rendered before the cloud is changing the mag/min/mip filter to GFXTextureFilterPoint and not restoring it.
To fix it change the GFX setup right before the cloud rendering to set GFXTextureFilterLinear on the setTextureStageMag/Min/MipFilter of the particular texture stage using the cloud texture.