Home Unreal Engine

[UE4] Blueprints- Spline mesh that spans more than one spline point?

polycounter lvl 6
Offline / Send Message
Stu2Prof polycounter lvl 6
Hi guys I am trying to make a cable spline in UE4 blueprints similar to this one and am wondering if it is possible to span a spline mesh across multiple spline points. I want to create some very long cables with little details and conforming them to just one spline point makes it a bit repetitive. Does anyone know how I could do this? I have tried adjusting the index for the end point to be more than 1 of the start point but that just causes an odd effect where the order of the spline points seems to get messed up.

The blueprint I'm using


Replies

  • poopipe
    Options
    Offline / Send Message
    poopipe grand marshal polycounter
    You can do it, just specify start and end positions as distances rather than points.

    It's a bugger sorting out the tangents automatically though so might not be ideal. 

    Things get a bit involved if you want to make long things with spline meshes.  If you're wanting to do it a lot it's worth sitting down and coming up with a robust, generalised solution.

  • Stu2Prof
    Options
    Offline / Send Message
    Stu2Prof polycounter lvl 6
    What is it particularly about the tangents that becomes a problem? strange rotations?

  • Stu2Prof
    Options
    Offline / Send Message
    Stu2Prof polycounter lvl 6
    I suppose one solution would be if I could swap out cable segments between points. But I'm not sure how I would go about starting something like that
  • poopipe
    Options
    Offline / Send Message
    poopipe grand marshal polycounter
    I forgot exactly what the issue was to be honest - it smelt a lot like a bug though. 

    I ended up reconstructing the spline in the construction script, placing new points based on its length VS the length of the spline mesh, that meant it was easy to set tangents and to ensure the spline mesh didn't get overstretched. It also meant I didn't have to place many points when making long splines (I was working over kilometres rather than metres) 

    There's a tool on the marketplace that does the same and more for $50 or so - given the work involved I'd be tempted to just buy that tbh. 
  • Stu2Prof
    Options
    Offline / Send Message
    Stu2Prof polycounter lvl 6
    So I took another swing at it but am still having problems. The main issues I'm having is that the mesh seems to be squashed and adding spacing between sections even though it should be seamless. Also there's some crazy errors at the end of the spline and some odd geometry deformation


  • poopipe
    Options
    Offline / Send Message
    poopipe grand marshal polycounter
    Yeah, that's the sort of problem I was getting. 

    You only really get good results if you have one mesh per segment - you can pull start/end positions/tangents from the points that way. 

    As I said,  you're best off reconstructing the spline in the construction script and then adding a mesh per segment 
  • Stu2Prof
    Options
    Offline / Send Message
    Stu2Prof polycounter lvl 6
    I'm glad I'm not alone.
    When you say "reconstructing the spline" do you mean that I create a blueprint that inserts a certain amount of points along the line based upon its length and then recalculate that every time I lengthen it?
  • poopipe
    Options
    Offline / Send Message
    poopipe grand marshal polycounter
    You want to sample a list of locations at equal distances along the spline into an array and use those to build a new spline.

    This is cos points cant be added part way along  a spline -  only at the end.

    Iirc you  then delete the old spline points and add the new ones to the existing spline. 
Sign In or Register to comment.