Computing Normals for "Smooth by Angle" Shading Like Blender
cprimozic.net·79w
Preview
Report Post

Background

As part of some other work I was doing that involved programmatically manipulating 3D meshes, I encountered the need to compute normals for them from scratch.

Usually this isn’t necessary since applications like Blender handle doing this automatically. But in my case, I was doing these transformations dynamically and in the web browser for my Three.JS application. If I wanted normals to shade my transformed meshes, I’d have to compute them myself.

“Smooth by Angle” Shading

There are two “simple” shading models available:

  • Smooth shading - where the normals of each vertex that is shared by more than one face share gets a single, averaged normal
  • Flat shading - where each vertex is duplic…

Similar Posts

Loading similar posts...