Quote Originally Posted by User137 View Post
I think the issue with sphere is about making the faces. Normals should be generated with the function that is used with terrain as the idea was to check if it generates them right.
Exactly!

Quote Originally Posted by User137 View Post
Normal for vertex:
- Make a temporary vector T and initialize it 0
- Also start a integer variable Counter = 0
- Start a for loop that goes through faces (F), Next for loop going through each vertex in that face (V), Pick each face that connects to the vertex V and belongs to the same smoothing group as face F:
- - Add face normal vector to T
- - Increase counter by 1
- Divide T by Counter
- Normalize T
Yes, I am doing it exactly as you described. Thanks for your time and checking the ligting.
Getting back to cube, I've found a code for doing this at the sulaco webstie.