I'm trying to get UV coordinates on a tessellated stroke by using the path advancement.
It nearly works, but where there are straight line segments joining other segments with tight angles, the tesselation creates large triangles. The inside and outside parts of the line are different lengths and the UVs end up drifting as we go along the path.

This image shows 10 cycles of the normalized advancement along the path.

This wireframe shows how the tessellation contributes to this.
For correct UV, I'd want the UV values to be equal along a line normal to the path. This happens in the curved segments because they're tessellated with a lot more triangles.
Some possible ways to resolve this issue would be:
- As well as
advancement, as a property of StrokeVertex, if we could also have the advancement of the nearest point on the path to this vertex (usually this will be the same as advancement, except at some corners)
- Perhaps easier, but less preferable, would be an option to increase the triangulation of straight line segments in a path.
I'm trying to get UV coordinates on a tessellated stroke by using the path advancement.
It nearly works, but where there are straight line segments joining other segments with tight angles, the tesselation creates large triangles. The inside and outside parts of the line are different lengths and the UVs end up drifting as we go along the path.
This image shows 10 cycles of the normalized
advancementalong the path.This wireframe shows how the tessellation contributes to this.
For correct UV, I'd want the UV values to be equal along a line normal to the path. This happens in the curved segments because they're tessellated with a lot more triangles.
Some possible ways to resolve this issue would be:
advancement, as a property ofStrokeVertex, if we could also have the advancement of the nearest point on the path to this vertex (usually this will be the same as advancement, except at some corners)