Reflections

An overview of the Reflections Example included with UE4.

Choose your operating system:

Windows

macOS

Linux

ReflectionHeader.png

This example shows off the real-time reflection capabilities of Unreal Engine 4. The scene shows a rundown subway terminal with a lot of water leaks, grimy ceramic tiles, dilapidated pipe work, and other worn-out environment details. In this document, we will give a high-level rundown of the techniques employed and the features involved in bringing the effect together.

The following image shows the reflections in this scene blending on and off to demonstrate their effect.

Reflection Environment

The Reflection Environment works by capturing the static level at many points and reprojecting it onto simple shapes like spheres in reflections. Artists choose the capture points by placing ReflectionCapture Actors. Reflections update in real time during editing to aid in placement but are static at runtime. Projecting the captured level onto simple shapes gives approximate parallax for the reflection. Each pixel blends between multiple cubemaps to get the final result. Smaller ReflectionCapture Actors override larger ones, so you can refine reflection parallax accuracy in areas as needed. For example, you might place a capture at the center of a room and then refine the reflection by placing smaller captures at the corners of the room.

reflection_environment.png

For more information on the Reflection Environment and Reflection Captures, please see Reflection Environment .

Reflection Capture Actors

CaptureIcon.gif

Reflection Capture Actors are objects that are strategically placed throughout the level and feed reflection data into the Reflection Environment.

There are currently two reflection capture shapes: sphere and box. The shape is very important because it controls what part of the level is captured into the cubemap, what shape the level is reprojected onto in reflections, and which part of the level can receive reflections from that cubemap (area of influence).

For more information on the Reflection Environment and Reflection Captures, please see Reflection Environment .

Screen Space Reflections

Screen space reflections are an engine feature that aid in the grounding of objects on flat surfaces like the ground. They are activated by default, and blend with the results of the Reflection Environment to give a more complete sense of reflection.

ScreenSpaceReflections.gif

Screen space reflections are active by default in Unreal Engine 4, but can be toggled using the console command r.SSR.Quality 3 or r.SSR.Quality 0 depending on the set. Below is the results of the reflection example scene both with (r.SSR set to 1) and without screen space reflections (r.SSR set to 0).

Reflection Considerations

When creating environments built to make use of reflections, our artists keep a few considerations in mind:

Contrast

Reflections will tend to be more pronounced and apparent in areas where there is a strong sense of overall light and shadow contrast. Just as in the real world, reflections will tend to "pop" in environments that are generally dark in and of themselves, but are cast in harsh lighting conditions. This is why the subway scene used in this example was selected. Being underground, there is no real source of natural light. The few light fixtures are spaced well apart and are rather bright. This means that the pools of shadow and darkness will become prime locations for reflections to stand out to the viewer or player.

Contrast.png

Real-World Reflective Surfaces

Along with use of contrast, it is also important when creating realistic reflections to consider the types of surfaces that would create reflections in the real world. In the case of this demo, we chose to use wet concrete on the floor with ceramic tile on walls. Water is dripping and running across most of the scene, adding reflectivity to most of the environment. This, of course, means that clever creation of materials is key to getting a good look.

For more information about material creation, please check out our Materials and Physically Based Materials documentation.

Subway.png

Placing Reflection Captures

ReflectionActors.png

The key to getting reflections just right is to place Reflection Capture Actors across your scene. Your first impulse may be to scatter these Actors across your scene until you see a good result. However, there are some rules to keep in mind when using these Actors:

  • Screen Space - Each of the Reflection Capture Actors incurs a cost based on how much of your screen is covered by its radius. In this way, they are similar to particles or dynamic lights. This means that you need to be careful not to over-push the radii of your capture Actors.

  • Overlap - Reflection Capture Actor radii can overlap. This increases the per-pixel cost of reflections caused by overlapping Actors. When combined with the fact that cost increased by screen space, it may quickly become performance prohibitive to simply cover your scene with high-radius Reflection Capture Actors.

  • Hierarchical Placement - To save resources and still have a nice layout of Reflection Capture Actors, using a hierarchical layout gives you a solid reflection setup with minimal overlap. In such a system, one large-radius capture is placed that grabs reflections from the background, and then a series of smaller capture Actors grab reflections around details.

LevelReflection.png

RED

Large radius. Reflects bulk of the level and the background.

BLUE

More localized reflection. Captures individual rooms.

GREEN

Detail reflection with small radius. Placed in areas where small important details are required.

Related Topics

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss