Quelea - agent-based design for Grasshopper

Agent-Based Design for Grasshopper
+ A new paradigm for 3D modeling utilizing agents.
+ Assign forces and behaviors to systems of agents to create interactions.
+ Utilize any data to drive the system.
+ Easily debug your system by displaying individual force vectors.
+ High performance, parallel algorithms, spatial data-structures.
+ Write your own custom forces, no coding required.
+ Open source framework for others to build custom behaviors.
+ Boid forces: Cohese, Separate, Align, & View.
+ Contain Agents within Brep, Box, Surface, and Polysurface environments.
+ Forces: Path Follow, Attract, Contain, Surface Flow, Seek, Arrive, Avoid Obstacle, Avoid Unaligned Collision, Sense Image, Sense Point, & more to come.
+ Behaviors: Bounce Contain, Kill Contain, Initial Velocity, Eat, Set Velocity, & more to come.

Future work:

+ Behaviors to drive simulations of people and vehicles.

+ Temporal inputs can change the actions of the system over time.

Download the add-on on Food4Rhino

If you find any bugs or have any feature requests please post them on the GitHub Issue Tracker which will allow everyone to see which bugs are open or closed and allows me to update you when it is fixed.

This is an open source project so if you need custom defined forces or behaviors for your project reach out to me about becoming a committer.

View the project on GitHub

To get started check out this video tutorial on how to set up a basic particle scene. Follow along with this example script.

Learn how to set up a flocking simulation with agents in this video tutorial and example file.

To learn more about the polymorphic type system in the latest release of Quelea see this video explanation.

For questions on how to use Quelea, please create a new Discussion.

