Search Unity

Flickery Textures

Discussion in 'Editor & General Support' started by SophieHoulden, Mar 23, 2009.

  1. SophieHoulden

    SophieHoulden

    Joined:
    Mar 19, 2009
    Posts:
    20
    not a great description, but when I move the camera close to a face it tries to do some wierd jittery shading, which is especially wierd as when the camera is pulled back a little its fine.

    the image I attatched is of an imported .3DS file, but it happens with regular Unity primitives too, is there a fix for this?
     

    Attached Files:

  2. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    errors like these are commonly caused by 2 faces that are coplanar (this means identically oriented) and nearly identical in position, so they are an error in the used model itself.
    Such coplanar faces will start to fight for which one is rendering where due to the restricted precision of the depth buffer.

    Never have 2 near identical faces if you are not looking for trouble.

    To fix that you need to remove one of those faces thats overlapping there, this should solve this problem.
     
  3. PolyMad

    PolyMad

    Joined:
    Mar 19, 2009
    Posts:
    2,350
    Looks like you have overlapping polygons in there, try check that.
     
  4. SophieHoulden

    SophieHoulden

    Joined:
    Mar 19, 2009
    Posts:
    20
    indeed it does look like that but its not the case I'm afraid, all the polys have plenty of distance and it the issue occours even with a single plane I drop in. :(

    I have found what seems to be the cause though, I had two directional lights in the scene, after removing one the problem has gone away, not sure why it would cause this type of issue though...
     
  5. br0kenp0ly

    br0kenp0ly

    Joined:
    Jun 3, 2008
    Posts:
    481

    It seems that you had a directional light with a hard shadow that was almost parallell to that wall, so that could be the reason you got that ugly shadow artifact.