Swarm of Bees

In this tutorial we are going to use particle flow to create a swarm of flight gifted insectoids swarming towards and around a target. Same as our Ants tutorial, we can use an instance of an actual model of a bee flapping it's wings at a million miles per hour later on, for this we will just use a standard spherical shape in place of our bees.

See a preview animation of the effect to get an idea about what we are creating here:

http://animation.diclementi.com/bees.mov

Open a new 3DS Max scene and give yourselves 300 frames to work with. Then we can get started by opening particle view by hitting 6 on your keyboard or finding Particle View in the Graph Editors menu.

Find the "Empty Flow" operator in the depot at the bottom of particle flow, and drag and drop it into the empty light grey stage area. Then select the Title bar of the PF Source 001 box that it creates for you and adjust the particle system settings to the right in the command panel.

Unless you plan on making a huge amount of particles, it is always smart to set this to 100% in your Viewport so you can see exactly how your particles are behaving.

Next, drag and drop a Birth operator below the first PF Source 001 box in the empty light grey stage area and connect the blue node from your first box, to the empty circle node in your second box named Event 001.

I have chosen for my bees to start appearing (perhaps from a bee hive, or a crack in a wall, who knows) at frame 0 so that is what I will set me Emit Start value to, and I want a steady stream of them appearing from wherever they live for awhile, so I made my Emit stop frame #70. I think the default of 200 bees is a good place to start, we can always increase or decrease this later on.

Then drag and drop a Position Icon between the Birth and the Display operator in Event 001. This will make our bees appear from the little orange PF Source icon in your viewport. We can position the icon anywhere we like after that.

The default settings are fine, but we will probably want to change our PF Source Icon to a different shape and size to get the best looking results. Minimize Particle View for now and select the little orange PF Source icon in your scene.

Set the Icon Type dropdown to Sphere, and give it a Diameter of 5.0 This would fit nicely into the opening of a Bee Hive for example.

I like to turn my Logo off, so I can see the actual dimensions of my sphere icon as well which makes it easier to place in a scene.

Then go back to particle flow and add a "Send Out" test operator to the bottom of our Event 001 box.

This will immediately send all of our particles to a new event of our choosing. I have chosen to use this little operator because I want the next event to be contained by itself keeping our birth and our next event which makes our bees swarm towards a target separated. Doing it this way lets me make sure that no bees get lost, or stuck, or confused in any way.

Next, drag and drop a find target operator from the depot and place it in the empty light grey stage area below our first Event 001 box and connect the new blue node from our Send Out, to the new empty circle node in our Event 002 box.

et the speed to however fast you want your bees to travel towards the target icon at, since they are kind of all over the place as they fly, I have also set my variation to 100... letting them do almost whatever they want.

I have limited the amount they are allowed to accelerate to 250.0 so they hover more than rocket and I have added some Ease to them as well which means they will slow up a bit as they reach the target. This keeps them fluid and not stiff or stopping on a dime.

I also want to check the Follow Target Animation box, which means I can animate this target, or link it to a character and the bees will continue to seek it out as it moves.

Now you should have a new icon in your scene, you can move it away from our PFSource icon a bit to wherever you wish for your bees to go to. For the purpose of this tutorial I am just gonna move it over and up a little.

If you scrub along your timeline you should see a lot of little tick marks leave the PFSource Icon and head right for the new target icon.

So far so good, now we need to make them move and behave like bees rather than a laser cannon.

We are going to do this using a couple of Wind space warps. Wind comes equipped with Turbulence settings, and those are perfect for making bees act random.

Go to your create tab and find the space warps button, then in your top view draw out 2 seperate winds. We draw them in the top view so the directional arrow of our wind points up automatically. It does not matter where you put them, or how big you make them. Once you have select one of the winds, and go to your modify tab to change its settings.

Set the strength to 0.0, all we need is the turbulence for this one.

Give it a turbulence of about .5

Frequency of .4

and Scale of .04

Then select the second wind and adjust its settings on the modify tab.

Again set the Strength to 0.0

Then give your Wind settings some different values than the first.

I have chosen 0.2 for the Turbulence

1.4 for the frequency

and 0.15 for the Scale.

These two winds will battle for control over the bees, causing them to move around seemingly at random rather than in a straight line.

Return to particle view (6) and drag and drop a force operator between the Find Target and the Display 002 in our Event 002 box.

Then click on the By List buttons in the Force Settings, and add both of our Winds to the operator.

As of right now your particles should be moving a heck of a lot more like a swarm of bees. Now all we have to do is give them a shape and point them in the right direction.

You can use a Shape Instance here if you have an actual animated model of a bee, but for our purposes today we will use a Regular Shape. Add a Shape operator below the force.

I have chosen a 20 sided sphere to stand in for my bees, and I have given it a scale of 1 which seems to make my bees about the right size. If you are still seeing tick marks and not spheres remember to change the top dropdown to Geometry in the Display operator in your Event 002 box.

I have also marked the Scale % box, and given my bees a 10% variation in size... not all bees are built the same size you know.

This is all well and good but I like my bees to be less like a sphere and a bit more elongated, I will add a Scale operator to give them a little better shape... note though, that if you are using a model this scale is unnecessary.

Add a Scale operator to the list below Shape 001.

Uncheck the Constraing Proportions box, and then give the X value 200%, and the Y and Z something smaller like 75%

This will simply stretch our spheres out in 1 direction making them more oval than sphere.

The only problem with this is that our bees are all perfectly leveled off as they fly and I'd rather them point in the direction they are traveling whether it be up down or sideways.

So to fix this issue we will add a Rotation operator below our Scale.

Simply change the top drop down menu from Random 3D to Speed Space Follow. That will rotate each particle so they are pointing in the direction they are traveling.

That's it! You now have a mass of swarming insects continually seeking the target... Try linking the target to a Character's Head as it moves through a scene or just animate the target moving using key frames.

http://animation.render-test.com/bees.mov

Try adding some Deflectors so the bees bounce off of the ground or the character or whatever as well!

Hope you enjoyed this one too, keep practicing your particle skills or these bees will sting you a thousand times!

5