Week 11-12 Particles and Boids

In this section we get into particles. The immediate examples will be related to connecting water volumes between levels with small waterfalls, splashes, etc. By combining waterfall particles, splashes and wakes you can create realistic transitions over rocks, obstacles and other environmental entities. While this exploration is only for a single waterfall, there are vast uses for particles.

Use the Rollup Bar> Entity> Particle folder (in the small browser window)>ParticleEffect to place the particle emitter gizmo in your scene. Make sure Follow Terrain is activated. In the attributes stack in the Rollup Bar you can assign a ParticleEffect and then use the Database View (DB, tool bar, top).

particles_01

You need to select particles from the Database view:

particles_02

Once you select particles from the Database you will see the Database window populated options such as attributes, different particle effects, and also previews of the particles’ behavior. This is great because you can see exactly how they behave before adding them to your level. This saves a lot of time with hit-or-miss attempts with so many options. Once you find the particle behavior you want it can then be further modified for your specific needs.

particles_03

It should also be noted that in the options window, top left (above) that whatever assignable characteristics are available are in individual folders. In this case there is also a folder called Foam with selections for foam behaviors.

To assign your selected particle behavior to your emitter, simply right-click and select “Assign to selected objects”:

particles_04

At this point your particles are placed and you will want to make them fit your environment correctly. The particle emitter can be translated, rotated, etc to achieve the desired effect, in this case going over the rocks as a small waterfall down to the continuing stream. In the entity properties in the Rollup Bar you can change the scale, speed and strength. Once your attributes are set to your satisfaction you can simply copy and paste the emitter and move it to another location.

Particles flow outward along the Z axis. It’s easy to eyeball the direction, because of the handy previs, but if you want to see the exact emission direction then switch between the World and Local coordinates to see the orientation of the emitter:

particles_05

Here you can see the Z-axis as the yellow axis line. This is in the Local coordinates view, the selection of which is seen circled in red, at top. In this case the emitter has been rotated to match the desired direction of the waterfall. Below you can see a single particle emitter has been copied twice to create the full effect:

particles_06

To create splash effects at the base of the waterfall as it hits the water below all you have to do is make another copy of one of your emitters, go back inot Database view, select an appropriate splash effect, and then, once again, Right-click and select “apply to selection”. Of course, one could also start from scratch using the Database view.

particles_07

Once again you can see that by copying, pasting and translating we can easily create splash effects where there would otherwise be a very unnatural-looking transition from waterfall to calm water. The same procedures and concepts can be used to apply Wakes (from the Database view) at the top of the waterfall.

You can add as many particle emitters as you need to make it look right, but keep in mind that particles are the type of asset than can chew up resources and affect performance. It’s a good idea to plan ahead and always start from the perspective that conserving resources is important. Also keep on mind that as you add or copy and paste particles, you should give each entity a unique name. In the same way that you should always name new items in Maya, 3ds Max etc it is a good idea here, as well. A good naming convention might be something like: waterfall_02_wake_03. Or, waterfall_east_wake_02. Once your scene is populated with various assets you’ll want to access them by using the Select Objects list from the top tool bar, but if you do not have unique, descriptive names, and everything is called “particles01 -30” you will have no idea where to find a specific item. The same is true of layers. Try to put individual types of objects on their own layers (Rollup Bar).

Water effects can also be created by applying a water material to imported geometry:

particles_08

Remember that what we see here is only one small example of what can be done with water particle effects. Above you can see an asset that was created in 3ds Max, imported, then applied with a water texture. This enables a designer to construct specific shapes of scrolling water.

particles_09

particles_10

Form here you might add particle emitters such as splashes and wakes to complete the overall effect. The idea here, whether it is designing the ground surface, vegetation, waterfalls etc, is that you are combining different elements to create a richer, more immersive environment.

Boids

One idea is that wherever you looking, something should always be moving. Whether it’s something obvious, like a waterfall, or mist, smooth ripples in water, shadows from swaying trees, etc, something should always be moving in order to sell the living, immersive environment. Movement, combined with ambient noise,  creates a consistent experience. Boids are part of this experience.

To add Boids: Rollup Bar>Objects>Entity>Boids:

boids01

Just drag the boids onto the level the same way you would particles. Boids are really great. As soon as you drag the boids gizmo onto the screen you instantly see the results.

boids02

In the picture above you can’t see much detail but that’s because of motion blur. The gizmo in the sky is the central placement of the boids. Once you have added boids you can control attributes in the Rollupbar just as with anything else. Scale, density, movement, randomization (this is great for adding an organic nature so that not everything is exactly the same), flocking distance, etc can all be controlled. Naturally you can also select what type of boid you want added to the level. Now would be a good place to note that you can design your own boids, as well, outside of the CryEngine sandbox. So for example you could be in Maya and design and texture a model of what you need and then take the appropriate steps to import it. it doesn’t have to be an animal, it can be whatever you need.

I think that boids are something that seems really nifty at first but is then easily abused and overused. Depending on what type of realism versus the fantastic one is going for, boids should be used carefully. One very important attribute in the Rollup Bar is Flocking. As you can probably guess, this controls the behavior of your boids as a group, for example a flock of seagulls or a school of fish. In the case of random birds flying around, you would not want flocking, but where you want group behavior, such as following each other, avoid player,s etc, you would want flocking. One thing that would be amazing would be to emulate the swarm behavior of starlings, but that would require a lot more than simple boids:

Leave a comment