splineMesh component deformation issues

Hi there.

There wasn’t any doc on the spline mesh component, but from the blurry screenshot I was able to decipher what it was doing and get a setup going (see my vid tut here).

I tried setting up a system of equally spaced spline mesh components by getting the length of the spline dividing up the spacing getting the start/end positions and tangents that the spline mesh components need by distance long spline.

The main issue is that the meshes don’t get deformed smoothly along the spline . They get deformed directly at the start and end points but then the mesh deformation becomes very rigid (when deforming a plane, it ran in a straight line to the next point instead of bending round). I’m wondering if this is because with the previous method of using spline points pos and tangents then they are ‘local’ and the tangents from the ‘distance along spline’ function is world? DO I need to scale my tangents?

I’m not at my workstation right now so I cant take a screenshot but just wondering if anyone had any insight.

Managed to get the deformation working. This is going to be a nice little tool for roads. I’ll be putting a tutorial together soon for this in the next few days so look out for it here


Nice work, can’t wait to see the new tutorial!

tutorial planning is going well so should be able to record them tonight. Here’s something I’ll be going over…


hi kezo, not sure if you saw this as I posted in the community thread but I fixed the issue with the deformation and the tutorial is up here…

If anyone from epic who is involved with the spline component is reading this, then please would it be possible to add a function to the spline component to return a tangent vector that hasn’t been normalized to a unit vector? It would improve the results of the splineMesh components as seen in the part 4 of the video. When using the GetLocal**atPoint function the returned tangent isn’t scaled and when that is plugged into the splinemesh tangent input, the deformation of the mesh is much smoother.

Hi Dan,

Thanks again for the great tutorials, they’ve really helped with understanding the new spline system.

I am having a problem with tangents when trying to deform a single mesh along a spline with multiple points (similar to your shrub example) except I want to deform the mesh so that it follows the spline exactly. I am able to get better results after multiplying the local tangent by a tangent scale like you did in tutorial 4 but It’s still not working perfectly and if I change the number of spline points or move them around I have to play with the tangent scale to get the mesh to deform correctly along the spline. I’m trying to figure out if there is a better way to do this by calculating what the tangent scale should be based on the number of points and distance between them. I noticed this seems to work better when there are multiple meshes along the spline as in your very first tutorial and your road example in tutorial 4 but I’m not sure exactly why.

One last question, have you figured out if there is anyway to create a spline component with more than two points by default in the component editor?

Thanks again,

I don’t think that it’s possible to deform a mesh exactly along a spline. I thinks it’s designed to only take a start and end point and deform between only those two with the tangents. In that case it would be more suitable to use a skeletal mesh and deform it with bone animation.

Yeah you sure can. I’ll try and get an example together tonight.

I had a quick go at setting the spline points in blueprint. If you read the 4.3 release blog post it tells you how.

You can use the AddSplineWorldPoint and SetSplineWorldPoints blueprint functions. Set ‘Allow Spline Editing Per Instance’ to off.

AddSplineWorldPoint will add a single point and you can use for loop and create points or even daisy chain up multiple of these with MakeVector nodes to create the posiitons. The other way is to create a variable array and make it a Vector type then feed that array into the SetSplineWorldPoints function node. You can then enter default values into the array.

The other interesting way to create spline is that you could create them in maya, max or blender and write a script to write out a csv of the spline points positions. Then you can read in that csv file in UE4 and use the data to initialize the array and hence the spline points. You could even create multiple splines in one blueprint (I’m thinking about a tree tool here).

There is a problem I found in that it doesn’t display on the screen if you set the points manually so there is no way to verify if it came in or not.

I was about to record a video but its late so i’ll probably do it tomorrow.

Ah ok that makes sense I was thinking of it more like a deformer in Maya or 3DSMax where the object is extruded along the spline; makes sense now it’s more like a control curve.

This could be very useful, it’s a shame there isn’t a direct way to currently import splines into UE4 from other 3D packages. It could be useful as a way to have a backup of spline information, it would be a major PITA if you had a whole level of spline meshes and had to update the blueprint and lost all the splines that had been placed.


Your tutorial was great! I was able to create an editable array to change the width at each point along the spline. (I wanted to make normal splines along each of the points to edit the width, but I was unable to make them editable after creation.)

If you add points in Blueprint then you can’t adjust them in the editor correct?

Has anyone figured out how to calculate the scale for a Vector at Distance?