1

So I am reading obj files and make lists to store the vertices, texture vertices, normal, vertex texture and normal indices. Testing this with a cube results in 8 vertices and 6 normals but there are 24 items in the normal indices list.

Can anyone explain why this is as I am a little confused right now?

genpfault
  • 51,148
  • 11
  • 85
  • 139
Bluehand
  • 43
  • 1
  • 4

1 Answers1

2

The OBJ format is designed for Gouraud shading, with one normal per vertex; rather than flat shading, one normal per polygon. Pick a cube face, go through the file data and write down the normal indices and normals. You'll see why.

Hugh Fisher
  • 2,321
  • 13
  • 8
  • 2
    Pretty sure vertices and normals are not (necessarily) one-to-one; each vertex can correspond to up to the same number of normals as the number of faces which share it – meowgoesthedog Dec 09 '17 at 22:35