I need some thick textured line segments. Actually I need curves made out of short line segments. Been messing around for a couple days and I’m start to lose my freaking mind. Here is what I have:
http://n4te.com/temp/lines.png
In the upper left is an example of two connected line segments. Below that shows once the lines are given width, they overlap. If I apply a texture that uses translucency, the overlap looks terrible. Below that shows what I’ve come up with, I move both segment endpoints away from each other half the amount necessary to make the thick line corners just touch. This way I can fill the space between the lines with a triangle. On the right you can see this works well (ignore the horizontal line when the crappy texture repeats).
But it doesn’t always work well. In the bottom left there are many short line segments, to represent a sharp curve. Note the curve is jagged along the edges. So many triangles so close together causes some strange anomalies, I guess from triangles just barely overlapping. I’ve played around with this a lot, but I’m having a tough time preventing this.
Is there a better/easier approach than what I’m doing? I assume this has been solved many times by others, but I’m not able to find much online that is applicable. I guess it is called line tessellation or stroke tessellation or some such thing. I would appreciate any help you might provide!