I'm asking this question on behalf of a friend so can't provide any images for now. The problem is to simulate a car paint material with some flakes or graininess in it. This is first done in blender by creating a material. The flakes are added by using flakes normal map which simulates all the perturbed normals. I suppose this causes micro variations which causes the base color to drop at random locations giving the effect of graininess.
Now blender provides a normal map node which is used in the shader graph. This has a strength parameter. When the strength is 0, there are no flakes. I searched around the net and found that this effect is probably achieved by lerping between the sampled normal from the normal map and the vector 0.5, 0.5, 1
which seems to be a null or flat normal as it maps to 0,0,1
in the tangent space which means no change.
The question is, as I understood, changing normals should affect the reflections on the surface, however when I change the strength in blender between 0 and 1, only the graininess changes and the reflection remains the same. When I say the reflection should change, I mean the position of the reflection should change, since the reflection vector would change based on the normal. This doesn't seem to happen in blender. Are they using the plain original normals for reflection and the perturbed ones for other kind of shading?
He implemented the same technique in threejs and it seems the reflections don't change there as well. However, instead of lerping between the sampled normal and 0.5, 0.5, 1
when we lerped between the sampled normal (after converting it to -1 to 1) and the original geometric normal based on the strength, the reflections on the surface moved as I expected. Can anybody explain what happened? What's the difference between the 2 approaches and why in only the second approach the reflections move or change their position?
UPDATE:- Turns out there was a slight error in triplanar mapping. After fixing it, the reflections do change positions slightly when implemented in threejs. So now the reflection change position in threejs implementation both ways but I still don't understand why the same doesn't happen in blender. Will update if I figure it out eventually