Search Unity

Mesh flickering [Video inlcuded]

Discussion in 'Editor & General Support' started by gianelli98, Jul 29, 2019.

  1. gianelli98

    gianelli98

    Joined:
    Mar 15, 2017
    Posts:
    8
    Hi, I got a problem with my game, when the camera moves forward or backward the mesh in front start flickering.
    I tried changing clipping planes, shadow distance, shadow cascades, light pixel count and anti aliasing also.
    The mesh is scaled 0.1 with the import options.

    There is a video that explains the problem and sorry for my bad english:
     
  2. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,620
    What flickering are you referring to in the video? I'm not seeing anything, maybe video compression is hiding it or something?
     
  3. gianelli98

    gianelli98

    Joined:
    Mar 15, 2017
    Posts:
    8
    Yea the compression is hiding a lot, you have to set to HD and fullscreen to see the problem, focus on the wall in front, on the top face of small bricks coming outside from it, if its too hard to see I'll upload a new video later.
     
  4. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,620
    Right, are those bricks modeled in or are they normal mapped?

    I'm pretty sure the issue is coming from the fact that those faces are very thin, so when they change between 1, 2 or 3 pixels thick it's very noticeable. This is exaggerated by their high colour contrast with the surface behind them.

    If they're modeled in I'd consider making them stick out a little further, and maybe softening the angles to reduce the contrast.

    If they're normal mapped in I'd make sure that all of the texture maps have mipmaps and are set to use trilinear filtering, then play with the anisotropic filtering.
     
  5. gianelli98

    gianelli98

    Joined:
    Mar 15, 2017
    Posts:
    8
    They're modeled in and with MagicaVoxe, so I can't smooth them to continue with our style, I'll try to stick them out so
     
  6. gianelli98

    gianelli98

    Joined:
    Mar 15, 2017
    Posts:
    8
    Changing size of these faces didn't change anything, anyway yea it seems to be like you said, unity dont handle light on these faces but I dont know how to fix this
     
  7. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,620
    Can you get us a screenshot in PNG format so that we can see what it looks like? The compressed video isn't very useful.
     
  8. gianelli98

    gianelli98

    Joined:
    Mar 15, 2017
    Posts:
    8
    This error appears also in the scene so I did a screenshot when I go further with camera on the object. (I tried changing angle of camera to dont be exactly in front of the object and the more is facing the object the more these artefacts appears)
    First.png Later.jpg
     
  9. gianelli98

    gianelli98

    Joined:
    Mar 15, 2017
    Posts:
    8
    I did a screenshot of light settings, imported mesh (voxel importer) settings and material also.

    light.png

    material.png

    mesh.png
     
  10. gianelli98

    gianelli98

    Joined:
    Mar 15, 2017
    Posts:
    8