Texture density in spline mesh

How to force spline mesh actor to distribute textures UV evenly along a mesh?

Let’s consider an road segment that is rectangle with 16x16 subdivisions.
Depending on tangents distance from spline nodes internal geometry density vary thru mesh length.
And this is ok, because that is how splines works.

Issue is that texture UV is also distributed in some parts denser, in some sparser.
At image you can see center line is denser closer do the ends of mesh:

Same segment with longer tangents would work in opposite way:

This is generally k - that is still how spline works, especially when mesh is bended it is sure that inner part of curve have to be denser, outer - sparser.

But for this particular purpose - I would like to modify UV of textures to have same step thru world coordinates after spline actor modifies mesh. At least for center line of texture.
Right now there is fixed step for each subdivision, what is correct unless spline mesh actor starts to bend this mesh.
I guess I have to change something in spline mesh to recalculate UV (in this case only U) coords to make texture density uniform in world distances, not per subdivision.

Is there an option for that in spline mesh? Or any way to have access to this UVs in each subdivision node of mesh, and be able to calculate world coords after spline mesh actor modified original mesh?

Any advices for that? Thanks :slight_smile:

you could put the tangents in the center of both points and rotate them around their respective origin?

yes, equal tangent lengths is kind of workaround, but I would like to have full freedom of tangents lengths to be able to do all the fancy shapes that spline allows, but this sometimes need to use short or long tangents.

That is why I am looking at way to manually set UV for all vertices with U-coord that goes with true length of spline centerline.

you’ll have to code some blueprint then to get the spline length into the material so you can do the math. this is totally up to you if you wanna tackle that. i can’t realy help with that.

the default behaviour of spline geometry is just that.