This tutorial by James Brady appeared in issue 98 of 3D Artist.
Unreal Engine 4
This tutorial will guide you through creating realistic lighting within Unreal Engine 4, starting from adding basic lighting all the way to adding post-processing effects and using the Reflection Capture system to realistically capture the lighting reflections in your Unreal Engine scene. We will be taking you through the creative process for a Silent Hill homage scene, which stormed videogame press worldwide after it was released online. You will discover what is involved in creating realistic lighting within a game engine, along with the theory of lighting while using PBR materials and in a mainstream game engine that supports PBR rendering.
Step 01 – Prepare your project
Before diving into a project, it’s crucial that you are confident in knowing what you want to create and what the end goal is for your project. This will end up saving a lot of time scrubbing for references, having to reshape your project on the fly if you ultimately opt to change your final result, and overall saves a lot of time and frustration. Once you’ve gathered enough reference and have a solid mood board, then we can move on to the blocking stage.
Step 02 – Block out your scene
Once your end goal is clear and you are confident in what you are trying to achieve, it’s time to start the creation process. This is the easiest stage in creating an environment and helps to get you into the correct frame of mind mentally before starting to add detail into your scene. You can quickly scrub together a block out by using Unreal Engine’s primitive geometry. This can be found on the left-hand side of the editor. This also quickly allows you to decide on which angle or aspect of your block out composition works for your scene.
Step 03 – Add lights to your scene
Once you’re happy with the block out, you can then move on to lighting the scene. This not only provides you composition, but it means you can also quickly see how materials and assets look when imported to the scene. For this project, when we initially approached lighting the Silent Hill-style scene, we were clear on the atmosphere we were trying to achieve, enabling us to have a solid idea on how the scene should be lit. Start by adding a directional light and a few low-lit light points. Lighting plays a huge role in how believable your environment looks and feels.
Step 04 – Achieve a chilling atmosphere
Once the lighting is set up in your scene and you’re happy with how it not only looks but feels, it’s time to then move on to nailing the atmosphere you are trying to portray. You can achieve this by using Unreal Engine’s Exponential Height Fog, which allows you to quickly create a chilling atmospheric composition while also leading the viewer’s eye. Start by adjusting the overall fog density followed by adjusting the overall fog opacity. You can also use directional in-scattering, which helps to blend the fog with the scene’s lighting setup.
Step 05 – Include your materials/assets
Once you’re content with the overall lighting and atmospheric setup, you should then begin to replace the overall block out with modular wall, floor and roof sections, followed by the assets that were created for the scene. It’s important to remember that when creating assets for a game engine, TRIS count is very important. Always remember that any assets in a scene that do not move – such as static meshes – should always be optimised. You can achieve this by deleting polygon faces that are not visible to the player. This saves TRIS count and overall UV texturing space.
Step 06 – Capture environment reflections
This stage is a crucial part of the environment creation process. This stage allows you to achieve realistic reflections within an environment and it also helps the game engine calculate how the glossy reflections should appear within the environment. In technical terms, the Reflection Capture actor provides indirect specular. We get direct specular through analytical lighting, but that provides reflections in a few bright directions. Indirect specular allows all parts of the scene to reflect on all other parts, which is important when you feature materials like metal that have no diffuse response and rely solely on secularity when using PBR shaders.
Step 07 – Post-process your scene
This stage is always my favourite part of the environment creation process. Adding post-processing to your scene enables you to tweak the overall look and feel. Examples include HDR blooming, ambient occlusion and colour tone mapping. In Unreal Engine 4, the post-processing volume is essentially only a type of blend layer that enables you to blend different effects on top of your scene. The post-processing volume also acts as a linear interpolation, which enables you to blend this with actors, such as a camera, when creating cinematic sequences.
Step 08 – Render images of your final scene
Once we’ve completed the environment process and are happy with the final product, we then need to move on to taking screenshots of the environment. One trick that I find speeds up the process is to add cameras to the scene to avoid situations of losing that perfect composition shot. This can be done by selecting All Classics on the left-hand side of the editor and dragging a camera actor into the scene. Once you drag a camera actor into the scene, a small box will appear outputting what that camera is rendering.
Step 09 – Add any final touch-ups in Photoshop
The final process is touching up the environment screenshots in Photoshop. Start by adding a Sharpen filter to really make the scene pop. Depending on how you’re trying to lead the viewer’s eye, you could start by adding a gradient overlay to focus the viewer on a specific area of the scene – this also helps to exaggerate the lighting within the scene. Follow up by adjusting the overall tone, contrast and brightness to finalise your result.