Search Unity

UV overlap issue: Artifacts being made just by moving the prefrabs in a scene

Discussion in 'Assets and Asset Store' started by Isaiah626, Oct 16, 2021.

  1. Isaiah626

    Isaiah626

    Joined:
    Oct 3, 2020
    Posts:
    12
    Hi everyone.

    Quick Disclaimer. I'm a bit of a noob so this might be some dumb mistake I'm making. So I got this Urban City Builder asset and I'm making a new level by rearranging some prefrabs in the scene.
    Whenever I view it in game mode everything I moved starts to clip(go invisible sometimes). I don't know why since all I've done was move it's position and rotate it to be where I want. All the other object that weren't moved are fine.
    The warning message in the console said there are objects in the scene with overlapping UVs. I tried baking the scene again with global illuminationand the errors are gone but still have the same issue.
    What am I doing wrong?
     
  2. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Overlapping UV warnings are for baking and should not affect visibility. If you mean you are having clipping problems, it could be the scene view camera settings. To fix this, click an object in the scene view and with the mouse over the scene view, press F.

    This should focus on it / adjust clip ranges for you.
     
    Isaiah626 likes this.
  3. Isaiah626

    Isaiah626

    Joined:
    Oct 3, 2020
    Posts:
    12
    First off, thanks for the quick reply. Yes I think the problem's called clipping but the solution didn't work. I can already see it in scene view.
    In the demo scene, when I run it in game view all newly added objects/prefrabs and even those that were only moved or rotated seem to be clipping. The ones I left untouched are just fine though.

    I've attached two gifs showing to sides of the scene with road blocks, the first one was exactly how it was in the demo scene, the second gif shows the road blocks I duplicated, rotated and moved. I haven't done anything else and it starts to clip.

    Also I tried a lot of random fixes and the warnings are gone but the issue is still there.
     

    Attached Files:

  4. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Those gifs look like frustum culling problems. This can happen if you've been manipulating meshes (combining them) and so on without taking care of the mesh bounds property. This means Unity might think the mesh and it's dimensions could be elsewhere. To debug that, read the mesh bounds and debug draw them somewhere visible.

    Alternatively it could be occlusion culling settings but judging by the angles it's basically a bounds problem. Are you being forthcoming with what you did before and after this issue occurred?
     
  5. Isaiah626

    Isaiah626

    Joined:
    Oct 3, 2020
    Posts:
    12
    I've recorded myself from start to finish. I made a new project, imported the package, loaded the demo scene and viewed it in game mode. Works fine. I then deleted the railways and ran the scene again then boom; clipping (going invisible then occurs). To show it even further at the end I adjusted and rotated some road blocks and it clipped but when i set it back to the original position it's fine.
    It's like any slight change to the demo scene makes it fall apart.

    I've never had this problem making levels before. Seeing is believing so see for yourself. Please help; I've been pulling my hair trying to figure it out
     
  6. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    This is something the author of that asset should provide support for, it's not a Unity problem. https://www.reversedinteractive.com/ is their support site.

    Or talk to @ReversedInt


    Suspect you should try rebaking umbra (occlusion culling) if you moved stuff. This is still an author problem though as they should make clear they've set up the scene to use culling and so on.
     
    Isaiah626 likes this.
  7. Isaiah626

    Isaiah626

    Joined:
    Oct 3, 2020
    Posts:
    12
    Will do, thanks.

    Edit:Spelling
     
  8. Isaiah626

    Isaiah626

    Joined:
    Oct 3, 2020
    Posts:
    12
    Fixed. I just had to rebake the Occlusion data by doing the following:

    Windows/ Rendering/ Occlusion Culling. Then clear and bake again