Hi there!
I’ve been working on my final year project at university for a little while now and have just created a landscape for things to take place on. I’ve been coding in OpenGL for a good while now, but every time I create a landscape and calculate the normals I get the feeling something is going wrong.
The algorithm I’m using is the standard “calculate every face normal, then work out the vertex normal by adding together the face normals from all the faces surrounding the vertex and averaging them”. I must have checked the code for this a million times but something still isn’t right…
Certain areas of the landscape end up getting an odd chequerboard pattern on them. This is an example of what appears:
http://www-users.york.ac.uk/~adk105/weird.JPG
http://www-users.york.ac.uk/~adk105/weird2.JPG
and a regular view of the landscape:
http://www-users.york.ac.uk/~adk105/landscape.JPG
So… basically I want to know if this is a common occurance based on the angle of the light, or whether it indicates a problem somewhere in my landscape construction or my normal calculation.
If you would like me to post any of the code used to render the landscape I’d be glad to oblige.
Many thanks for any help you can offer!
-Andy