Toon shading model

That is just some highschool math.

  1. normal direction of any given point on a sphere is:vertexPosition - spherePosition
  2. 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
  3. 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)
  4. Finally,use result to override GBuffer.WorldNormal(if you have that custom normal mat node).
  5. You can also do some lerp between vertexNormal and Calculate Normal.

3.jpg

Let me call the NEXT GEN ANIME!!!