Search Unity

Unity 5 causing graphical glitches (eg. in Courtyard and Viking Village sample projects)

Discussion in 'Editor & General Support' started by JeffersonTD, Dec 22, 2015.

  1. JeffersonTD

    JeffersonTD

    Joined:
    Feb 5, 2013
    Posts:
    268
    I first encountered some glitching in my own proto project, but I thought that was due to some weird problem with my shader (which did work properly in Unity 4 btw.). Now I tried the Courtyard demo project from assets store, and I'm experiencing similar, weird, seemingly random issues. Check the screenshots below:

    courtyard1a.jpg vs. courtyard1b.jpg

    courtyard2a.jpg vs. courtyard2b.jpg

    Just due to some small changes in the position or angle and stuff creepily appear in front. So what is causing this? Even if I would have old graphics drivers that wouldn't support something, fallback shaders should prevent stuff like this from happening, right? My hardware otherwise isn't really that old - whole set bought last year. And I did now update my video card driver and it might have been that it fixed lighting issues in the scene, but other than that, there are still the problems shown in the above picture.

    I don't play games much in general so can't say for sure that similar things wouldn't happen in other games, but I have played at least Outlast this year, and no problems there, and I'm guessing there wouldn't be much problems with other games either. So: why is this happening in Unity? I'm using version is 5.3.
     
  2. JeffersonTD

    JeffersonTD

    Joined:
    Feb 5, 2013
    Posts:
    268
    I tried the Viking Village demo now and it's not working properly either. I'm getting these three errors on load:
    Failed reading from: '04/049385954893a938cd297f9b46f42dd0.rpc.sse'.
    Failed loading probe set data for hash: 0x049385954893a938cd297f9b46f42dd0
    Error adding system: Data not available.
    I'm not sure if those really matter, and in any case they probably aren't related to the graphical issues. The problems with Viking Village are not as critical as the downright glitchiness of what I see in the Courtyard project, but very bad nevertheless. Just look at the screenshots below. Some of the objects are just very dark whereas some surfaces don't appear to be shaded as they should.

    village3.jpg village4.jpg village5.jpg

    Why is this? Can it for some reason cause problems that in addition to Unity5 I still have Unity4 installed?
     
  3. JeffersonTD

    JeffersonTD

    Joined:
    Feb 5, 2013
    Posts:
    268
    No-one else has had these problems? Or no-one with ideas what's causing these? Especially the glitchiness as shown in the Courtyard shots is really disturbing! :confused:
     
  4. TruffelsAndOranges

    TruffelsAndOranges

    Joined:
    Nov 9, 2014
    Posts:
    92
    I have lots and lots of problems with the Courtyard demo. However, not specifically the same problems as you.
     
  5. JeffersonTD

    JeffersonTD

    Joined:
    Feb 5, 2013
    Posts:
    268
    Thanks for the comment.

    To make the issues more clear I made a video out of it. And in fact, as I decided to make the video I noticed that after updating Unity there's now tons of more extra crap than before. Just look at how there are meshes sticking out from everywhere - and also how slightly changing the angle makes some of them disappear:


    What the heck is going on?
     
  6. JeffersonTD

    JeffersonTD

    Joined:
    Feb 5, 2013
    Posts:
    268
    No one else has experienced this? And no ideas ho to fix? This is really frustrating!

    This has made me consider switching to Unreal Engine, but unfortunately it seems that it missing the culling features of Unity's camera makes it less suitable for my needs.
     
    MrEsquire likes this.
  7. JeffersonTD

    JeffersonTD

    Joined:
    Feb 5, 2013
    Posts:
    268
    The amount of extra crap seems to also vary. Last time I tried there was less of those unwanted meshes seen than when taking the video above.
     
  8. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    Dude it just shows they dont even test there own projects in the Unity versions they release! See Unity 5.3 performance thread.. I have not tested the demo you mention but it will make them look foolish if they confirm themselves..
    Otherwise new bug specific to your hardware

    I suggest try release 5.3.1patch1 as this really should have been the final 5.3 release! And do clean download
     
    summerian, AaronC and JeffersonTD like this.
  9. JeffersonTD

    JeffersonTD

    Joined:
    Feb 5, 2013
    Posts:
    268
    But it's not just this project. The shadows are crap in the Viking Village and the rendering goes totally bonkers in my own proto project and the Courtyard demo.

    Even if it would be depending on the hardware and a rare case at that, I can't be the only one. I haven't seen any rendering problems in any of the (admittedly few) games I've tried nor Unreal Engine, so there has to be something wrong with either Unity or my Unity installation at least. But if it's about the installation, what could make it screwed in such a way that it otherwise works but rendering just fails in some places?

    I've already patched the version, but yes, I've thought that uninstalling and reinstalling Unity5 is pretty much the only step I can think of for trying to fix this, if it for some wacky reason would make a difference. Or maybe I should actually uninstall, and try Unity 5.2 instead.
     
    MrEsquire likes this.
  10. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    I just had a look at the demo. The messages that I got (the ones you posted) indicated that it is related to some baked data, that became invalid and can't be used properly. Because of that, I baked the lighting, occlusion culling and navigation mesh again. I reopened it to check whether the error message is still appearing and it didn't. And even better, when I hit play, everything seemed to work properly.
     
    JeffersonTD likes this.
  11. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Hi,

    If on a mac, please try with the older 2x opengl setting in player settings. The reason for this is 5.3 introduced a new renderer, a unified gl back end. So try the alternate option, and report a bug please.
     
  12. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    I had this very issue on previous versions of Unity (5.1 I believe), when the lighting data was stale. Didn't make sense to me, but I deleted it all, cleared the GL cache, and rebuilt the lighting and everything was fine.
     
    JeffersonTD likes this.
  13. JeffersonTD

    JeffersonTD

    Joined:
    Feb 5, 2013
    Posts:
    268
    I'll post a quote from myself from the Unity 5.3. performance thread here too as this thread is in the end a more appropriate place for this and the bolded part is related to what I just found out... :

    So ...

    Thanks for the comment. Are you referring to the Courtyard demo or the Viking Village demo? Because I have mostly been talking about the Courtyard demo, but the error messages are from Viking Village. And did you have similar problems before doing the baking?

    I wasn't familiar with the baking systems, but navmesh baking can't be the issue in either Courtyard or the Viking Village. In Courtyard I guess the occlusion baking could be causing something like that. Then the question remains: why did it become broken in Unity 5.3? If nothing's baked, things should still work alright, just maybe performance would suffer, right? If things are baked wrongly, things can go effed up, right? But how can they end up wrong? Changes in the baking system and it not being updated for the project?


    Well, so it happens that it appears that it actually did make a difference that I went to Unity 5.3. through upgrading an existing installation rather than uninstalling and making a fresh install! After doing a fresh install of Unity 5.3. all the glitchiness of the Courtyard demo was gone!! Still no clue though as to WHY.

    Viking Village shadows were still messed up, but after tampering with the lightmap baking they got fixed. Hmh... Well, whatever the reason for those ending up broken in the first place, this was an important lesson that faulty baking can be the cause of issues like this. Still it would be nice to learn more as to why and how things got broken, but I guess I can now go back to wondering my project-specific problems. So thanks a lot for the tips Dantus!
     
  14. JeffersonTD

    JeffersonTD

    Joined:
    Feb 5, 2013
    Posts:
    268
    So you're saying you had this similar meshes being shown in wrong places and just rebuilding lighting would have fixed it? Are you sure you didn't do rebaking for occlusion culling too? I mean I don't see any problems with the shadows per se in the Courtyard demo, just the Viking Village.
     
  15. JeffersonTD

    JeffersonTD

    Joined:
    Feb 5, 2013
    Posts:
    268
    Hmm.. I'm mostly working on a PC, but perhaps the issues here are related to that new renderer then?
     
  16. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Yes, that's exactly what I'm saying. Rebaking the lighting data solved it for me.
     
  17. JeffersonTD

    JeffersonTD

    Joined:
    Feb 5, 2013
    Posts:
    268
    Uh, does someone (maybe @Dantus ?) have any idea how baking lighting could fix the meshes like that? Isn't baking light maps just basically related to how textures are rendered?
     
    Last edited: Jan 1, 2016
  18. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Obviously the data changed, and corrupted the vertexes. But I'm done replying to you. You don't ever check anything.

    Case 714011 - Static batching results in bizarre geometry

    Response was: work around it by Rebaking the lighting.
     
    Last edited: Jan 1, 2016
  19. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    Broken data leads to wrong results. Whenever you have error messages in the console, you can't expect a correct execution anyways.
    GI involves a lot more than just baking something into a texture. Unity calculates between systems, how they affect each other regarding the indirect lighting. If that is broken, the result gets completely wrong. You find more information e.g. here:
    http://blogs.unity3d.com/2014/09/18/global-illumination-in-unity-5/
     
    JeffersonTD likes this.
  20. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    I just had another look at the Courtyard scene, because I was surprised that there was no appropriate feedback about what is wrong. However, there is actually some accurate feedback in the console. When I opened the scene, I got:
     
  21. JeffersonTD

    JeffersonTD

    Joined:
    Feb 5, 2013
    Posts:
    268
    "I don't ever check anything"? Isn't that a bit harsh? When you don't know what to check it's hard to check it, right? I don't really know what you are referring to. I did try to search for related problems of course, but when I don't know the cause it's harder to search. And intuitively glitchiness like this definitely sounds like much more than just lighting-related!
     
    summerian likes this.
  22. JeffersonTD

    JeffersonTD

    Joined:
    Feb 5, 2013
    Posts:
    268
    Thanks for the link and explanation. I had only checked this page:
    http://docs.unity3d.com/410/Documentation/Manual/Lightmapping.html


    Hmh... :| I had opened the courtyard project and scene several times, so I would have thought I'd noticed an error logging like that (just like I noticed and posted the Viking Village one). Well, maybe I'll try to reproduce the problem again by going back to Unity 5.2.2 and then update to Unity 5.3 by not doing a fresh installation.

    Still wondering though how it got corrupted in the first place. Don't those come with the project?
     
  23. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    If they make changes, sometimes it is necessary to break the compatibility. Maybe it is a bug, maybe not. Just read what's written in the console and resolve all issues.
     
    JeffersonTD likes this.
  24. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Ok, I'll go back on my declaration and respond one more time. A Bit harsh? No, I don't think so. Once, maybe so. But two different threads?

    When I said I saw this before and had to rebuild the lighting -- did you do it? No, you dismissed it as irrelevant an appealed to anyone else to back you up. Fair enough, you don't have to take my advice.

    In your other thread, you have a DLL that won't work. Did you try selecting the platform and build target in the build settings? No, you just argued, and basically dismissed my input again. (I still think you need to select the correct build platform and target in the player settings. It's not just for building -- either that, or you compiled your DLL for 32 bit instead of "any").

    Your questions show a lack of understanding how software actually works. Nothing wrong with that, but maybe you should look into a basic C# or .Net course.
     
  25. JeffersonTD

    JeffersonTD

    Joined:
    Feb 5, 2013
    Posts:
    268
    Two different threads for two different topics, right? So you mean I failed to do checks in two different threads? Well...

    No. That's not what happened. I appreciate you trying to help, and I would have taken your advice and done what you said if the problem hadn't been fixed already, as I said in the post before replying to your post. I understand if you didn't notice that considering the length of my post, and I could have been more explicit about the problem already having been solved by mentioning that in the reply I posted to your post too. But at that point I would have had to somehow break the project again in order to try rebuilding the lighting. So can't really see ignoring doing any checks there.

    And the reason why I asked for others for input was not to disrespect you or imply that I wouldn't believe you but the fact that in your previous post you had said "Didn't make sense to me, but I deleted it all". From that I got the impression that you only knew that what you did helped, but you didn't know why. So I thought maybe someone else knows.

    I didn't want to argue or dismiss your input, just ask what you meant. For that case I admit though that I could have ignored my earlier misconceptions and gone through the documentation for build settings or otherwise been less blind about the "Switch platform" button, so sorry for that.

    Well, I tried switching the platform and making sure it was what it used to be and is supposed to be, and removing and adding the .dll after that. No help from there unfortunately. And thanks for the suggestion to check the architecture of the dll. That didn't help either though.

    I somehow doubt that would help with the .dll problem or be particularly helpful in Unity development in general. Well, I may be wrong about that, but that would still hardly be just "checking" something.

    Summa summarum, I appreciate you trying to help, and I admit that I could have investigated more carefully before asking again in the other thread. In this thread however, not so much so, so yes, I still feel it was a bit harsh.
     
    Last edited: Jan 1, 2016
  26. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Ok - fair enough, I missed that you rebaked and reinstalled and it worked. My apologies. But that's not why I was suggesting a development course. I was referring to your question as to why bad data could cause something else to go wrong. In short, it's because unity is written in c++, and loading data that doesn't match your internal structures can overwrite some other memory -- which is what I'm assuming happened with the lighting data. It's a common thing to happen in C++ when you change your structures (and don't account for it). This could also happen in C# and .Net framework as well (though some don't believe it), because quite often you have to marshal the structures, and pass the pointers to a C++ function somewhere. Think of it this way - You have structure that is 100 bytes. You tell the computer to load 200 bytes at that location. Where does the second 100 bytes go? Well, it either goes sequentially after the first 100 bytes (overwriting whatever is supposed to be there), or it generates a page fault (wrote to memory that doesn't exist).
     
    JeffersonTD likes this.
  27. JeffersonTD

    JeffersonTD

    Joined:
    Feb 5, 2013
    Posts:
    268
    Hmm... I checked that blog entry, and yes, apparently more complex than just baking something into a texture or as I earlier more precisely meant, baking the lighting related rendering rules on the objects. Maybe I missed something or didn't eg. realize how the lighting rules for the surfaces are stored, but from what I understood, it still just adds rules based on which to calculate how certain surfaces should be rendered. I couldn't see how even with broken or architecturally deprecated data things could appear in places they shouldn't appear in, if just considering reading and acting on the lighting data.

    But if the reason is more about what Jaimi described, that's a whole different deal...
     
  28. JeffersonTD

    JeffersonTD

    Joined:
    Feb 5, 2013
    Posts:
    268
    Thanks.

    Thanks for the elaboration. So having bad data (or perhaps more like data with an obsolete structure?) for lighting could make it use the data for lighting for something else? I understand the page fault principle or getting data where it doesn't belong, but find it somewhat surprising if this could cause lighting data to "spill" like that, and perhaps even more surprising that things work at all, if some data is read as a description of something it wasn't written as a description of. Unless I'm still misunderstanding something of course.
     
  29. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    For the GI, everything is split into systems that impact each other. Unity stores which systems influence each other. If that is broken, you get completely wrong results. If a system that is very far away is erroneously considered to be affecting one that is currently in view and the far away one is culled, you are getting very interesting results.
     
    JeffersonTD likes this.
  30. JeffersonTD

    JeffersonTD

    Joined:
    Feb 5, 2013
    Posts:
    268
    Alrighty, thanks for clearing that up. It's good to not only have a thing fixed, but also to have some kind of understanding what caused it in the first place. So what I wrote in response to Jaimi perhaps doesn't really happen? (or at least doesn't need to happen for these errors).

    I wonder if someone has used or will use this kind of "interesting results" to their advantage to create some peculiar effects or mechanics in a game. :)
     
  31. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    Just as a quick note: I am not sure whether this is exactly what happens. It looks to me like this could explain the effect that can be noticed, but can't proof it. What exactly happens in detail doesn't matter at the end of the day. What's important is to always get rid of all the warnings and error messages in the console. That's the only solid basis you can have to get predictable and stable results.
     
    JeffersonTD likes this.