Not understanding a step in Your first 3D shader

Godot Version

4.3

Question

I was following the your first 3D shader and observed that for changing the texture of the planemesh and for calculating the normals for lighting, two different noise textures were used. Why is this the case? Even with pseudo random number generation, the seeds have to be the same to get precisely the same texture. If we use two separate textures each using noise, wouldn’t the two not correspond to each other? When I used normalmap using the second texture with use as normalmap set, as shown, a lot of shadows came in spots as if there were a lot of irregularities, which I didn’t understand either. Could someone explain why this happened? Making a noise texture per vertex(as per the first noise texture) shouldn’t create so many irregularities

Kind of depends on the implementation, but if they are identical, using the same seed, how are you combining them?

I have not been successful using the normal map feature from noise generation.

But it could be a bug.

I sort of forgot but I think I have partly solved this. So a normal map appears to have much softer noise, and the sentence in the documentation appears to be referring to the fact that the material which is uneven is very smooth. When you apply the noise normal map on the noise generated texture, it applies the shape of the normal map as a texture to each square of the plane mesh, affecting its visible texture, making it seem grainy. I believe that’s what the documentation aims to achieve as I can see no visible difference between the before and after of the normal map, unless it means the very slight difference in texture, which can be achieved by adjusting the size of the texture or changing the number of octaves from 5 to 3.


And here in the documentation it states that it transforms the original noise into a bump map which probably needs to be much softer.

The sentence asking whether different random textures would conflict was flawed as the normal map is being applied on top of the mesh, not modifying the mesh’s shape much.

Thanks for the response!