dilevin / computer-graphics-meshes

Computer Graphics Assignment about Meshes
1 stars 6 forks source link

Confusion about per-vertex normals #31

Open BlackSpade741 opened 4 years ago

BlackSpade741 commented 4 years ago

I am a bit confused about how to calculate per-vertex normals. As the order in the assignment suggests, we should do per-vertex normals before we start working on vertex_triangle_adjacency, but as I understand from the formula, we are supposed to average the normals of all faces that a vertex is involved in, and having vertex_triangle_adjacency implemented would be handy for that. Am I missing something here?

Also, this is in per_vertex_normals.h:

image

This should instead say per-vertex normals right? Since we are calculating the normals for each vertex, and the size of the matrix seems to agree with that.

songfeil commented 4 years ago

Do we really need vertex_triangle_adjacency? Think about what can we do when iterating all the faces?

BlackSpade741 commented 4 years ago

I guess you don't need it per se, but isnt it a similar idea?