normal vectors


i have a question about normal vectors. i’m currently trying
to write a library that uses opengl. i choose buffer objects
to store my models. now i decided to add light, so i needed
normal vectors. i made an attempt and i didn’t like the result.
so i sat down and started to thinking. with the buffer objects you can define one normal vector for each vertex. i figured that this is not going to work. to draw a cube, for each vertex
you need three normals, by logic, one for each side. i
opened 3ds max to check and it is like that. am i wrong?
how can i achive this in openGL?


Ensure you have enough verticies.
Therefore each face of the cube should have it’s own set of vertex and normals in the buffer object. It’s more verticies than theoretically needed, but is the only way you can achive this in OpenGL so that you have the correct normals at each vertex.

is this the most common technique? and for the large models?
i imagine this will affect the memory and not the performance,

For large models, you don’t usually have many sharp corners like in a cube. So there’s no need to duplicate most of the vertices.