Export splines from 3dsmax to Unreal - here's a script for you

hello hunams,

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)

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

EDIT:** yes, I am aware of Alan Noon way. It takes 30 minutes tutorial, a script, a struct, a data table, a text file, a blutility, black candles, and virgin blood. didn’t have all of those handy. his way has the curves though, which i didn’t do cuz didn’t need them now [link]](

Very well done and many thanks, works a treat in 4.19
I have considerable use for this

Thanks again
Paul G

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.

you’re welcome. anyone actually needs a reverse script to get spline from Unreal to 3dsmax?

Hi Ken?
Yes I have a need to get a spline from UE4 into max. :slight_smile:

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)

Paul G

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

Hi Ken
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

hello thx for the script, i m pretty noob in max and i ve a question … – runtime error: spline knot index out of range: 94 … what does i need ? black candles? virgin blood? :slight_smile: thx

You are genius, mate! Your script is still working in the year 2020.
P.S.: I wonder why it takes to cheat so much in order just to import some splines to UE…

the spline must be one whole element

Hey !

Where can I see the script you made ? the link is dead
Thank you

There’s no attachment, please fix it