PDA

View Full Version : Building Surfaces "Flickering"... Causes?


TrainMan12
December 4th, 2008, 10:56 PM
Hi. Lately, on my heavily modified version of Summer Lake Pass, the surface of buildings in some areas "flicker" when the camera angle is changed.

Here are some shots: Notice the change of light and brightness on the buildings. They will change between the two depending on camera angles in this particular area.
It Only happens in certain areas. Other areas are fine. The buildings themselves can be placed elsewhere and this problem does not occur, so this rules out the objects themselves. This doesn't appear to happen on other rouets, and it appears (not 100% sure) to have started on this route not too long ago.
I have a GeForce 8600 GTS with 256MB of memory.
Does anybody know what's causing this and how to fix it?

http://img114.imageshack.us/img114/4968/screen007copysy1.jpg

http://img267.imageshack.us/img267/8333/screen006copypi3.jpg

http://img114.imageshack.us/img114/4968/screen007copysy1.jpg

rweber95
December 4th, 2008, 11:40 PM
Try switching between DirectX and OpenGL.

Bob

TrainMan12
December 4th, 2008, 11:47 PM
That appears to have worked. Thank you!

john259
December 5th, 2008, 02:33 AM
It can also be caused by two flat surfaces in exactly the same place, in which case move one of them a small distance if possible.

John

TrainMan12
December 6th, 2008, 03:11 AM
Does anybody know what causes this? (Besides John's explanation)

Is there a corruption of some sort in Trainz?

steamdrivre
December 6th, 2008, 03:35 AM
It's really a matter of vid cards, drivers, and application software.

I'd like to know if there is a fix for the 'smoke hiding behind the vegetation' thing? Sometimes the loco smoke will be in front of vegetation and sometimes the smoke will hide behind the vegetation.:confused:
Is there a remedy for this illusion???

Thanks,
Rick

bnsf50
December 6th, 2008, 04:51 AM
I think John hit the nail on the head. That building has windows in it, it appears. Windows are on a seperate plane placed next to the interior of the wall. If it is too close then its hard for the vid card to seperate the two in Trainz, thus the flickering occurs at ceratain distances. If you move up close the flickering should demimish, the further away you get the more pronounced it is. It's simple for the creator to fix, they just have to ,move the glass plane a few more inchs away from the wall, as John was saying. I've had to do it myself.

TrainMan12
December 6th, 2008, 10:54 AM
It seems like other buildings are doing it as well. Strange that it never used to do this. (Or so I thought)

JCitron
December 6th, 2008, 02:43 PM
John and BNSF50 are correct. This is caused by the z-buffer in the video card's in ability to display two very close objects. They are called co-planar faces and they flicker as the z-buffer tries to display both at the same time.
The z-buffer is the part of the video card circuitry that takes the content from video memory and outputs to the display.

To eliminate this problem totally, the original model maker should have kept the two faces apart by a pixel or two more rather than paste both poly-faces on top of each other.

I learned about this from a friend of mine that is a 3D-modeller and a teaches people how to use 3DS-Max and older 3dS4.

John

TrainMan12
January 14th, 2009, 06:43 PM
Sorry to drag back an old thread, but this just bugs me.

The flickering only seems to occur sometimes in certain areas. Buildings such as water towers also flicker, so it's not a problem with the video card's ability to display two close objects.

The thing that bugs me THE MOST about all of this is that it never seemed to happen before. I just hate when something is wrong. Anybody else know anything on this, or have the same problem?

CoosYellowknife
January 14th, 2009, 07:23 PM
I'd like to know if there is a fix for the 'smoke hiding behind the vegetation' thing? Sometimes the loco smoke will be in front of vegetation and sometimes the smoke will hide behind the vegetation.:confused:
Is there a remedy for this illusion???

Thanks,
Rick

I do not beleve this is can be fixed. I have spent many years in other games (like second life) The use of alpha channel in the vegitation and in the particals is the cause of this. When two alpha textured items are close this seems to happen. This is very anoying querk of alpha channels in sumulations like this In second life hair can seem to vanish at times. Some walls are see through.

TrainMan12
January 14th, 2009, 08:30 PM
The only thing that I find strange is how the problem just started. I can't remember exactly when, but I don't remember it when I installed Trainz on this computer.

Sylvicolus
January 19th, 2009, 01:17 AM
I'm wondering 2 things. Did you mean that the white brightness actually flickers on / off while looking at the building but without moving the camera? Then the problem may be as described above. Or did you mean that the white brightness changes only when you move the camera and view from an angle where the "sun" position is reflecting off of the building? -- which is what seems to be the case in your screenshots. You said you can place the buildings elsewhere and not have the problem. But are they placed at the same exact angle (object rotation)? I noticed in 2009 especially that the textures with normals can reflect a lot of sunlight at certain angles. Don't know if that is the case here. But you can see how the shaded side of the building is darker. So looks to me to be a problem with sunlight glare. No clue on how to adjust it.

bnsf50
January 19th, 2009, 01:37 PM
But you can see how the shaded side of the building is darker. So looks to me to be a problem with sunlight glare. No clue on how to adjust it.

Try turning the gamma setting down a few notches.

Is this happening on all of your routes or just one? If it's happening on all of your routes then it may be a video card issue. If it's only happening on one route then there may be an object in the area that is corrupted slightly and is confusing the video card. It could be any thing from a ground texture to a 3d object.

TrainMan12
January 20th, 2009, 01:40 AM
I'm wondering 2 things. Did you mean that the white brightness actually flickers on / off while looking at the building but without moving the camera? Then the problem may be as described above. Or did you mean that the white brightness changes only when you move the camera and view from an angle where the "sun" position is reflecting off of the building? -- which is what seems to be the case in your screenshots. You said you can place the buildings elsewhere and not have the problem. But are they placed at the same exact angle (object rotation)? I noticed in 2009 especially that the textures with normals can reflect a lot of sunlight at certain angles. Don't know if that is the case here. But you can see how the shaded side of the building is darker. So looks to me to be a problem with sunlight glare. No clue on how to adjust it.

It's definitely not sun glare. The objects will "flicker" as the camera angle is changed. This also happens when it's night time in the game. I've been noticing that sometimes (sometimes they don't flicker at all) the buildings will flicker when first viewed in the game, but after viewing them for a bit them they will stop. It's almost comparable to something that's loading.

