Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Help Wanted Why are there artifacts in my normals of my procedural mesh?

Discussion in 'General Graphics' started by Sezze, Jan 17, 2021.

  1. Sezze


    Dec 28, 2017
    I generated a heightmap which I used to generate a terrain (using a custom mesh). There are however these artifacts in the shape of a grid in my normals.

    The mesh is divided into chunks, but those borders are not visible due to manual normal calculation, these grid patterns do not follow the mesh bounds. The artifacts are identical if I use mesh.RecalculateNormals() instead of doing it manually, only visible difference is the seam between meshes.

    This is also visible in lit shaders, when the lighting reacted oddly to the seams I thought it was an issue in my textures but this shows up in these unlit shaders only showing the normals.

    I'm using HDRP if that matters.

    This black and white image shows the y component of my (world) normal, ie. how much it's facing up. (In this case this is shown with an unlit shader with the value squared to exaggerate the artifact).

    I have also drawn in the scale, so the grids are about 8 units in size, and the approximate size of a quad is also drawn in. The size of a quad is exactly one by one units in size.

    In this lower picture it is just straight up the world-space normal shown as a color.