How to apply a (in c# generated) normalmap right in Unity? (basic questions)
I am currently creating a new iteration of my procedural planet pipeline, and struggle a bit how to apply a by c# script generated normalmap right.
To make sure I do things right while searching for the bug, I have a bunch of basic questions how to use normalmaps in Unity3D.
a) When using a normalmap for a mesh, do I still have to apply the vertice normals to the mesh as well? Or will a normalmap "overrule" every information in Mesh.normals?
b) Am I right that a normal for a normalmap has to be applied always in tangent space, in difference to a vertice normal that is applied in worldspace?
What I mean, when I create a flat plane mesh that faces east (or x), a unmodified vertice normal would have to face in east direction (= Vector3(0,1,0) ) as well where for a normalmap the created vector stored in the texture has to face into z direction (= Vector3(0,0,1) because a normalmaps "up" direction is always in z-direction. So once the normalmap is then applied to the east-facing plane the normal vector would then be rotated to east direction according to the plane. Is that right?
Thanks a lot if you could clarify these points. I am afraid if the answer to question a) "yes even with a normalmap vertice normals are needed as well and they even depend on each other" then there might be more questions :-)
Thanks a lot everyone that can help me here!! Joerg
Your answer
![](https://koobas.hobune.stream/wayback/20220612234950im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
normal map issue 0 Answers
How to show a normal map on the INSIDE of a mesh: POSSIBLE? 1 Answer
Incorrectly low scaling on sprite bumped normal maps 1 Answer
Do I need to select texture when use Normalmap? 1 Answer
Normal map seams 0 Answers