That is just some highschool math.
- normal direction of any given point on a sphere is:vertexPosition - spherePosition
- Then,you set a spherePos var via BP,so if you mesh is a sphere,and spherePos is just equal to it’s object position.The normal direction is obvious: vertex WorldPositon - spherePos
- But you know that you mesh is not a sphere,so the length of the normal vector may != 1.And you normalize it:normalize(WorldPositon - spherePos)
- Finally,use result to override GBuffer.WorldNormal(if you have that custom normal mat node).
- You can also do some lerp between vertexNormal and Calculate Normal.
Let me call the NEXT GEN ANIME!!!