normals for a terrain

BlitzMax Forums/BlitzMax OpenGL Programming/normals for a terrain

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Great!

If you care to post your code to compute the normals and average them I can see where it's going wrong.

Averaging the normals is simply a matter of summing the normals and then renormalising the result ( you don't need to divide by the number of normals in this case since the process of renormalising takes care of it).

Does your lighting look correct for the unaveraged normals? If not then perhaps it's just that your normals are pointing the wrong way. To correct that, swap the order of the cross product operation.

Hope that helps.