Sunday, 14 December 2014

Ground Painting

One of the final stages of the project was to create a ground for the scene. For this I decided to try vertex painting. This is where instead of applying just one texture to a mesh, you're able to paint between two textures by applying the textures onto the vertices of the mesh. However, for this to work a mesh can need many vertices. Since this was just a plane mesh it was only a few subdivisions higher adding around 12 vertices.


This is the layout of the material for vertex painting. In this I have scaled two textures to the desired size and plugged them into the same lerp. The alpha point of the lerp node is filled by a vertex color node which is what allows the painting between verts.

 Here you can see a blend of the two different textures, one a cracked earth pattern, the other a sand/gravel texture. Also in the image are black dots. These indicate the location of the vertices and hence where the paint brush will apply the selected texture.

Finally, here is a preview of the ground in the scene.

Matinee

Matinee is UE4s animation timeline. For this project I used it for basic movements such as a rotating sign.

To begin with, I added a Matinee Actor by clicking Matinee on the top toolbar and pressing 'Add Matinee'.

This opens up the timeline...


In this window, I'm able to create a certain group that controls what object I animate and what type of animation it does when keyframed. In this case it was an Empty Group with a Movement Track attached. This allows me to select the object and keyframe its rotations.


Here is the group with keyframes added for the sign. As the animation plays it smoothly changes between 90 degree rotations until ending at 360, resetting to 0 and repeating. This creates a constantly rotating sign for as long as the game is being played.

I did the same for the day/night cycle however instead of a Empty Group it was using a lighting group.

Particles

Another thing I wanted to add to the scene were particle systems, mainly smoke and fire.

To begin with I used a YouTube tutorial by Pub Games here and the UE4 Documentation here

These helped with the creation of these particles as prior to this, I had no experience using the particle systems in either UDK or UE4.

To begin with I imported a smoke texture and a roiling fire texture




These then had to be made into a material that would be used for the particles.

 
In this the two panner nodes move the materials opposite ways to each other at different speeds to create the illusion of movement in the fire. 
  • We multiply them together into one and mask the Red/Green channels followed by scaling the smoke texture. 
  • The top node allows use to colour the fire particles. 
  • We multiply the multiplied texture and Particle colour nodes and add them to a depth fade finally plugging them into Emissive for colour and Opacity for fading.
Once the material has been made, we add it to the particle system in Cascade. 


Here we can see the resulting fire with parameters. The 2nd and 3rd particle emitters are the smoke and sparks around the flames. Despite the setup of the material being complex at first, with repetitive use, this became easy to do and Cascade is a simple tool with use.

UE4 Import

Once the models were done and UV'd, I began importing them into UE4 to layout the scene for visualisation purposes.


Above is the basic mesh setup of the scene. Next I had to check the material and lightmap settings to make sure the import for materials and the baking of lightmaps was effective on the models. To do this I opened the Static Mesh Editor.

In this window, I was able to individually check each of the static meshes to make sure the options were set correctly. A few time after baking the lighting, I was unsatisfied with the results. I then went back into this window and changed the Lightmap Resolution option giving more pixels to use for baking light.

Below we can see an example of a UE4 lightmap on the Zed building and the options panel with the Lightmap settings on.



The next step was to import the textures to place on the meshes.
By simply dragging the .tga files into the content browser, they all imported with predefined options.

Here is the textures used in the scene.To make them usable, we have to create a material. By right clicking the content browser window you can add a new material and double click it to go into Material Editor.

These are the options available on a material. In this case, it is a glowing sign of Marcus. This material had to be set to Translucent to make the sign work and Two Sided ticked to make the sign appear when looking at it from behind.
 

Lastly, here is the layout for the sign using UE4's node system. The top nodes control the emissive strength and colour, the middle node controls the opacity and the bottom creates a wind effect which in this case is used to simulate a static distortion effect.

Once saved, you can drag the material onto the static mesh and it will apply it for you. Here is the sign in engine.



Modelling

Since the source for references is Borderlands, I am able to use the game itself to collect reference material or move around the model itself. As such it was an easy process to go straight into the modelling stage.


Here is the low poly version of the Zed building made by extruding a single cube and inserting edge loops.


 At this point I smooth it then change it to the Smooth Mesh to Poly convert...


Finally, adding in the extras like vents, water towers and columns, Zeds building is finished. The long part of Zeds can be cut in half and duplicated to make Marcus' building.


This is the New-U station (Spawnpoint in Borderlands). The wire was made by extruding a cylinder along a curve.

Lastly, these are some assets that will be duplicated around the level as clutter helping to fill the scene.