Smooth Shading
I realized that making objects out of a million faces wasn't working. This is an example of smooth shading by changing the normals for each vertex in the mesh.
The old way was to set each vertex on a face to be the same normal which resulted in blocky lighting effects.
The new way is to calculate a new normal based on the old normals from adjacent faces. There are a couple loops in place that go through the list of faces, check every point to see if a particular point is shared by another face, and used the shared-face's normal to change the resultant smooth-shader normal.
The torus you see here is made of 400 faces--it's the lowrez version from the last entry.
Resume
0 Comments:
Post a Comment
<< Home