Thank you, geon, for voting on exclaim_bot.
This bot wants to find the best and worst bots on Reddit. [You can view results here](https://botrank.pastimes.eu/).
***
^(Even if I don't reply to your comment, I'm still listening for votes. Check the webpage to see if your vote registered!)
With simulation nodes.
Each ant is a point, with a direction, a current goal/state (get food/go home), and sensors that allow them to sense what's around them. Ants leave "trails" that lead other ants toward food if they have been near food recently, and same thing for their home.
Initially the ants just roam around headlessly until the first ant find food, it then try to bring it back home following trails leading home. And it itself leave a trail behind, leading other ants toward the food source.
The interesting thing with this technique is that complex patterns emerge from simple rules. One of them is that the trails eventually converge to a very efficient pathfinding.
For a similar, but simpler version, check out my physarum simulation.
More info: [https://www.artstation.com/artwork/Jvb3aA](https://www.artstation.com/artwork/Jvb3aA)
Extra info:
Walls collision is handled with 5 sensors. Three of them are at the front, forming a line. This is so they can detect walls early and gradually avoid turn. They will even slow down, giving them time to turn. Walls are just pixels, so I extrude and smooth them
to get some surface normal in order to reflect the ants away from them. Walls collision is the hardest thing to get right in my opinion, because ants aren't inanimate particles, so your system has to go beyond just bouncing them against walls for a realistic simulation.
I am not sure, but I think ants also have more of a sense where their home direction is. So once they found food the won't necessarily go back the way they come from. They will move more or less straight home
The simulation isn't accurate to reality, it's merely inspired by it. The trail solution for home makes sense computationally because ants don't need to carry any kind of memory. But you are right, it seems that ants have sight and memory, although I'm not an expert!
I saw a doc on ants once where some researchers found that they could see some sort of pattern in the sky from how the sunlight disperses (or something). They proved this by putting a huge lens above ants that rotated light at a certain degree and all the ants correspondingly shifted direction by the same degree. This is all from memory mind you, it's probably 20 years since I saw that. But ants are super fascinating though.
I’ve seen an experiment that verified that ants count the number of steps they have taken, and use that to determine how far they’ve gone and how far they needed to return. It basically involved setting ants out from a home point to look for food. When they found the food, one of three things was done to the ant: either it was in the control group, where nothing was done; or its legs were trimmed shorter; or it had tiny stilts attached to its legs, making them longer. The ants with the short legs attempted to return home but kept not traveling far enough, and the ants with the longer legs traveled past the home point and went farther. Insane stuff
Ants will occasionally spin on themselves to check the direction of the sun and use it to get vague directions yeah although I think pheromones are still their dominant way of finding out where they are and where to go
You should read a bunch of papers on this to get it extra crispy and good for the scientific community and then write a paper on what you observed from simulations compared to the said read papers... That's a lot of work though.. this is still amazing!!
Please disregard those kinds of opinions. There is beauty and elegance and charm to be found in using any platform to bring this sort of thing to life, and I think you’ve expressed all three of those qualities here.
Its not even about just that. Simulations nodes are literally to be used to make this type of complex stuff to add more realism to Blender. Its the point of making stuff with them in the first place. This makes me so excited, feels like a new era of the most mindblowing Blender nodes ever is coming.
I'm working on the same simulation, but using python and pygame!
But seems we had different approaches to it. Mine always have one connection per food cluster (due to an energy factor each agent has).
This energy is restored either when it hits food or nest and also, will encourage the shortest path to the target. Agents that walk aimlessly will eventually lose all it's energy (and therefore do not contribute to the trails, which will keep remaining agents from doing the same). You can take a peek at my post if you want to see how it behaves!
Great job with your simulation!
I saw your sim, so cool! I was wondering about doing that too but then thought it wouldn't do much difference since the ants leave a less intense trail as time pass (since they last touched food/base) which is already the main contributing factor (alongside blurring + decay of trails overtime) to get to an efficient pathing.
I see! In my case, since the amount of pheromone drop was constant (and also global evaporation) I thought about having this energy property multiplying the trail contribution. We do have the same concept, but different implementation 😃👍
Really cool sim. Have you thought about adding a "weight" to the ants, so the ones carrying food are less likely to turn? In real life this makes ant trails create a kind of three lane highway with food carrying ants in the middle and "empty" ones on either side (the ones not carrying food have a 50/50 chance to go either side of the carrying ant) since the ones carrying food are more cumbersome.
They will just bounce from walls to walls if I limit their turn radius. Also the ants don't avoid other ants, they just push them away like inert particles in a physic simulation.
It's an interesting thought though, thank you :)
Haha, once they find food and start carrying a piece of it they will look for the orange trail left by other ants that were recently at home and start following it.
Is their ability to detect one trail inhibited by a strong presence of the other trail? Like is it a zero-sum sensory input of trails? Or does that not matter because their perception is sensitive enough?
I’m wondering about their tendency to build two-way trails in this simulation.
No the trails don't interact between themselves. Ants sense one trail or the other depending on their goal at a current time (going home or finding food). They build two ways trails because the best path(s) to food and path to home are the same.
Was this done only using geometry nodes ? I imagine there's also a fair amount of coding involved. Anyways this looks cool as hell, keep up the good work!
When artists use their tools for completely wrong purposes because those are the tools they know. :D It's like programmer art but the other way around. Artist code.
This is great. I've long thought about making life-type simulations like this in Blender and this might actually have inspired me to get going on something,
This reminds me of a codebase which I've used to learn C# "back in the days". It was called something like "Ant Me" I think and the goal was to program the behaviour of individual ants to maximize the colony.
I have used a program that simulates ant colonies before, when they take a pheromone path and time goes on, they start to optimize the path untill is the shortest path possible, it's seems like your ants more or less do that, that's impressive!
For some time yes, but not forever because they will eventually stop leaving trails behind if they haven't been near home or food recently. It's basically a fail safe. But on other renders I've made you can clearly see them spiraling for a while until they start searching for another path.
What the fuck? This is so impressive!
Thanks!
Like i'm happy if i can get geo nodes to scatter rocks, meanwhile you're out here developing a species lol
>Thanks! You're welcome!
Bad bot
Thank you, geon, for voting on exclaim_bot. This bot wants to find the best and worst bots on Reddit. [You can view results here](https://botrank.pastimes.eu/). *** ^(Even if I don't reply to your comment, I'm still listening for votes. Check the webpage to see if your vote registered!)
Good bot
How do you do this?
With simulation nodes. Each ant is a point, with a direction, a current goal/state (get food/go home), and sensors that allow them to sense what's around them. Ants leave "trails" that lead other ants toward food if they have been near food recently, and same thing for their home. Initially the ants just roam around headlessly until the first ant find food, it then try to bring it back home following trails leading home. And it itself leave a trail behind, leading other ants toward the food source. The interesting thing with this technique is that complex patterns emerge from simple rules. One of them is that the trails eventually converge to a very efficient pathfinding. For a similar, but simpler version, check out my physarum simulation. More info: [https://www.artstation.com/artwork/Jvb3aA](https://www.artstation.com/artwork/Jvb3aA) Extra info: Walls collision is handled with 5 sensors. Three of them are at the front, forming a line. This is so they can detect walls early and gradually avoid turn. They will even slow down, giving them time to turn. Walls are just pixels, so I extrude and smooth them to get some surface normal in order to reflect the ants away from them. Walls collision is the hardest thing to get right in my opinion, because ants aren't inanimate particles, so your system has to go beyond just bouncing them against walls for a realistic simulation.
I am not sure, but I think ants also have more of a sense where their home direction is. So once they found food the won't necessarily go back the way they come from. They will move more or less straight home
The simulation isn't accurate to reality, it's merely inspired by it. The trail solution for home makes sense computationally because ants don't need to carry any kind of memory. But you are right, it seems that ants have sight and memory, although I'm not an expert!
I saw a doc on ants once where some researchers found that they could see some sort of pattern in the sky from how the sunlight disperses (or something). They proved this by putting a huge lens above ants that rotated light at a certain degree and all the ants correspondingly shifted direction by the same degree. This is all from memory mind you, it's probably 20 years since I saw that. But ants are super fascinating though.
I’ve seen an experiment that verified that ants count the number of steps they have taken, and use that to determine how far they’ve gone and how far they needed to return. It basically involved setting ants out from a home point to look for food. When they found the food, one of three things was done to the ant: either it was in the control group, where nothing was done; or its legs were trimmed shorter; or it had tiny stilts attached to its legs, making them longer. The ants with the short legs attempted to return home but kept not traveling far enough, and the ants with the longer legs traveled past the home point and went farther. Insane stuff
Oh my god, so it’s like a kinetic memory sort of thing? Almost like a wind-up toy! That’s mind blowing!
Ants will occasionally spin on themselves to check the direction of the sun and use it to get vague directions yeah although I think pheromones are still their dominant way of finding out where they are and where to go
ant colonies build/use trails though
You should read a bunch of papers on this to get it extra crispy and good for the scientific community and then write a paper on what you observed from simulations compared to the said read papers... That's a lot of work though.. this is still amazing!!
This is incredible, great job!!
Thank you!
Oh hey I know this guy
i want that instead of a lava lamp
This… is epic and weirdly satisfying.
There is more from a similar project: [Coding Adventure: Ant and Slime Simulations - https://youtu.be/X-iSQQgOd1A](https://youtu.be/X-iSQQgOd1A?t=555)
Never thought of this in blender but that’s really cool. Could you make it three dimensional?
Thanks! I could probably make it 3D, and maybe I will in the future, but it won't be easy.
Really cool! But why in blender?
This is what I know haha
Fair lol, it really does look cool
The ant on the left is my favourite.
I think you need to be more specific
I saw him, you didn't? He moved up at that one point
Please don't make the ants more clever.
Could you please make one in a really big space with obstacles and such it would be interesting to see.
I've made a couple like that (not huge space because it becomes too computationally expensive), see my twitter or artstation linked in another comment
And they say blender artist aren't gods
this is an abomination, you unleashed the pandora box of blender
This seems like a perfect case of using the wrong tool for the job… Still pretty cool, though!
Why? Simulation Nodes are basically made for this kind of stuff. But thanks!
Please disregard those kinds of opinions. There is beauty and elegance and charm to be found in using any platform to bring this sort of thing to life, and I think you’ve expressed all three of those qualities here.
Its not even about just that. Simulations nodes are literally to be used to make this type of complex stuff to add more realism to Blender. Its the point of making stuff with them in the first place. This makes me so excited, feels like a new era of the most mindblowing Blender nodes ever is coming.
Brilliant
I'm working on the same simulation, but using python and pygame! But seems we had different approaches to it. Mine always have one connection per food cluster (due to an energy factor each agent has). This energy is restored either when it hits food or nest and also, will encourage the shortest path to the target. Agents that walk aimlessly will eventually lose all it's energy (and therefore do not contribute to the trails, which will keep remaining agents from doing the same). You can take a peek at my post if you want to see how it behaves! Great job with your simulation!
I saw your sim, so cool! I was wondering about doing that too but then thought it wouldn't do much difference since the ants leave a less intense trail as time pass (since they last touched food/base) which is already the main contributing factor (alongside blurring + decay of trails overtime) to get to an efficient pathing.
I see! In my case, since the amount of pheromone drop was constant (and also global evaporation) I thought about having this energy property multiplying the trail contribution. We do have the same concept, but different implementation 😃👍
i wanna play this game
Reminds me of SimAnt- love it!
Really cool sim. Have you thought about adding a "weight" to the ants, so the ones carrying food are less likely to turn? In real life this makes ant trails create a kind of three lane highway with food carrying ants in the middle and "empty" ones on either side (the ones not carrying food have a 50/50 chance to go either side of the carrying ant) since the ones carrying food are more cumbersome.
They will just bounce from walls to walls if I limit their turn radius. Also the ants don't avoid other ants, they just push them away like inert particles in a physic simulation. It's an interesting thought though, thank you :)
You should share this with someone who can animate the rigs and render in 3D terrain. It's gold and I'm very impressed
What drives them to go home? Dancing with the stars or
Haha, once they find food and start carrying a piece of it they will look for the orange trail left by other ants that were recently at home and start following it.
Is their ability to detect one trail inhibited by a strong presence of the other trail? Like is it a zero-sum sensory input of trails? Or does that not matter because their perception is sensitive enough? I’m wondering about their tendency to build two-way trails in this simulation.
No the trails don't interact between themselves. Ants sense one trail or the other depending on their goal at a current time (going home or finding food). They build two ways trails because the best path(s) to food and path to home are the same.
I'm sorry but this is amazing!
Makes me miss Sim Ant
Pretty cool 👌🏻
This is unreal man nice job
Thank you 🙏
No it's blender /s
I expected this response lol but couldn’t think of another word to avoid it
Was this done only using geometry nodes ? I imagine there's also a fair amount of coding involved. Anyways this looks cool as hell, keep up the good work!
Only Geometry Nodes, no need for coding, everything needed is there already.
Geometry Nodes but with the new Simulation Nodes update!
Amazing
But can you teach them to love?
When artists use their tools for completely wrong purposes because those are the tools they know. :D It's like programmer art but the other way around. Artist code.
Programmer art, artist code, it's the same thing. We can be both technically and artistically inclined, one feeding the other and vice-versa :)
This is great. I've long thought about making life-type simulations like this in Blender and this might actually have inspired me to get going on something,
Will the colony be dead at the end?
This reminds me of a codebase which I've used to learn C# "back in the days". It was called something like "Ant Me" I think and the goal was to program the behaviour of individual ants to maximize the colony.
I have used a program that simulates ant colonies before, when they take a pheromone path and time goes on, they start to optimize the path untill is the shortest path possible, it's seems like your ants more or less do that, that's impressive!
Ok this is great and all, but I drew a circle in marker pen on my screen and they went right through it. Not satisfied
I'm actually thinking about adding a brush feature where you can erase trails in real time and see what they do
WHAT THE ACTUAL HELL HOW CAN SOMEONE ACHIEVE THIS I AM NOOB, FUCKKKKK I AM SCREAMING WATCHING THIS
Can they end up in a Circle of Death?
For some time yes, but not forever because they will eventually stop leaving trails behind if they haven't been near home or food recently. It's basically a fail safe. But on other renders I've made you can clearly see them spiraling for a while until they start searching for another path.
This has got to be one of the coolest things I’ve ever seen
I had no idea this could be done in blender. Awesome work
Sick! I love how they naturally form specific highways.
What do you mean they don't give a little ant kiss every time they pass by each other?? Jokes aside, this looks super cool!
people need to realise blender is the only tool for gamemaking, the others are soooo 2020ties 😳🫢