BNSF50, this is the only route I really use in Trainz, so I'm not too sure about other routes. I haven't noticed it though.

If something's corrupted, it would be nearly impossible to locate, correct?

Winterpaw
January 20th, 2009, 02:04 AM
its called z-fight

more info here: http://en.wikipedia.org/wiki/Z-fighting
(http://en.wikipedia.org/wiki/Z-fighting)
there are several fixes for this behavior on a design level by just changing the depth of overlapping polygons.

other fixes would include tweaking the buffer interface to the directx/opengl layer, which Auran would have to do, or ensuring the opengl/directx/graphics drivers are all playing nicely with each other-- your experience may vary.

bnsf50
January 20th, 2009, 12:48 PM
its called z-fight

more info here: http://en.wikipedia.org/wiki/Z-fighting
(http://en.wikipedia.org/wiki/Z-fighting)
there are several fixes for this behavior on a design level by just changing the depth of overlapping polygons.

other fixes would include tweaking the buffer interface to the directx/opengl layer, which Auran would have to do, or ensuring the opengl/directx/graphics drivers are all playing nicely with each other-- your experience may vary.

If its the windows that he is looking at then you and I are correct as stated in some post's above, however if its a building or object loosing all of its texture, going white then I don't think its a Z buffer problem but rather a corrupted asset or a video card going bad.
More information needed. Try some other routes Trainman and see if the same thing happens on them and let us know.

TrainMan12
January 20th, 2009, 01:38 PM
The buildings do not go completely white and loose their texture. They just seem to change to a lighter state, but still retain their texture.

leeferr
January 20th, 2009, 01:55 PM
I've got the flickering problem with a couple of pieces of my content and have discovered that it's caused on these pieces of content by two planes being too close together in the mesh. There are no alpha layers involved with these textures. I haven't had time to fix them and upload the corrections yet, but I intend to get around to it. This issue may be some of the problem although I'm not sure why it just now showed up and wasn't there before. Had you updated your video drivers before the issue began? If it's a mesh problem, then the original creator will have to fix it.
Mike

TrainMan12
January 20th, 2009, 02:02 PM
If its the windows that he is looking at then you and I are correct as stated in some post's above, however if its a building or object loosing all of its texture, going white then I don't think its a Z buffer problem but rather a corrupted asset or a video card going bad.
More information needed. Try some other routes Trainman and see if the same thing happens on them and let us know.

Well, I tried it on another route and I get the same problem. The problem now seems to happen when the time is forwarded to night.

Must be a video card issue.

bnsf50
January 20th, 2009, 03:04 PM
Well, I tried it on another route and I get the same problem. The problem now seems to happen when the time is forwarded to night.

Must be a video card issue.

It may just be a video card setting. You can go into the video card settings through your desktop video card properties and make sure that all of the sliders are set to max. Also make sure that your drivers are up to date.
You can also, and this would be the first thing I would try, Change from Direct X to Open GL or visa-verse in Trainz Options.

TrainMan12
January 21st, 2009, 12:29 AM
I tried switching to DirectX but some textures are blank. This really isn't a HUGE deal for me as the flickering will go away, I'm just VERY relieved to know my Trainz installation wasn't going down the toilet.

willblunden
January 23rd, 2009, 05:03 PM
Have been having the flickering building problem too. Was okay on older PC with Nvidia FX 5200 vid card. Since replacing PC with one using Nvidia Geforce FX 5950 Ultra this problem has started. Most noticable on NZ low poly houses, but on a lot of other buildings too. Effect disappears when close. Changing from directx to openGL makes no difference. Doesn't seem to be viewing angle but distance, further away more flickering across windows. Have tried changing card settings but a few times but no better result yet. This is in both TRS2004 and 2006. Haven't noticed this in other games.
Cheers Will

bnsf50
January 24th, 2009, 01:34 PM
Have been having the flickering building problem too. Was okay on older PC with Nvidia FX 5200 vid card. Since replacing PC with one using Nvidia Geforce FX 5950 Ultra this problem has started. Most noticable on NZ low poly houses, but on a lot of other buildings too. Effect disappears when close. Changing from directx to openGL makes no difference. Doesn't seem to be viewing angle but distance, further away more flickering across windows. Have tried changing card settings but a few times but no better result yet. This is in both TRS2004 and 2006. Haven't noticed this in other games.
Cheers Will

If the flickering is across the windows go back and read post #7 for the answer. If its the whole building then that's a different story.

willblunden
January 24th, 2009, 03:20 PM
If the problem is caused by the alpha channel of the windows, is there a way to overcome this in card settings? This didn't seem to happen on low specs PC with different vid card. More noticeable on lighter coloured buildings and some fence splines too, like chain link fence. Some light coloured locos like UP U50 flash when rounding curves.
Cheers Will
This may help: add the line, "-znear=0.80" to trainz options. Found this in Trainz Objectz, seems to work to some extent, any higher number than this and cabs don't render properly in cab view. Worth trying anyway. Flickering effect doesn't seem so obvious.

billm001
January 25th, 2009, 07:50 AM
This didn't seem to happen on low specs PC with different vid card.

I got the same thing happening also since upgrading to more RAM and a big video card..... flickering on some buildings that never did before.

Annoying but I can live with it.... :wave: