When we were being taught how to make a collection of rooms and hallways we were also taught how to make and use sound and lighting in the Unreal engine. We were taught this so we could use it in the upcoming project and other future projects that require us to use sound and lighting in the Unreal engine and also use it for future jobs.
We first set up the model rooms and hallways in the Unreal engine, once set up we were first taught how to put lighting into the model. There are two main types of lights, the normal light bulb and the spot light, once one of the lights were placed in we could edit it on the right hand side of the Unreal engine’s settings bar. In these settings, we were shown that we could change the intensity of the light, the colour of the light and how much the light would bounce. After we were shown the main settings we were then shown the difference in both the lights settings, the normal light bulb’s area radius in light can be changed so that the light reaches far, making it look bright or it doesn’t spread at all, making it look dim. The spot light’s focus area can be changed, such it can have a intense light on one spot or have a much bigger area radius where it focuses on, it can also change how far the light travels as well.
Next we were taught how to use and control sound in Unreal, we first imported the sound we wanted, for this case it was a rain and thunderstorm sound file which would be ambient sound in this environment. We first dragged in the sound file and place it right in the middle of the environment we made, we were then sound that the sound file has two spheres on it. The inner sphere was where you could hear the sound clearly and the outer sphere was where it would fade as the player got further away from it. We made the radius of the spheres big enough so that it would cover the whole environment, that way it would not fade and stay at a constant level. We were then shown how to make the sound loop and how to adjust the pitch and volume, this way we could make it sound like its coming from outside.
After we did the natural ambient sound, we were shown how to make a specific sound, which is when the player walks into a specific area an ambient sound/music plays. We first placed a trigger box inside the room in the environment and the sound, we then scaled it to fit the room and the sound to cover the enviroment, that way if the player walks into the room the music would activate. We were then shown how to link a sound with the trigger box in the levels blueprints, we first typed in in the blue prints “On actor begin overlap” and placed it in blueprints, then we connected the sound file with the command.
The last sound technique we were taught was how to make an interactive sound, a sound that only plays if the player interacts with something, in this case a TV. We again create another trigger box, but this time it was one that covered a box which represents a TV, we made it big enough for the player to fit inside but not to big otherwise the player would be able to activate it at a distance. We then went into the blueprints and typed in “keyboard E”, “on actor begin overlap”, “on actor end overlap”, “play sound” and then “gate”.
We first connected “on actor begin overlap” to open on “gate” and then “on actor end overlap” to close on “gate”, after that we connected “keyboard E” to interact and the on the exit of “gate” was “play sound”. Now this would make the sound file play when the player interacted with the object by pressing E however the only problem is if the player kept pressing E the sound file would overlap itself. To fix this we deleted “play sound” and then placed a “flip flop” after the “keyboard E” and connected it to the “Gate”, I then placed another audio file in which was a click to represent it turning off. I connected that to “Flip flop A” and on the other side “Stop”, this make it so that if the player clicked again it would play another audio to signify it turning off, then it actually turning off.
I feel like I did pretty well when learning and using sound and lighting, the lighting was easier to set up than the sound however, as the programming was a little complicated. I did have a couple of difficulties setting up the lights with the enviroment, sometimes the light would make the whole room bright even with the intensity low. To fix this I lowered the bounce on the light and reduced the radius of the light and if that didn’t work then I would turn the light into a movable object, it worked but I do not know why.