Blog Post 6 – Particle systems
Particle systems are a modification which can be applied to an object in Blender. They are used to procedurally generate a smaller object or particles onto the main object. Typically particle systems can be used to generate hair on a characters head, flowers along a grass field, or rocks a beach. For this game, particle systems have been used to generate the grass on both sides of the wall as well as fields of wheat on the Jazz side. Although these additions are not essential for gameplay, they do help make the world more alive and realistic. Without grass, the worlds would feel flat, empty and unnatural.
Particle systems are relatively easy to use. To begin with, I modelled a blade of grass. After this, I duplicated the object, rotated it, scaled it and repeated until I had modelled a clump of grass. After the clump of grass was modelled I made sure that the origin of the shape was at the central base of the object, this was needed for a later stage. Afterwards, I then selected the scene floor, which up to this point was a large, flat green rectangle that every object in the scene resided on. I added a new particle system and chose a hair emitter. A hair emitter is selected as it allows the particles to remain stationary, instead of in motion. From then I changed a couple of settings so that that the particles would be a specific object, in this case, the grass clump I previously modelled, and then I changed the rotation so that the grass would face the direction of Object Z (facing skyward as grass tends to do). Other changes were made such as choosing how many clumps of grass were needed, and what scale they should be. Since the map is relatively large, thousands of these “particles” (or clumps of grass) were needed to make the grass appear dense. However, I did come across an issue. The grass was long enough that it poked through the pavements and streets which resided above the base grass floor of the map. Using weight paint mode, a mode which allows the user to paint a model either red of blue, I was able to outline and paint areas I wished would have dense grass and areas which I wished would have no grass at all. In weight paint mode, areas that are red have a high spawn rate of particles, areas that are blue have a low or non-existent spawn rate of particles. Using weight paint mode I made the whole map, except where roads, houses or empty fields would be. You can see in the image below, that the grass has spawned right where I wanted it to be.
Using the same technique I was able to create fields of wheat. After modelling one shaft of wheat, I created a particle system on beds of dirt and made the wheat spawn along with it. This technique was very useful, as it allowed us to create a detailed environment whilst maintaining a high performance during gameplay. Furthermore, by procedurally generating grass etc, along with areas of the map, this saved time as I did not have to hand place each clump of grass, which would have taken days considering there needed to be thousands of clumps on each side of the map! Unfortunately, I learnt about this technique rather late on in the project. This same technique could have been used to procedurally generate huge areas of trees on both sides, which would have saved me having to hand place each and every tree. The same goes for flowers and rocks which were already placed in the game as well. That being said, particle systems do often overlap particles, so perhaps hand placing the trees especially, as it allowed me to be precise and ensure that the trees did not clip into one another. However, the game isn’t finished yet. We plan to add a lot more life into the game as further builds are released and although this technique could have come in handy earlier, perhaps to generate flowers or rocks, it still might be used for further detail awaiting to be added!
Above you will find some screenshots which show the life brought into the game, only through the use of particle systems.
- Adam Watts