Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Using boids to simulate swarms, schools, and flocks

From: Blender Essential Training

Video: Using boids to simulate swarms, schools, and flocks

Boids is a whole field of animal behavioral studies and it's just a fascinating thing that Blender is able to simulate, it's able to simulate the intelligent behavior of these particles. Each of the dots that you see on your screen is an actual particle and those particles are being drawn by this sphere that's running around there. And the particles interact with each other. So you have swarms of insects, you have schools of fish, you have herds of buffaloes, and in this case you have seagulls flocking around the boat here at the harbor.

Using boids to simulate swarms, schools, and flocks

Boids is a whole field of animal behavioral studies and it's just a fascinating thing that Blender is able to simulate, it's able to simulate the intelligent behavior of these particles. Each of the dots that you see on your screen is an actual particle and those particles are being drawn by this sphere that's running around there. And the particles interact with each other. So you have swarms of insects, you have schools of fish, you have herds of buffaloes, and in this case you have seagulls flocking around the boat here at the harbor.

So how do we set up boids? Well, let's go and break it down and I'll walk you through it. First of all, you need a base from which the birds will start, and so here we have this cube, and we've just gone ahead and assigned a new physic system, and instead of Newtonian, we've clicked on Boids. When we click Boids then we have a set of controls here on this panel. And what this is, is a bunch of rules as to each particle as it flies around or swims around or whatever.

What behavior takes presence over other behaviors? So here is the behaviors that you have. Let's say you're walking down on a crowded street. First of all, you have the desire to stay with the crowd, but avoid colliding in to other people. You have a certain goal that you are trying to get towards, but you have to navigate through this maze of people. So a lot of swarms have a center, and and people want to gravitate towards the center, and then we have some velocities involved. That you don't want to go too much faster than the guy next to you.

Those kind of behaviors you can rank and rate here and just by clicking the Move Up or Move Down, you can move that rule up or down in precedence. And then set the overall general rating of that rule, relative to all the other rules. Boids works in three-dimensions. As we walk around we can see that this is actually a three-dimensional flock. We can make it a lot simpler by clicking only 2D and now the birds will only operate and swarm around in two-dimensions, and not actually fly up into the Z direction.

We can control how fast the birds change direction and change speed here by limiting or changing the Maximum Velocity. Here we have set it at 10 units and the Average Velocity is much less than that. So that's means that they can really speed up and take a couple of wing beats and really get fast. Laterally as well as tangentially how fast they can bank to stay together in the flock, and flocks can actually -- if you try to scatter them, if the guiding force changes too fast, then they will actually fly off and get lost and not become part of the flock anymore.

The Visualization settings are pretty much the same. You can draw them as whatever and in this case, what I have done is I have created the shape called a Bird. It's just a very simple mesh shape. We can probably click it over here. Just select it and I can press C to-- oops, I'm going to press Ctrl+S to take my cursor to it and then press C to center in and now I can just zoom right in here. And all I have done is I just sculpted a simple little mesh shape that looks like a little dove flying around.

And what happens then is for every particle then, Blender takes that mesh shape and makes a bird out of it. And then the bird orients itself in the direction in whichever the particle is going. Coming back to the Particle System now, each bird starts at a certain time. In this case a flock when it first takes off it needs time to coalesce, if you will, and it just kind of weird thing to watch. But when they are all sitting there on the ground, they all kind of take off and then they all kind of like figure out who is the leader and where we are going and all that kind of good stuff.

That takes about a second or so to do. So I have started the actual simulation at -30, so that by the time we get to frame 1, the flock is all up in the air, and everybody is swarming around, and they have all kind of figured out who the leader is. Each of the birds is going to last for 1500 frames, which is well in excess of the duration of the simulation, and finally I wanted them randomly emitted from this cube, so as if the birds were all just kind of like sitting around on the patio and all of a sudden they just all wanted to take off.

You are going to have birds, smaller than other birds as well, and then you can combine this little reactor system so that when the birds fly into the barn and then inside the barn is reactor system then even more birds fly out. So how do we guide these birds? And the answer is right here in this object, which I have set up as a force field. And I have set this ball, just a simple ball, and I have assigned it to be a force field and it's the same kind of field that we've talked about with all the other particle systems.

