3D chart

Hi,

I’m interested in 3D chart creation, and I have some 3D problem:

my chart is a surface in space and the y axis is divided in 10 diferent region. So every points between two region have the same colour.

The surface is formed from rectangles. So the problem is how to fill corect every rectangle?

Thanks.

Hi!
Polygons are usually filled. Setting the alpha to less than 1 makes them partially transparent. Why won’t your rectangles fill?
Barry

Originally posted by bsperlin:
Hi!
Polygons are usually filled. Setting the alpha to less than 1 makes them partially transparent. Why won’t your rectangles fill?
Barry

You don’t understand the problem…

So, I must fill one rectangle with different colours, depending on the y values for the rectangle surface points.

Just set the color of each vertex based on the y value and the colors across the quad will be interpolated. You can also use a 1D texture and base your texcoords on the height if you want custom colors.

Just make sure that smooth shading is turned on.

Chris