Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Procedural Mesh Normals

Discussion in 'Scripting' started by Coolcreation201YT, May 27, 2019.

  1. Coolcreation201YT

    Coolcreation201YT

    Joined:
    Jun 13, 2017
    Posts:
    5
    having issues with proc mesh normals, never posted here so gl to me but um I think its an issue with normals not showing, the normal map isn't showing on EAST and WEST faces in first image and when past a certain size in the second image you can see another weird issue, I think these 2 are related issues but not sure. heres code https://hatebin.com/diqlqsgkld
     

    Attached Files:

  2. ThermalFusion

    ThermalFusion

    Joined:
    May 1, 2011
    Posts:
    837
    In order for tangent space normal mapping to work your model also needs tangents as well as normals. I can't see you generating any tangents in your code.
     
  3. Coolcreation201YT

    Coolcreation201YT

    Joined:
    Jun 13, 2017
    Posts:
    5
    Tangents? Im not familiar with them, ill give them a search and see if thats what i need, if it doesnt work ill get back to you, Thanks!
     
  4. Coolcreation201YT

    Coolcreation201YT

    Joined:
    Jun 13, 2017
    Posts:
    5
    Would you be able to link a good video on them? I cant seem to find anything relevant.
     
  5. ThermalFusion

    ThermalFusion

    Joined:
    May 1, 2011
    Posts:
    837
  6. Coolcreation201YT

    Coolcreation201YT

    Joined:
    Jun 13, 2017
    Posts:
    5
    im not sure because the recalculate tangents I think it fixed the face not showing normal map but the blackness is still there and it seems that the SizeX and sizeZ don't represent values , like it could be 30x60 with sizeX 60 and sizeZ 60