Best way to create a pen without balls. Resolved!

Hi everyone, some of you may have made a basic brush, using line and linecapmode round. This works beautifully with full opacity, but as some of you know you end up with these balls which are left from the intersection. The only way I have tackled this is to create a mesh and triangulate the points adding spacing and direction using touch delta. This works fine… until about 400 vertices… so what I want to find out is a more efficient, better looking solution that doesn’t have balls and doesn’t require the triangulation of vertices every frame. Any ideas are welcome, thanks.

Not tried, but two thoughts:

(a) Can you draw full opacity to a separate drawing context, and apply to the final buffer with the appropriate blend mode?

(b) Why do you triangulate every frame? Could you just retain the mesh and add to it?

@daveedvdv I’ve literally just finished doing (a) as you posted, this is fast enough yes. Thanks. And also good point, I could insert new vertices to the old one.

Glad you found a good solution!

(a) would have been my suggestion

(a) is what I do in Harmony.

I was a bit curious when trying out your app if you also had used (a) to make it fast. If you try out photoshop on iPad, you can see that they also use (a). :slight_smile:

@tnlogy that will be in the next update :slight_smile: along with using (a) on the smooth pen and a new sketch pen and quite a few other small things.

Thanks to all for your suggestions.