PDA

View Full Version : touching parallel polys, but not same color



croce
11-21-2003, 07:57 AM
Hi,

I have a flat rotating concave polygon and some lighting. The concave polygon has the form of a 'T', it is build from two rectangles.

When the 'T' is rotating, at some angles, the two rectangular polygons are not equally lit and you can see my T is build from two polygons. This looks rather ugly.

glShadeModel(GL_SMOOTH) doesn't seem to help much because I am using GL_QUADS, not strips or something else.

How do I use lighting and have the same color for the whole of my concave 'T'-polygon?

Thanks.

jleffelm
11-21-2003, 10:50 AM
Originally posted by croce:
Hi,

I have a flat rotating concave polygon and some lighting. The concave polygon has the form of a 'T', it is build from two rectangles.

When the 'T' is rotating, at some angles, the two rectangular polygons are not equally lit and you can see my T is build from two polygons. This looks rather ugly.

glShadeModel(GL_SMOOTH) doesn't seem to help much because I am using GL_QUADS, not strips or something else.

How do I use lighting and have the same color for the whole of my concave 'T'-polygon?

Thanks.

Try making your quads out of multiple triangles, or multiple quads. The more verticies you have, the better the lighting will look. Check out:
http://www.opengl.org/developers/code/features/KilgardTechniques/oglpitfall/oglpitfall.html
Point number 2 discusses just this issue.

-Drew

croce
11-21-2003, 01:13 PM
Ok, I guessed somewhat that that would be the problem.

I managed to get 'acceptable' result by using a trianglefan for the T, and quadstrips for some other letters. Better tesselation is postponed till I have some routines... http://www.opengl.org/discussion_boards/ubb/smile.gif

Thanks for the link! I hadn't seen much of the website yet.