This is follow up to my previous question here. I managed to get an answer and improve on it, however my current implementation is pretty cumbersome.

I need to simplify my current solution, as Animation Nodes take about 500ms+ to run the whole thing.

My question is, is it possible to select random object from collection, then place it on a spline from different collection - rinse and repeat until all splines are covered?

I already have a solution on placing objects on splines. But now I have 39 splines, and I have 39 "groups of nodes" and it is getting really slow. I feel like there is a Loop solution to this, but I can't figure it out.

Here is how my project looks like now:

Solid render view

Lots of instanced 3D icons "marching" towards buildings. It works pretty good. However, my current Animation Nodes set up looks like this.

AN nodes set up

It is difficult to navigate. I have 5 different icons and 39 splines. I tried to use Loop and Groups to help simplify certain steps. But I can't figure out how to make it more simple.

Here are node groups:

This one places objects on a spline and orients them towards spline direction - Marching Ants Set Up. Place objects on spline

This one controls spacing between different objects on each spline - gaps between icons.

Icon Gaps control

This one does all the animation using time. I want to vary speed of various "marching icons", so I put it in a Group.

Icon Animation Control

Here are the groups I couldn't figure out how to connect together in 1 loop, with incrementation till all Splines are used.

Spline selection from Collection.

Spline Selection

Icon Selection from collection and scale control.

Icon Selection from Collection

And here is how they come together.

I select different Icon with Index, change scale, run it through Instancer and feed it into Loop to place them all on a Spline. Other Groups are plugged in as well at this stage.

Float Input node is used to pick starting Index from Spline Collection, then I add 1 to it with each duplication.

Main Set Up

And then I simply copy and paste main node set up to repeat the whole process and add "1" to Spline Collection Index.

Set Up

It was fine to use the whole "Place Objects on Spline" Loop set up at the beginning, but now I have 39 splines. I had to duplicate the groups many times and now it is getting difficult to navigate and even run.

Here is a Blend file on GoFile website, if you want to poke around - I'm not sure how long it will be available online as service is free.

  • $\begingroup$ link doesn't work. Please use blend-exchange.com $\endgroup$
    – Chris
    Commented Jul 16, 2021 at 7:09

1 Answer 1


I managed to partially solve it by trail and error. I tried uploading final file to Blend Exchange, but I'm hitting file upload limits. Currently, mu blend file is at 60MB+. I have uploaded it here to my Google Drive if you would like to check it out. I will keep the link live for next few months.

In the mean time, here is my partial solution with Animation Nodes:

This node set up, selects all the icons / objects from a collection. Then places them on a spline from another collection. I set it up in a way that I can control duration of objects floating on splines from start to end and distance between them.

Nodes in Green are the ones, where you select your objects / splines collections and modify number of final objects etc.

Icon Placement on Spline

And here is node set up, where animation happens on spline

Animate on spline

The above set up works ok, but problem is if you have a large number of splines. I had to duplicate 2nd node set up 9 times, since I had 9 splines.

I couldn't figure out some sort Loop Subprogram, that would grab Icons from Collection and assign them one by one on each spline randomly, and make X amount of instances of those icons.

I managed to do something semi-close to it, when I was building this project, but objects (icons) were clipping through each other, distancing between them was not working, and they were traveling the splines one at a time. Not in a swarm way.

Here is how the whole thing turned out in final render.

Main view

Close up

Top view

Final swarm


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .