I have written a small app that imports height data and constructs a quadstrip height field, I colour all quads green(grass).
I wish to shade the terrain according to elevation(ie highest light green, lowest dark green).
I managed this once before using lighting, I entered the vertices coords as the normals then did something daft with the lighting and it worked although it was flat shaded. I can not seem to recreate this.
I have tried another approach using colours for each vertex instead of lighting, but there is a horrible banding which matches horizontally but not vertically(this is probaly because I am drawing a quadstrip across, then dropping directly down and drawing another until the height field is drawn.)
does anyone know where I can get some examples, or can help
Hmm…this answer may be very stupid but:
Why don´t you caculate proper vertex-normals
for your vertices instead of taking the vertices as normals?I see no serious problem then with the lighting.
Why dont you use different colors for the vertices depending on height .
It works very good for me .
Scale the height position so it fits between 0.3 and 1.0 and set the color for each vertex in your height field .
This works great with texturized terrain .