here’s a simple script to export a spline from 3dsmax to copy-paste buffer. then in BP you just ctrl+V and yay.
only creates linear splines (you may want to use Normalize Spline in 3dsmax if you’ve got them curves)
how? 1) in max, select your spline 2) in max, go Scripting - New Script; paste the text from the file attached and hit CTRL+E to run the script 3) alt-tab to Unreal, open your blueprint, and CTRL+V
4) done. you may want to change Reparam Steps per Segment to 4 and then 10 to make the spline editable
**note that i only made this for my today’s needs, so no support coming most probably. just in case, save your Unreal scene before pasting
LMK if anything
Excellent Thanks for this, will try it out soon. Its been a long while we’ve been waiting for a smooth method to transfer splines into UE4 without a long workaround.
Its things like these that get me all worked up on Epic priorities, before it was VR and nowadays its Raytracing buzz, all the while basic workflow tools are either neglected or delayed! From simple mass renaming of files, to unused asset cleanups, neglected FR issues that are deal breakers and so on.
Yes I have a need to get a spline from UE4 into max.
The scenario is this, I have a railroad trackage system that uses set meshes for turnouts etc, (these turnouts are straight).
I can apply these meshes to a landscape spline and then manipulate the spline which will curve the track and turnout, giving a very nice realistic layout unlike a train set .
However I need to then make custom animated collision meshes for the switch blades for the (slightly) deformed turnout.
(my track system uses physics/ collisions for guidance)
Sounds like you’d need the curves. I’ll see if I can throw something together. Pretty sure though that the way the spline is copy-pasted inside the blueprint (which is just a list of points) is different from the landscape splines, so don’t hold your breath.
have you considered using splinemesh, export, epoly, quadriangulate, select one of length edges, loop, turn to spline? sure it’s complicated but that is at least some way
Yes using Splinemesh is an option, but I have an awful lot of track laid using landscape splines (live and learn ).
TBH my workflow is take an Overhead orthographic image and put that in max as a template for a fresh spline to make point blades and collision meshes.
Thanks Paul G
Anyone still looking to import splines to unreal, this script works wonders…
It’s not mine, but every time I google splines → unreal, this thread comes up so I’m just leaving this here in the hopes it helps a few of you weary travelers…
I’ve never seen the script mentioned at the start of this thread, however this one works in the same way. This one DOES however seem to be able to copy tangents too!
This script is set up to be easily added as a toolbar icon, so customise your interface, add a new button somewhere and getting splines into unreal is now easy as pie
It’s important to note, this will only copy the first spline in you spline object, so if you have multiple separate splines in the one object would will need to weld them or break them apart into several individual splines. It will also paste your spline right to 0,0 in unreal so to position your spline where it is in max, you will need to select your first spline point in max and copy the xyz positions to your unreal actor. OH and invert the y value, so if it’s at say 710.43 in max, make in -710.43
Hey there, thanks for sharing this script! I was able to use it to get the spline data out of 3DS Max, but am having trouble getting it into UE4. It does not appear to be blueprint text, so I’m not sure how a simple Ctrl+V is supposed to get the data in properly. Some more detail would be nice. (I’m in 4.27 if that matters.)
Also, is line 14 supposed to be missing an “I”? I tried changing it but it doesn’t work with or without the change.
Was able to make script work in ue (both 4.26 and 5). You just need to paste right into the scene, not a new blueprint. It creates an Actor. Hope this helps.
And for those who were struggling (like me) to get it to work in Max. It doesn’t work if you try just to run the script, need to add a new button. Then worked like a charm!