PDA

View Full Version : Smoothing, masking, or blending?



phr0zen
06-30-2005, 05:08 PM
hello, what is the simplest way of converting
a bunch of polygons like these

http://addwiz.cjb.net/this.bmp

into

http://addwiz.cjb.net/intothis.bmp

im prolly missing something simple..
the polygons have 15 diferent color variations,
i did the polygons like this
glColor4ubv(@PL[Code]); //
glVertex3f(P.X, P.Y, height);
glVertex3f(P1.X, P1.Y, height);
glVertex3f(P3.X, P3.Y, height);
glVertex3f(P2.X, P2.Y, height);

thanks!

mikael_aronsson
06-30-2005, 09:32 PM
Hi !

If you need sharp edges between the color zones it mightbe a little more difficult, turning on "smooth" mode will interpolate between the colors to blend the colors together, but as I said, you will not get sharp edges between the colors.

Mikael

phr0zen
07-01-2005, 03:58 AM
so, what are my options, thats about the only thing i got left to figure out..i need somebody to point me the right way. :)

thanks!

ZbuffeR
07-01-2005, 04:46 AM
A first try :

glColor4ubv(color); //
glVertex3f(P.X, P.Y, height);

glColor4ubv(color1); //
glVertex3f(P1.X, P1.Y, height);

glColor4ubv(color3); //
glVertex3f(P3.X, P3.Y, height);

glColor4ubv(color2); //
glVertex3f(P2.X, P2.Y, height);