Skip to content

Stroke Tessellation: advancement does not give accurate UV coordinates #915

@timmb

Description

@timmb

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.

Path showing advancement

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

Wireframe of 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions