Distribute objects along lines

Hi, is there any specific tool in UE5 or way to distribute objects, for example, solar panels, along multiple lines? I tried to use Populating Meshes Along a Spline | Tips & Tricks | Unreal Engine video, but I can’t get the result working.

It would be great to have a tool similar to RailClone in UE.

Along straight lines?

Yes!

Just a blueprint

Line

3 Likes

But I want the objects to be scattered immediately on all the splines. As normal scattering.

Sorry, you’ll need to be more specific.

I have bunch of small lines. There is a small gap between them. I want to scatter solar panels along those lines. This is the point cloud preview from what I normally have in 3ds Max, using RailClone:


Same BP with a solar panel mesh

panels

1 Like

Thanks, but can you use multiple lines at once? I don’t want to offset each row manually. I have very specific lines I need to follow and there is little to none place of freedom placement of the objects.

Same code, but with two loops. One for X and one for Y. Gimme 5.

1 Like

Also, I am trying to recreate your script but I don’t know where you got that N variable (I guess it is a variable?) and how did you get that 3-input multiplier (and where the Distance came from). Sorry, noob here :).

1 Like

N is a variable ( how many ). You can right click on the multiplier pins and change their type.

Add Static Mesh Component translated the Vector data. You did not have such a situation. What did I do wrong?

Disconnect this

image

right click on the pin and choose ‘convert pin ( to integer )’

Also click on the ‘add static mesh component’ node, you can set the mesh in the details.

1 Like

I don’t have any option in that blueprint. Also, how I can select which lines it should scatter to?

Not quite sure what you mean here…

I converted the pins already:

Regarding what I mean.

There is a specific project of specific solar farm. There are lines (with gaps, like I showed before) which are representing the fronts of specific solar panels. I need to scatter the panels I have along those lines. Not set / offset them manually. Like with RailClone in 3ds Max or with Cloner in Cinema 4D. I can select the lines which the geometry should follow and then see those objects following those lines. The closest thing to that which I have found in the realm of UE is this:

(5) Populating Meshes Along a Spline | Tips & Tricks | Unreal Engine - YouTube

I’m looking at your images posted at the start of the thread, you want the panels to follow the terrain elevation?

Sorry, didn’t see this until now.

You only need a spline, if the lines aren’t straight.

With this BP you can specify the distances between lines accurately.