- Home /
Black Polygons disrupting Geometry
We developed a car driving simulation and have a annoying problem that we don’t know the origin of. So far it has not been reproducible in a reliable way.
See the attached Screenshots.
At some point, we have this flickering of black polygons that seemed to have gone rogue. Closing and Reopening the App eliminates the problem, the next occurrence can however be in a totally different area. Once you have the first occurrence, it will occur at that same point if you pass by that area multiple times. The city consists out of ~100 models that are used multiple times with different shaders. All houses, trees have been set to static. The Game needs to run the whole day long (since it is installed in a theme park), so restarting the simulation every time this occurs is not an option. The Camera on the third screenshot looks exactly to the point, where the second screenshot was taken.
I apologise for the censorship and bad quality of the screenshots. If you can think of anything (or experienced a problem of that kind on your own) I’d be glad for your input.
Update: After some further testing I have possibly some new conditions when this error can occur. This is not definitive, as I could have just been lucky/unlucky. For once, we have a script running that starts our app 30 seconds after windows boot. This kind of makes sense, as we very rarely rebooted our testing machine during development, so we never got to see this particular behaviour. However again it does not always occur. I had the first occurrence after ~50 reboots and another one on the next boot up again. The second condition for reproducing this error is, that it only seems to be there in a release build version. I compiled the exact same app with development build properties on and tested for a whole day (I stopped counting at ~150 in about 6h).
If you think a better visual of the problem could help, I recorded a video when it occurred, but unfortunately am not allowed to publish this link. So under the condition you treat it wisely, I can message you the link.
Btw. I noticed i forgot to post the platform information: Unity 4.6.8 on MacOSX (Yosemite) running on a Mac Pro with Windows 8 x64 via Bootcamp Intel® Xeon® Processor E5-1620 12 GM RAM AMD FirePro D700
With the information you gave it's a bit hard to tell what is going on here. A few things it could be:
Double-planing, sometimes called z-fighting, caused by two polygons in the exact same spot or overlapping on the exact same plane. This can often create strange flickering effects, particularly if one of them has a different material/texture. This can wreak havoc on lighting too, so lightmapped scenes with overlapping polygons can appear incredibly strange.
I am not sure if the blurring in your screenshots is from a custom-written image effect, but if it is, there might be a bug somewhere in there (assu$$anonymous$$g that the black square in screenshot 2 is not something you added in) that could be causing the black square in screenshot 2.
Sometimes, if you have a mesh that doesn't have all the necessary UVs set up, lighting (especially baked) can have very strange effects. You said it was flickering, however, which pretty much rules out this option.
$$anonymous$$aybe it's a LOD problem? Is one of your LOD meshes (probably the UVs) messed up, causing the strange appearance as your object transitions between LOD levels?
Personally, the closest I have experienced to your problem is the double-planing effect, and after baking the lights in my scene, the overlapping polygons can never make up their $$anonymous$$d about who's fragments go up on the screen, and you get stripy-looking bands of lit and unlit. As you walk past it, does it go all crazy and flicker when your camera is moving? If so, check that you don't have overlapping meshes there. I would go through and be sure that you don't have, say, a second street segment in the exact same spot as the original one.
I am far from an expert on Image effects or really rendering in general, but since the weird parts appear crisp while the rest appears blurry (as seen especially in screenshot 1), there could be some problem with how you are doing the blur.
the blurring in my screenshot come from me, as my client doesn't want me to post a clear image ;) the only thing i was allowed to leave as it is, were the flickering parts
we don't use LODs at all
im sure this is not z-fighting as z-fighting problems occur always on the same spot once you have made out one. this flickering doesnt show up every time. in fact is shows up so little, i have seen it once during a 9 month development time which makes it hard for me to test a thing.
if you need more information about the problem, tell ma what you wanna know :)
I experienced a similar thing yesterday, when having first lightmapped an object, then changing some geometry in my 3D software, and then reimporting it. Could that be something?
Honestly the promlem is so strange that it would be hard to find an answer even with the complete project. I would try re-baking the lightmap, if you are using baked lights. If you are using any custom shaders, image effects, or procedural materials, I would check those, although the fact that appears so rarely would mean that it would need to be controlled by a script that is failing to handle a certain rare condition properly. If you aren't using script-controlled shaders, then I doubt shaders will be the problem. If all else fails, roll back your project to a point where you know the provlem won't occur. Unfortunately, with such a rare and strangely behaving problem, it's tricky to find the source.
Your answer
Follow this Question
Related Questions
URP server build 1 Answer
RenderTexture.Create failed: format unsupported 0 Answers
Particles not rendering correctly when fog is enabled. 3 Answers
Weird reflection artefacts on mesh imported from Zbrush? 1 Answer
U5 shader coming out solid black on newer iOS devices (iPad 2 Air / iPhone 6) 1 Answer