Search Unity

Light going trough seams of meshes

Discussion in 'General Graphics' started by gorbit99, Mar 16, 2017.

  1. gorbit99

    gorbit99

    Joined:
    Jul 14, 2015
    Posts:
    1,175
    I have a mesh in my scene that is basically a voxel grid with marching cubes algorithm thrown at it, and for some reason like just decided to go trough some of the seams:

    It's very weird and I just can't fix it
     

    Attached Files:

  2. brokenm

    brokenm

    Joined:
    Aug 28, 2014
    Posts:
    17
    Is there any baked lights? If so, try to use "Directional" light maps instead of "Directional Specular".
     
  3. gorbit99

    gorbit99

    Joined:
    Jul 14, 2015
    Posts:
    1,175
    Nope, it's procedurally generated, so I didn't add baked lights
     
  4. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    8,378
    Try set your light's normal bias to 0.0
     
    gorbit99 likes this.
  5. gorbit99

    gorbit99

    Joined:
    Jul 14, 2015
    Posts:
    1,175
    I'll try it when I can access my computer
     
  6. gorbit99

    gorbit99

    Joined:
    Jul 14, 2015
    Posts:
    1,175
    Sorry for not answering to this thread, I was really busy
    Problem is, that with a normal bias of 0.0 moiré patterns start to show

    EDIT:
    For some reason it's gone, thank you
     
  7. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    8,378
    That moire pattern is shadow acne. You have to increase the light bias when you set the normal bias to zero. It might also show more or less depending on the shadow resolution and cascade.
     
unityunity