Adding Reflection Probes in Unity

What are Reflection Probes?

“CG films and animations commonly feature highly realistic reflections, which are important for giving a sense of “connectedness” among the objects in the scene.

However, the accuracy of these reflections comes with a high cost in processor time and while this is not a problem for films, it severely limits the use of reflective objects in real-time games.

Traditionally, games have used a technique called reflection mapping to simulate reflections from objects while keeping the processing overhead to an acceptable level.

This technique assumes that all reflective objects in the scene can “see” (and therefore reflect) the exact same surroundings.

This works quite well for the game’s main character (a shiny car, say) if it is in open space but is unconvincing when the character passes into different surroundings; it looks strange if a car drives into a tunnel but the sky is still visibly reflected in its windows.

Unity improves on basic reflection mapping through the use of Reflection Probes , which allow the visual environment to be sampled at strategic points in the scene.

You should generally place them at every point where the appearance of a reflective object would change noticeably (eg, tunnels, areas near buildings and places where the ground colour changes).

When a reflective object passes near to a probe, the reflection sampled by the probe can be used for the object’s reflection map.

Furthermore, when several probes are nearby, Unity can interpolate between them to allow for gradual changes in reflections.

Thus, the use of reflection probes can create quite convincing reflections with an acceptable processing overhead.”

Types of Reflection Probes

“Reflection probes come in three basic types.”

Baked

“Baked probes store a reflection cubemap generated (“baked”) within the editor.

You can trigger the baking by clicking either the Bake button at the bottom of the Reflection Probe inspector or the Build button in the Lighting window.

If you have Auto enabled in the Lighting window then baked probes will be updated automatically as you place objects in the Scene view.

The reflection from a baked probe can only show objects marked as Reflection Probe Static in the inspector. This indicates to Unity that the objects will not move at runtime.”

Realtime

“Realtime probes create the cubemap at runtime in the player rather than the editor.

This means that the reflections are not limited to static objects and can be updated in real time to show changes in the scene.

However, it takes considerable processing time to refresh the view of a probe so it is wise to manage the updates carefully.

Unity allows you to trigger updates from a script so you can control exactly when they happen.

Also, there is an option to apply timeslicing to probe updates so that they can take place gradually over a few frames.”

Custom

“A Custom probe type is also available.

These probes let you bake the view in the editor, as with Baked probes, but you can also supply a custom cubemap for the reflections.

Custom probes cannot be updated at runtime.”

Adding a Reflection Probe to our Scene

We can add a reflection probe by opening GameObject > Light > Reflection probe as shown above, or similarly by right clicking in the hierarchy Window and doing so.

If we look over our Reflection Probe settings in the Inspector window, the first thing we want to note is that we can move the probe here with the arrows button and we can size the reflection box with the button next to it.

The key settings, generally speaking, would be the rendering type, Intensity, and Occlusion Culling.

--

--

--

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

The Basic Concepts of Cloud Computing and its Service Models.

PartialExecuter: Reducing WebAssembly size by exploring all executions in LLVM

The way we have automated the guidance system of suburban electric trains in Kazakhstan

Dark Matter DeFi Project Update

Thinking functionally in Kotlin

Compare Pandas DataFrames with given columns(Compare 2 data frames in pandas)

Encapsulating data on GraphQL using Loaders

Overriding in Swift

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
GameDev Dustin

GameDev Dustin

More from Medium

Virtual Cameras w/ Cinemachine in Unity 2020 — Part 2

Unity : Raycast (Part I)

Virtual Cameras w/ Cinemachine in Unity 2020 — Part 1

Clear Shot Virtual Camera in Unity 2020