3d polygon tesselation.

hi guys,

im working on a project aiming to draw type on ribbons in 3d.
for each character, every vertices is positioned onto the surface of the ribbon so that the type wraps around it.

in ofGraphics i added support for 3d vertecies so i can draw the type in 3d rather then the default 2d setting.

this is all fine and dandy for outlined type.
although when i fill the type it works until the surface starts to bend out past a certain point.
here’s a video to demonstrate… note the type distorting and dropping triangles where the ribbon bends.

here is another image to demostrate the bug im getting,

i suspect it’s an issue with the way GLUtesselator renders the polygons in 3d inside ofGraphics.

can anyone advise on how to get around this?


I’m not sure you can use the tesselator to triangulate non planar surfaces. Are your points for the polygon all on the same plane ? I’ve seen this kind of thing before w/ 2d tesselator that will not create a “mesh” for a polygon whose vertices are not on the same plane. I think I may have had this problem with the triangle library, but can’t remember offhand.

you might need rather a 3d mesh generator then a tesselator, since you’ll need to create interior points, etc. The tesselator just breaks down a shape into thin triangles… cgal might be helpful for this, I’ll poke around and see if I find a mesh generators that could help.

take care,

yeah the points are not planer… they wrap around the surface of the ribbon.
its interesting that tesselation fails after a certain angle.
will look into the cgal 3d mesh generator, thanks for the suggestion.


Yeah this doesn’t look like a bug.
I think once some of the points are facing 180 degrees away from the adjacent points the math for the tessellator just won’t make sense.

Looks really nice though!