08/05/2018

Unreal Additions

 
 Today focused on finishing final elements to the level in Unreal game engine.  This include adding point lights to lampposts to enhance the lighting.  Creating fog and rain in the level as well as adding collision to the outside boundaries of the level.




Intially when going into the level to play, the player kept falling through the floor, even though collision had been created.  To fix this caveat, the settings for the floor was changed to complex rather than simple and then changing the collision settings further by selecting use complex collision as simple.  This resolved the problem and allowed the player to roam around the level.



For collision around the level, volume boxes were dropped in, acting as an invisble wall, preventing the player from going over the edges during game play.  The volume boxes were simply stretched out and placed into the correct position.  This was aided by the following tutorials.  https://www.youtube.com/watch?v=XLvJnFUk3Cc, (Dev, 2014), https://www.youtube.com/watch?v=LZOTNnGFdzE, (Retro Gamer, 2016).

The next part was to add simulated rain to the level.  Following a tutorial on the subject, https://www.youtube.com/watch?v=Qmb2FrFunME, (Ashford, 2017).  Rain was created for the level.  Material to represent the rain drops needed to be created, firstly.  Creating a material in the content folder, and a particle effect.  Dropping the particle effect into the blue prints and linking them up to the A nodes in the multiply, then linking the multiply to emissive colour and opacity, which can be changed in the physical material boxes on the left hand side.  A radical gradient exponential needed to be created and linked to the B nodes of the multiply.  Thus creating the rain colour and particles.


Opening up the particle system in the content folder, and following the tutorial, additions needed to be made in order for the rain to work effectively.  Initial location, size by speed, const acceleration and collision (scene depth).  A second particle emitter was also required to be set up in order for splashes to be displayed on the ground for realism effects.  Also, GPU sprites needed to be selected in order to prevent lagging within the level due to the rain.
Following each stage of the tutorial and changing the options accordingly for the rain to successfully appear.  Firstly selecting the rain material on the emitter section.
At spawn, selecting distribution float constant, and increasing constant to 75000 to increase the number of rain particles.
The life span of the rain particles needed to be changed to max and minimum 5.0 for the rain drops time lifespan as part of the effect of simulating rain fall.
Size is for the size of the rain particles, changing to X-3, Y-3, Z-10.  The same was done for the minimum except Z is -10.
Velocity needed to be changed from the particles going upwards to going downwards, changing X and Y to 10 and minimum Z to -500, creating a random spray.
Colour was changed to a light blue for the rain. 
Location numbers needed to change to 5000 in X & Y and 4800 in Z.  In minimum Z, -200. This is so the rain spawns from a area covering the level.  The numbers can be changed accordingly to size of the level, and so the rain is being emitted and spawned from the sky and not the floor.
Particle size and speed was set X 0, Y 5, Max scale X 0.4, and Y 5. 
Acceleration was set to Z -900
For collision, in particular in this section, changing response to kill instead of bounce.  This is so the rain drops die on collision with the mesh rather than going through the floor.
The second particle emitter was for the effect of splashes on the ground or against the mesh.  Once again selecting the rain material in the emitter option.
Only 500 was selected for the constant as not all the rain particles need to splash against the mesh.
Lifetime min and max selected at 0.1.
With the size of the splashes changed to max 8, whilst minimum 6.
Velocity of splashes for max changed to X &Y 10, and Z 100.  Minimum X &Y -10 and Z 50.
Location set as before to 5000 by 5000 in X & Y.

Once completed select restart sim and restart level, to check that rain has worked as planned.  Initially the rain only covered a small portion of the game level due to the settings entered from the tutorial.  Changed were made to the size of the area the rain fell, however, this still did not cover the whole floor area.  The rain was then duplicated six times to cover the floor area of the level, which seemed to work.  However, once playing the game, the player seems unaware that there is rain in the scene.  The rain does not reach the ground floor, stopping at the roof tops, and once the player is on the roof tops, the rain does not appear consistent.  Further investigation is required to improve the rain in the level.




The next part was to introduce fog to the level as well as to change the level from day time to night time.

Searching for fog in the modes section and then dragging dropping into the scene for effect.  Following another tutorial on fog and mist effect for Unreal 4, https://www.youtube.com/watch?v=DsjaAguvzq4, (Ashford, 2017).  


Lowering the fog icon for exponential height fog, creates more mist on the ground.  Furthermore, options can be changed accordingly to change the thickness of the fog in the level as well as the colour.  Fog density was changed to 1 to give a thick fog, however not enough to blind the player from obstacles or opponents within the level.  The opacity setting made the fog thinner, and changing the colour setting so making the fog a dark blue colour.  Fog cut off distance gives the option to change the fog at a distance.  This limits what the player can see in the level with this option enhanced.






To try and further add to the atmosphere of the level, by turning the scene from a day scene into a night scene, another tutorial was followed.  https://www.youtube.com/watch?v=S8TfTMteptI, (Dev, 2015).  The tutorial advised selecting the sky sphere, changing the rotation so the light is below the level, and then changing the colours of the scene to darker colours.  This helped, however it did not produce as dark a scene as had been hoped for.  However, alongside the fog and rain, the desired effect in the scene with these elements has created the atmosphere desired and set out from the research stage.

The last part was to create player start points around the level. Six player start points were created around the level and positioned equally to balance out the game level's flow, so not to give a team or individual an advantage over the other.  These points were positioned opposite side of the level, given cover, or selected in the centre on the roof tops to be away from other players.










Comments

Popular posts from this blog