I've really had a great time reading the book and working on the raytracer, but from now on I'll have much less time to work on it so progress will be quite slower. I've put what I have on GitHub for anyone who wants to take a look:
How did you implement this? I tried, but my generated normals look really odd.
What I did: 1. During OBJ parsing, build a list VN of all vertices V with an associated empty normal vector. 2. For each face F from the OBJ file, generate standard triangle shapes via fan triangulation, this also computes the triangle normals N as described in the book. 3. For each vertex A, B, C of the current triangle, add N to the normal vector of the respective vertex in VN. Keep count of the number of triangles that share this point. 4. Divide all normal vectors in VN by the number of the triangles shared by this point. 5. Generate smooth triangle shapes for all faces by using the vertex normals from VN.