Download

[FIXED] Weird distortion on spline mesh component (not twist/roll related)

hello,

i’m trying to make an array of static meshes using BP spline mesh nodes.

I’ve got it working using “at position along spline” nodes, but i’m experiencing weird deformations on each static mesh at their end and start points. Basically, the vertexes at the end and start point are getting compressed along the spline.

I tried the same thing with “at spline point” nodes and the distortion doesn’t happen (as shown in the attached image).

Anyone else experiencing this issue?

1 Like

UPDATE: In case anyone is interested.

I’ve found the culprit. It’s the end and start tangent. Since we don’t have manual control over individual tangents in “at position along spline”, UE4 assumes a tangent magnitude.

This magnitude must be scaled according to the size of the spline mesh objects.

The simplest fix is to multiply the start tangent and end tangent by a float roughly the length of the spline mesh object.

2 Likes

Thanks! I have setup the spline mesh to allow scaling based on the spline mesh scale by using GetScaleAtSplinePoint and using X & Y for SetStartScale from the current spline index, and then the same GetScaleAtSplinePoint (using X & Y) for SetEndScale. The spline component itself was set to bAllowDiscontinguousSpline in the blueprint.

To fix the twisting, one of the in/out poles had to be “scaled” super-small–moved close to the spline point so that the pole is very short. It’s usually one of the nearby spline points which causes twisting on the current point (not always the point itself).

This seems to occur most on hard-right-angles. Making the overall spline shape more curved also helps alleviate twisting.