PDA

View Full Version : Transparency Coloring & Concave Forms



ofer_bz
03-15-2001, 12:28 AM
I am having problems coloring concave forms (a star for example) with transparent colors.
The regular color functions do not apply to concave forms when trying to use transparent colors.

Any suggestions ?

Thanks,

Ofer

Relic
03-15-2001, 02:05 AM
Don't know if I understood your question, but OpenGL has no native support for concave primitives. Concave objects have to be assembled with multiple convex sub-primitves.

With that in mind, OpenGL does not know of concave objects and esp. glColor has absolutely no relation to the form of an object. (Though to the type of primitive with flat shading.)

Transparency on the other hand is controlled by blending and lots of constraints exist for the correct representation of transparent 3D objects. Do a search on the forum for blending and sorting.

okapota
03-15-2001, 06:14 AM
well, u probably gets artifacts, because you do not sort your polygons.
you have to render all transperent polygons from back to front. one way doing this is storing your star in a bsp tree.

-ofer-