View Full Version : Contour Rendering

06-06-2004, 01:36 PM
I want to render a surface made up of several triangular facets accoring to the height information. In grey shade this is easy as all I do is to specify the intensity by factoring the height information. Thus going around each side I simply use the commands

glcolor3f height1*fact,height1*fact,height1*fact
glvertex x1,y1,z1
glcolor3f height2*fact,height2*fact,height2*fact
glvertex x2,y2,z2
glcolor3f height3*fact,height3*fact,height3*fact
glvertex x3,y3,z3

Is there a way of altering the color index so that I can achieve a colour contour using the same principle as above. If I try to specify red for one vertex and then blue for the adjacent vertex, then I would like to control the transition colours in between.

06-06-2004, 10:33 PM
a 1D texture works wonders for height based contour data.

06-07-2004, 08:04 AM
Thanks for the info. I will try that tonight.