Only I gave it a really strong strength, so that it really can draw these birds from the pretty far distance away. They'll all be drawn towards it. Then all I needed to do was just move this around and to do that moving around, I used all of our basic animation techniques to go ahead and move the cube and key different locations showing down here in the IPO window as to where this cube moves around. So as it moves, it draws the birds and you can kind of see as it's moving away, see how these birds are kind of drawn towards it.

And the ones out here going, "hey, I'm getting away from the flock," and so those boids rules come into play. They turn around and they kind of fly faster to try to catch up to the center mass of the flock. And then just about the time that these birds start to overshoot this sphere, this sphere moves so that they can now bank around, and follow around and swarm around just the same way I have seen birds do. You know when they are getting ready to go south for the winter.

We can see now that they start going around, and they will eventually circle around this sphere. So that's how you can add birds and boids. You'll see them all over in different simulations now that you know what to look for. Feel free to experiment. There is a lot of research papers on what makes up a swarm and how is it controlled, but this is how you can do it in Blender.

Show transcript

This video is part of

Image for Blender Essential Training
Blender Essential Training

131 video lessons · 25556 viewers

Roger Wickes
Author

 
Expand all | Collapse all
  1. 12m 5s
    1. Welcome
      1m 16s
    2. Using the exercise files
      58s
    3. Using Blender's full capabilities
      4m 16s
    4. Getting and installing Blender
      3m 8s
    5. Mouse and keyboard differences on the Mac
      2m 27s
  2. 1h 6m
    1. Blender oddities
      7m 38s
    2. Introducing the User Interface, Console, and Render windows
      3m 8s
    3. Configuring the desktop for an efficient workflow
      6m 27s
    4. Using the mouse and tablet on a PC or a Mac
      5m 7s
    5. Acquiring keyboard skills
      7m 38s
    6. Window panes and types
      7m 53s
    7. Exploring the default scene
      5m 53s
    8. Setting themes, UI colors, and user preferences
      4m 0s
    9. Understanding how to safeguard your data with autosave and backups
      6m 52s
    10. Appending and linking assets
      7m 27s
    11. Using the open-source movies and assets
      4m 18s
  3. 2h 7m
    1. Working with objects in 3D space
      6m 24s
    2. Navigating 3D views
      4m 23s
    3. Understanding Blender modes
      1m 51s
    4. Understanding meshes
      2m 8s
    5. Editing a mesh
      3m 28s
    6. Using the Mirror modifier
      2m 55s
    7. Working with Vertex groups
      2m 35s
    8. Using Bézier curves
      3m 52s
    9. Working with text objects
      5m 23s
    10. Using reference images
      3m 38s
    11. Modeling boots by extruding circles and joining meshes
      8m 59s
    12. Applying the Mirror modifier to duplicate the boot and rotate
      1m 58s
    13. Modeling a helmet with NURBS and the Boolean modifier
      7m 14s
    14. Modeling a belt and pants by making a compound object from multiple primitive objects
      3m 51s
    15. Modeling legs by using edge loops and the Knife tool
      6m 9s
    16. Modeling a chest and arms using edge loops
      5m 30s
    17. Stitching the shoulders and neck
      5m 13s
    18. Modeling hands with the Proportional Editing tool
      9m 4s
    19. Linking vertices to create knuckle joints
      4m 7s
    20. Reinforcing modeling basics to create the face, eyes, nose, and ears
      13m 6s
    21. Appending and linking assets
      3m 54s
    22. Sculpting basics
      3m 3s
    23. Using the Subsurf modifier to smooth
      2m 34s
    24. Parenting
      2m 7s
    25. Working with groups
      2m 1s
    26. Understanding the endless possibilities for editing mesh with modifiers
      2m 37s
    27. Duplicating objects using the Array modifier
      1m 54s
    28. Modeling a set
      7m 52s
  4. 39m 41s
    1. Lighting overview
      4m 25s
    2. Using the Omni lamp
      4m 50s
    3. Working with the Area lamp
      2m 57s
    4. Using the Spot lamp
      4m 9s
    5. Using the Sun, Sky, and Atmosphere lamps
      4m 51s
    6. Using the Hemisphere lamp
      2m 3s
    7. Working with Ambient and Radiosity lighting
      7m 34s
    8. Lighting with three-point and other multipoint lighting rigs
      5m 30s
    9. Understanding shadows
      3m 22s
  5. 1h 21m
    1. Realism overview
      2m 56s
    2. Creating a world in less than seven days
      6m 36s
    3. Applying ambient occlusion
      3m 47s
    4. Working with basic materials
      3m 24s
    5. Working with node materials
      4m 27s
    6. Applying Pipeline options
      2m 51s
    7. Painting vertices
      3m 13s
    8. Using shaders
      7m 59s
    9. Using mirrors
      4m 41s
    10. Working with transparency
      4m 28s
    11. Using halos
      2m 40s
    12. Simulating with Subsurface Scattering (SSS)
      4m 26s
    13. Applying textures
      9m 34s
    14. Mapping image textures to an object to create a decal
      4m 19s
    15. UV unwrapping
      4m 54s
    16. Applying multiple materials to a single object
      3m 31s
    17. Painting in 3D
      4m 14s
    18. Using bump maps
      3m 14s
  6. 1h 25m
    1. Understanding animation
      4m 14s
    2. Keyframing objects
      6m 15s
    3. Keyframing materials
      3m 14s
    4. Creating Shape keys
      2m 28s
    5. Creating Facial Shape key animation using reference video
      2m 12s
    6. Animating by combining Shape keys
      2m 53s
    7. Working with lattices
      3m 37s
    8. Using hooks
      1m 30s
    9. Working with Vertex groups
      2m 33s
    10. Creating armature objects
      3m 44s
    11. Mirroring armatures for bilateral creatures
      3m 43s
    12. Attaching mesh to the armature by way of skinning
      5m 7s
    13. Posing a character
      4m 43s
    14. Using inverse kinematics
      4m 29s
    15. Creating a walk cycle with inverse kinematics
      6m 34s
    16. Completing the walk cycle
      3m 49s
    17. Limiting range of motion and degrees of freedom
      3m 47s
    18. Managing actions using the Action Editor
      3m 52s
    19. Blending actions together using the Non-Linear Animation Editor
      4m 34s
    20. Tracking
      3m 2s
    21. Following a path
      2m 21s
    22. Mimicking an existing animation
      3m 47s
    23. Using the grease pencil
      2m 56s
  7. 50m 43s
    1. Understanding particle systems
      2m 20s
    2. Working with game engine physics
      3m 52s
    3. Spewing particles
      7m 25s
    4. Guiding particles
      3m 43s
    5. Creating reactions and collisions with particle systems
      3m 15s
    6. Creating hair and fur
      4m 25s
    7. Grooming hair and fur
      3m 26s
    8. Jiggling and squishing soft bodies
      3m 43s
    9. Simulating cloth
      6m 10s
    10. Simulating fluids
      5m 47s
    11. Using boids to simulate swarms, schools, and flocks
      6m 37s
  8. 21m 29s
    1. Using Render controls
      6m 18s
    2. Radiosity
      3m 31s
    3. Stamping text on video
      2m 32s
    4. Setting up test renders
      4m 43s
    5. Rendering image sequences
      4m 25s
  9. 1h 5m
    1. Viewing node thumbnail images on certain Macs
      1m 31s
    2. Overview and integration
      2m 12s
    3. Render passes and layers
      4m 27s
    4. Using Input nodes
      6m 22s
    5. Using Output nodes
      3m 54s
    6. Working with Color nodes
      4m 29s
    7. Color mixing and layering
      3m 27s
    8. Using Distort nodes individually and in combination
      7m 15s
    9. Using Vector nodes
      6m 46s
    10. Creating effects with Filter nodes
      8m 49s
    11. Using Converter nodes
      6m 7s
    12. Chroma keying with Matte nodes
      6m 15s
    13. Understanding node groups and reuse
      4m 17s
  10. 38m 43s
    1. The Video Sequence Editor (VSE)
      11m 47s
    2. Integrating audio
      3m 31s
    3. Using VSE Greenscreen and other plug-ins
      5m 40s
    4. Integrating the Compositor with the VSE
      7m 50s
    5. Layering and splicing video
      6m 18s
    6. Speeding up and slowing down sequences
      3m 37s
  11. 5m 26s
    1. Putting it all together: Captain Knowledge visits lynda.com
      5m 12s
    2. Goodbye
      14s

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ .

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Join now Already a member? Log in

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed Blender Essential Training.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member ?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferences from the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Are you sure you want to delete this note?

No

Your file was successfully uploaded.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.