Can I stretch a spline mesh without stretching its material, too?

I have a fairly simple spline mesh for the visualization of an orbit. I stretch it out to arbitrary length, i.e. my orbits are quite big and I have one spline mesh in between every consecutive spline points.

When I apply my zebra-style material, the material gets stretched, too.

How can I make sure that the material doesn’t stretch, i.e. looks the same regardless of the length of the spline mesh?

use a material that is not UV aligned, but world-aligned.

2 Likes

I am struggling now how to combine the node “WorldAlignedTexture” with “GeneratedOffsetBands”. The latter “procedurally generates a horizontal or vertical band from the default TextureCoordinates”. Its output is float, not Texture2D.

And I realize, I want the scale of the texture to be independent of the static mesh. WorldAlignedTexture does that. But as the docs say:

“The WorldAlignedTexture function serves as a way to tile a texture across the surface of an object in world space, independently of that object’s size or rotation.”

… it does too much for me. The texture is still supposed to rotate with the mesh, just ignore its size.

This is my solution:

I switched from “GeneratedOffsetBands” to a file-based texture for the stripes. And I am multiplying the texture coordinate with the object radius. In my case, it’s sufficient to multiply the v-coordinate as my mesh is cylinder that appears with varying length but constant diameter.

5 Likes

There also is a checkbox when creating meshes from within Unreal Editor: World Space UV Scale.

Creating my cylinders with this option enabled didn’t result in the desired effect, though. As can be seen in the picture.