vilya / OBJViewer

A 3D viewer for Wavefront .obj files

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Calculate vertex normals when the model doesn't provide them

vilya opened this issue · comments

If a model doesn't provide vertex normals at the moment it doesn't display very nicely.

We could handle this a lot better by calculating them. Just need to average the normals of all faces using the vertex.

I've committed an initial stab at this, but it's not quite right yet.

Found the bug and fixed it!