I am trying to create a procedural air duct using the spline blueprint. I want it to have interchangeable pieces (Straight paths, T junctions, 90 degree bends, etc). Can anyone point me to some resources that would help me figure out how to approach that? Would splines even work for something like that?
I would appreciate any advice or tutorial links!
I think you can do it in the normal way, except you need to change the mesh of the ‘add spline mesh component’ node as you are running through the construction.
Does it make sense?
That makes sense. Is there a way to set that up to be changeable in the viewport? Like a way to set specific indexes to a different mesh as the spline is being built?
(Sorry if any of this is obvious, I’m pretty new to working with blueprints)
Thank you for the help!
Most simply, just fill the array with the meshes you want to use:
But you could change the code to always use a default mesh unless the array holds a different one. Or use a dictionary ( map ) to map array indexes to meshes, for example.
@ClockworkOcean This is really great! I was able to get the random models to populate on the spline.
I wanted to ask for the last set up image you have what do you have connecting before the FIND node?
Hi - great
I wrote that code ‘off the cuff’, so don’t have it anymore. But I can tell you it was an int, because the line is green. So that whole chunk is basically saying
can I find this int in the keys
if yes, then I’ll use the mesh associated with it
otherwise default to a cube
There is presumably some reason, I didn’t just use an array.