Load Previous Comments
  • Alex Fischer

    That's really great to hear! Thank you. I am curious as to what you used it for. Would you mind sharing your project here? I think I'm going to start posting example projects soon and it would be great to be able to show what others have done.

  • epee du bois

    I am using it for a rough simulation of brownian motion. A single agent tries to follow a complex path while hundreds of other agents distract the path following one. I have been using similar algorithms to generate data sets for paintings. You can see the most recent work which used python and grasshopper here. For the recent studies, your components were very useful for limiting the movement of the agent to a very confined space, which for what I am doing was beyond me to implement in python. 

    I think the boolean outs on the agents is really exciting. I can imagine really complex emergent behaviors coming from that. Stigmergy!

  • Alex Fischer

    Really cool work! I am so interested in the diverse and unexpected applications of agents. Please keep the group posted on your work and let me know of any features or ideas you have for Agent.

  • Esmaeil Mottaghi

  • Alex Fischer

    Awesome! Do you mind if I post this on my website? I'm trying to build up a gallery of projects.

  • Esmaeil Mottaghi

    Hello Alex, This is a fantastic plugin.Congrats for this :)

    sure....that's my pleasure :)

  • Mirko V.

    Just a test!

    Marching cube by agents on surface and fake shadow

  • dvdrbls

    i just downloaded the new version, do you have any examples available on how the new components work?

    awesome job, thanks!

  • Christian Schmidts

    Same request here, examples would be awesome :)

  • Alex Fischer

    You can follow the video tutorials on YouTube and download the example files below.

    PolymorphicTypes.gh

    WanderForce.gh

  • Alex Fischer

    Hi Candan,

    The original set up video is out of date at this point. Check out this video on the polymorphic type system in quelea instead. You should be able to do what you want, I think attractors and the path following forces will be useful for you. See what happens when you feed the output of the agents paths back into the system as inputs by running multiple simulations. I'm interested to see what you come up with so please share it with the group when you're done!

    -Alex

  • Petar Pejic

    Great work,

    I would like to raise two questions:

    1. is it possible to set some objects for agents to avoid?

    2. is it possible to introduce new ways of interaction between agents by user, for example if two agents would go one over the other in 3d space

  • Alex Fischer

    Petar,

    1. I have not gotten to obstacle avoidance forces yet but you can certainly implement it yourself either through grasshopper with the Apply Custom Force Component or by modifying the source code. See these issues on GitHub for an explanation of how to implement the different types of obstacle avoidance. Alternatively, just use an attractor force with a negative weight to create a repulsor. Or create a second system with static agents with a separation force on them.

    2. Certainly! Just use the Apply Custom Force component and feed in some calculated vector. In your case I would use the deconstruct agent component to get to their positions, test to see if any of those points are 'over' another point, and then apply some custom force based on that event.

    If you would like to contribute to the development of Quelea by writing your own custom forces and behaviors, check out this blog post on the dedicated website for Quelea that I am still in the process of filling out.

  • Andreas Iosif

    Hey Alex, i was wondering if there is a way to import a mesh as Environment. Any help would be great, thanks in advance!

  • Alex Fischer

    Hi Andreas,

    There is a way if you're down to do a little coding. You can view and modify the source code on GitHub and I can get you started on how you can add a Mesh Environment component. It's quite straightforward if you've done any coding in the past.

    Otherwise, you will have to wait until I get around to that feature.

  • Hossam Elkady

    Alex , congrats ..i downloaded Quelea buton startup a missing file message appear.... system deconstruct is missing ! , any idea how to solve this issue !!

  • Alex Fischer

    Sorry I updated the files on food4rhino and forgot to update them here. The new files should work now. Report back with what you create!

  • Robin Dripps

    Alex,

    This is such an elegant plugin-powerful yet intuitive. Most of my experiments have succeeded but I ran into trouble on a test for an eventual system of key line dams on a real topography. The attached file is an abstract surface with a brep acting as a dam. But, it does not seem to be a very effective dam and that is the basis of my query. Thanks for any help or pointing out any mistakes of mine.quelea%20surface%20flow.gh

  • Alex Fischer

    Hi Robin,

    Thank you for your comments. I'm happy you found it useful. I took a look and I think the real key was to not apply any other force when the avoid obstacle force is applied. I've attached my version below. I changed a few other things that I found useful and highlighted them in blue. Please let me know if you have any more questions or feedback or requests!

    queleasurfaceflow-af.gh

    -Alex

  • Robin Dripps

    Alex,

    Thanks so much for this.  It  works perfectly.  I am now curious as to whether one can generalize about the Avoid Obstacle Force being best used without any other forces or was this just a particular case? And then would this apply to any other forces that are best used in isolation?

  • Alex Fischer

    Robin,

    Yes if you want them to obey that rule unequivocally and never intersect with an obstacle. Sometimes that may not be the case and you just want them to avoid an area. I would say the Avoid Obstacle Force and the Contain Force are usually the ones you want to apply alone. You can also get creative with how and when you apply and weight forces. For instance, you can weight by distance to a point once a particle is within a certain area. You can step up pretty much any relationships between rules and even use the And or Or components to combine when to apply a certain rule.

    I added some example scripts on the website that are more complex and use some of these techniques.

  • Amir Soltani

    I really like Quelea, it's beautiful! Thank you Alex for creating and sharing it. Also the examples and tutorials are very useful for learning Quelea.

  • Igor Mitrić Lavovski

    Hi Alex, 

    It looks amazing. Thank you for your work and sharing!

    I saw in a introduction video Rain flow on surface. Do you have some example or some inputs for start?

    Is it only for surfaces or is good for mesh too.

    I am working on multi-objective optimization, I have sun and wind, if Quelea provides rain it would magnificent :)

    Thanks 

    Igor M

    Igor

  • Alex Fischer

    Hi Igor,

    Thanks! I currently do not have mesh environments implemented, but its on my todo list. You can find some example scripts on the quelea website that includes a rainflow demo. I would love to see what you are working on once you're done.

    And thank you Amir, it is very nice to hear that you and others are appreciating it so much!

    -Alex

  • Igor

    Hi Alex,

    Whether it is possible to download the Quelea somewhere else? The site food4rhino unfortunately doesn't work properly and it is impossible to download the Quelea from it.

  • Alex Fischer

    Hi Igor,

    Could you explain what does not work about food4rhino. It works for me but if there is a problem I would like to let them know.

    -Alex

  • Igor

    Hi Alex,

    I have similar problems like this http://www.grasshopper3d.com/forum/topics/food4rhino-not-working?co...

    The site normally doesn't work with one of browsers. Many thanks for the help.

  • Petar Pejic

    Hi Alex,

    Would it be possible to to have multiple attractor points for agents emitted from one particle? The idea behind this is to establish different user groups where each one of them is attracted to different program. After, multiple emitters could be introduced .

  • Alex Fischer

    Hi Petar, I'm not entirely sure what you're asking, but I think the answer is yes. You can certainly have each agent be attracted to a different point, just feed in a list of points that match each agent to the Attract component. You can also have another system of particles act as attractors, just get their position and feed it into the Attract component. You can also have each agent be emitted from a different room and have them be attracted to a specific room. You can also send me your script if you need more help.

    Best,

    -Alex

  • Petar Pejic

    Let me try to explain it better:

    I would have 5 points acting as point emitter. I would like for each one of them to emit 3 different particles (let's say red, green and blue). For the sake of explanation, set us assume that they are emitted randomly. Furthermore, I would for all of them to interact based on swarm behaviour, but each colour would have different point attractor. I hope it is clear now.

    Also, I would like to limit movement to x and y axis, and allow for z movement only in certain region. I managed to do it with custom force, but it seams to really slow down the analysis. is there maybe an other way? 

    Thank you for your help, it is highly appreciated. 

  • Alex Fischer

    Do you have a grasshopper file I can look at?

  • ng5 Alex

    Hello all!.

    since some comments are not congrats etc, but have to do with the plugins applications, could you please post these as discussions of the group, in order to find them easier, for future reference?.

    thank you

    best

    alex

  • Petar Pejic

    upload.gh

    upload.3dm

    I managed to figure something out, however, the performance is quite bad at this point. Maybe it could be optimizes? Anyhow, I am sharing it for other people to find it helpful as well.

  • Alex Fischer

    That's awesome Petar, thank you for sharing it. It seems like you got it to work. There's not much that can be optimized in the script through, you have a lot of agents and a lot of interactions, it just is going to be slow. However, if you record your data points you can set it to simulate and play back in real time by using the list item and animate a slider.

  • Djmonster

    Sorry to bother, but a lot of the script in the Source file u provided on GitHub is not working since u update the name of the Agent to Quelea. Is there any updated version of the test files?

  • Alex Fischer

    Hi Djmonster,

    No need for sorry's, I created this group so you could bother me. There are some example scripts on the Quelea website here. Is there a particular file in the test folder that you wanted to look at? I can remake it manually for you.

    Best,

    -Alex

  • Djmonster

    it would be so kind if u can do a pathFollow one. like the one u did in the test file

  • Andreas Iosif

    hello guys!

    i was wondering if its possible to use Quelea as point emitter to update point cloud on Locust every time while seeking some points and add more particles in the swarming process. To create somehow a loop and make both working together, since i am not familiar with scripting methods. I guess i have high hopes, but if anyone got something to suggest that would be great. 

     

    Thanks in advance! Great plug in! 

  • Ricky

    Hey Alex!

    Is it possible if you could do a tutorial on the Jewelery Heart necklace example? (The one where you made the agents follow a path) Otherwise is it okay if you upload the script you used to achieve that?

  • Don Reilly Semple

    Hi Alex

    Is there a way to save each iteration of quelea points between separate lifespans? Currently every time a lifespan ends the next created Quelea replaces a pre-existing data tree path. It would be nice if each iteration of a particular lifespan was a separate data branch. So that the branch structure had depth. For example {i,x}, i as the current iteration of the lifespan and x as the particular path of quelea points. Maybe there is a way to do this that I am not seeing. Thanks in advance for the help.

  • Kelvin Karel

    Hey Alex and All, 

    Firstly, I'd like to thank Alex for the wonderful plug-in and the tutorials online. It has been a great help in understanding what Quelea could actually do and i can't wait to use it in my future school projects.

    I've downloaded obstacle avoidance file from the Quelea website and am currently exploring on it. I've tried adding more components such as the "bounce behaviour" but it just doesn't seem to work well along with the "avoidance force". 

    The image drawn below is what i was trying to achieve. A mixture of "Bounce Behaviour" and "Avoidance Force" that will steer away from the obstacles. Thus, creating a history lines to show random circulations. Would there be any possibility for the 2 components to work together ? Thanks in advance.

    Cheers,

    Kelvin Karel

    P.S. GH file attached below

    obstacleAvoidanceExploration.gh

  • Youssef Eskandar

    Hi all is it possible to achieve something like this using quelea

    same flow of lines ???

    Thanks in advance uelea

  • Sohail Dalili

    Hey Calvin Karel, 

    see if this is something you want..obstacleavoidance.3dmobstacleAvoidance.gh

  • toufeeque abdul

    Hi Alex,

    First of all thank you for the amazing plugin.

    I had a similar issue like Don Reilly, I am looking into branching  initiated by collision of the quelea with the environment (setting up new emitters in points of collision). I am unable to record the points of collision. Could u please help me figure out a way to record and use the points of collision. Thanks.

  • Syafiq Azmy

    Hello all, is there any example of scripts I can follow if I wanna do preview when each rule applied and temporal variations weights of forces over time?

  • CathyTs

    Hello! i want to make a crowd simulation in a public space! I saw something really interesting in your video and it is exactly what I want to achieve: I have a plavn view of a park with obstacles and so on and want to show people's movement. How is it possible?

  • Chris

    Hi Alex.. I've just started to have a look at quelea, looks fantastic.. I'm very interested in looking at spectator movement in sports venues.. Initially on the horizontal plane.. And then out of the bowl. Do you have any basic scrips set up for crowd flows... Or any advice you could offer would be very welcome.. Thanks C
  • Ben

    Hi Alex, I am really interested in your work! I have rather an abstract question for you as my project is still pretty loosely defined. Basically, have you seen anything done between Quelea and Karamba? I really liked you therma example where the lines where influenced by the solar data out of diva. I have a similar set up using Karamba and shells, where I get stress lines and deflection information. I was wondering if I could use agent based modelling to have lines becoming influences by, say, areas of higher stress? Or possible follow stress lines? 

  • Sean Holden

    Hi Alex, and all,

    I am having a lot of fun with this plugin but am struggling with the 'follow path force' function. I want particles to be emitted from the bottom of this tree structure and flow up through its paths smoothly/randomly. I have attached the file if anyone happens to have any time to have a quick look at it - I feel like I am getting there - just a bit out of my depth.

    Breathing%20Tree%20quelea%204.gh

    Thank you very much in advance for your help, 

    Sean  

  • Paris N

    Hello Alex and everyone

    Quelea is great. Thanks for sharing.

    I was struggling with the combination of 2 or 3 quelea systems, I would like to have the output particules position from the 1st system as enviroment for another system. I have managed to make a working solution.

    My problem is on 2nd system. It only gives me the results i want (number of particules, position and velocity) when engine is set to reset, thus not being able to produce cuntinuous behavior.

    I recreated the file a couple of time to avoid mistakes. but still the same. Maybe my poor knowledge of the plugin or a code bug? I attached the gh file and a screenshot for a general view. Any suggestion is welcome. Thanks in advance.

    try1.gh