Now that the bug removal segment is complete, I can look at adding some flies to our level using particle systems.
We figured that this would be the easiest way to do this, as we can create several “swarm” effects, both a small bursting directional one and a general full-screen one, without needing to worry about trying to add transparent videos or screen overlay effects (which would also be hardcoded and not allow for easy adjustments to reach the desired effect).
When Head is Removed:
For this effect, we want it to seem like a hoard of bugs emerges when the player first moves the back of the head off of the doll.
- To be realistic this should happen once the head has been moved a small distance away from it’s start position. To be simple, we could have the effect take place as soon as the game object is moved at all, and hope that the player will make larger movements after seeing what to do in level 1.
Once the “swarm” has emerged, the second particle effect will start, which will give the effect of lots of bugs flying around.
To improve the effect of this, the sound effect of buzzing should start quieter and slightly muffled, be slightly louder when close up on the doll, and become loud once the back of the head is moved.
- I should be able to use the current node and the audio source that is playing the sound to control the volume.
- when the swarm emerges the sound clip or audio source being played could change from a muffled version to a normal version of the buzzing sound.
After Head is Removed:
Setting Up the Particle Systems:
For our flies, I took a transparent image from the internet and pixelated it (so it matches the maggots) to use as a starting point (as this texture can then be changed later).
I adjusted the density of the swarm until I got something that would look like we want it to in-game, as we don’t want the effect too thick to the point that it completely obscures the player’s view, but we do still want it to be distracting and obvious so I also made the size of all the fly particles a little bit bigger since some of them should feel much closer to the player.
The next step is to make sure the particle system will follow the main camera.
The easiest way to do this is to just make our particle system object a child of the main camera. I could also look at adding a particle system component to the camera object itself, but keeping them as separate objects should work just as well and allow me to easily change their transforms to position them separately.
After setting this up, I also tried a different look for the flies using just the basic particle texture set to a dark colour, as the particle being a still image is very obvious closer up and breaks the emersion and tone.
I don’t think it’s now as obvious that the particles are meant to be flies, and the perfectly round shape gives them less of a feeling of directional movement. Perhaps this could be fixed with some motion blur or trail of some kind, or finding/creating a fitting texture for the flies.
Using the trails module I was able to achieve something to this effect, using the basic particle texture for the material again. I think this small change makes the particle system look a bit more realistic and creates the effect we wanted.
Now I can use this system as a starting point for creating the “burst” of flies that will come out of the head.
For this, I will need a single, non-looping emission with a shorter range and a set direction, in a cone-like shape.
If possible, I’d like this burst to be in the opposite direction the player moves the head to, so that it really looks like the bugs emerge from the opening the player has created. However, because I can’t guarantee how the player is going to move the head, I would need to do something similar to the method used to make the eyes in the drawer move, using a script to calculate the position/direction the player has moved their mouse/the object and setting the direction of the particle system to be the opposite.
Since this method will be more complex, I will start with a fixed direction going up and right out of the back of the head, on the assumption that the player will immediately move the head left to drag it towards the target. This way, I can work on setting up this next particle system and the code to enable/disable the emissions as needed. Afterwards, I can look at making it more complex and responsive.
To finish this segment (for now at least), I will add some audio of flies buzzing and a script to control the volume/clarity to make it more immersive.
Laura Alford