Realistic Rendering

RealisticRenderingHeader.png

This example shows off the realistic rendering possibilities of Unreal Engine 4. The goal was to create a small scene that had the look and feel of an architectural rendering, as those produced by CG rendering engines such as VRay and Mental Ray. However, the primary stipulation in this case was that all assets be game-ready, meaning that no high-poly modeling could be used. Everything in the scene had to be created such that one could make an actual and practical game using these methods.

The scene utilizes the following engine features:

  • Physically-based Materials

  • Pre-calculated bounce light via Lightmass

  • Stationary lights using IES profiles (photometric lights)

  • Post processing

  • Reflections

It is important to keep in mind the scaling of the environment, as this affects the settings within both Lightmass and post processing. This scene was designed with a 1:1 ratio for Unreal units to centimeters.

Available Maps

There are 3 maps included with this example.

Image Name Description
RealisticRenderingHeader.png Room.umap This is a standard daylight room setup in which sunlight streams in through the window. There are also lights placed over each picture frame. When you play the map, there is an automated camera flythrough that shows off the level. This is the default map for this example.
RoomNight.png RoomNight.umap This is the same scene as the Room map. However, in this case, the lighting is primarily from the indoor lighting fixtures, as there is no sunlight. When you play the map, there is an automated camera flythrough that shows off the level.
RoomNightNoLights.png RoomNightNoLights.umap In this setup, the interior lights have been switched off. One lamp flickers in the corner, and some ambient light comes in from the window. When you play the map, you are given a flashlight and can fly around the level.

Lighting

Of particular importance in the overall look of each of these maps is the lighting, which is what provides most of the realistic feel. Here we have broken down the primary lighting concepts for all three levels included with this example.

Materials

Unreal Engine 4 makes use of a physically-based Material system. This means that somewhat obscure Material properties such as "Diffuse" and "Specular Power" have been replaced by properties that are more physically descriptive in nature, such as "Base Color" and "Roughness." Many of these properties are 0 to 1 based and do not require extravagant float numbers. This is similar to the Material systems used in packages such as Pixar RenderMan. Below are the four primary properties that define the physical nature of a basic Material. Combining these together in various ways allows you to create virtually any possible type of real-world physical surface.

Property Name Sample Description
Base Color

Drag to preview
As the name suggests, this is the basic color of the object. This is similar to Diffuse in previous Material systems. It can take a texture as well as a color.
Metallic

Drag to preview
This controls how "metallic" the surface of the object is. Put another way, this controls how much of the surrounding environment reflection overcomes the base color of the object itself.
Specular

Drag to preview
This controls how much of a specular reflection is visible on the object. In physical description terms, this is like adding a layer of gloss or glaze across the top of a surface, allowing the surface to pick up reflections of the environment without overriding the Base Color, as you would see with a high Metallic value.
Roughness

Drag to preview
Roughness controls the diffusion of the specular reflection. It applies the effect of "microfaceting" across the surface. Consider the difference between the reflection of mirrored chrome versus brushed aluminum.

For more technical and in-depth information on UE4's physically-based Material system, please see Physically Based Materials .

Coffee Table Material

Most of the Materials used in the demo are fairly simple at a conceptual level. We will focus on the Material for the coffee table, as the base concepts that drive this Material are reused on several objects in the scene.

CoffeeTable.png

The coffee table Material makes use of two useful techniques. The first is the use of a mask texture that uses R, G, and B channels to determine where metal, plastic, and wood are placed on the object.

CoffeeTableMaskTex.png

  1. Red channel - Wood

  2. Green channel - Metal

  3. Blue channel - Plastic

  4. RGB - Result of all four channels combined

Here you can see the layout of the Material (M_CoffeeTable_Mat_Inst) in the Material Editor.

Click to view full size (very large).

This Material has been highly parameterized, which means it is intended to be instanced and adjusted. In fact, this is the second important technique in use within this Material: we have set up the basic settings of the Material, but not tweaked them to the final look. Instead, the Material is instanced and then adjusted using the instance parameters. This is much faster than making adjustments and applying them over and over, which can be a real time saver during Material creation.

CoffeeTableMat_Properties.png

Reflections

This demo makes extensive use of reflections to show off certain objects. Reflections are handled in various ways in Unreal Engine 4.

  • Screen Space Reflections - Screen Space reflections are an engine feature in UE4 and are visible by default. These are visible primarily at near-edge-on angles. They work in cooperation with the Reflection Environment and Reflection Captures to create a whole sense of scene reflection.

  • Reflection Environment and Reflection Captures - Unreal Engine 4 makes use of reflection captures to create realistic reflections. These are created by way of strategically placed Actors in the level which create spherical or cube-shaped captures of the environment, which in turn are projected onto any reflective objects within their radius. In this image, you can see the Reflection Capture Actors placed to give accurate reflections to several of the objects.

    ReflectionCaptures.png

Carpet Object

CarpetObject.png

Of special mention in this example is the carpet object that is placed on the floor in the center of the room. This asset is designed to simulate the look and feel of a thick-fiber rug. In this section, we will break down - in general terms - how this asset was created.

Model

The model for the rug object is one of the central aspects of creating the effect. The model consists of four planar shapes stacked on top of one another, with a rounded trim edge around the outside. These stacked shapes give the illusion of a volumetric form along with the Material, which gives the effect of fibers. The following diagram shows a cross section of the model, exploded slightly to show each of the layers.

CarpetModelDiagram.png

CarpetModel.png

Material

The Material for the carpet makes use of Bump Offset multiplied and added into 4 separate stages. These four stages, multiplied by the four stacked pieces of geometry, give a total of 16 "layers" to the effect. The Bump Offset actually runs in a negative direction, giving the fibers a sense of receding down into the surface. This Material is highly parameterized and customizable.

CarpetMaterial.png

The Materials involved with the carpet include:

  • M_Carpet_Mat

  • M_Carpet_Mat_Inst