|
|
# Reflection Probes and Unity
|
|
|
## Purpose of this guide
|
|
|
Unity's reflection probe system is a little confusing and convoluted. Things that would seem to be good practise at first turn out to be horrible mistakes for newcomers. After passing around lots of similar advice for years, I've decided to collate it all into one page.
|
|
|
Unity's reflection probe system is a little confusing and convoluted. Things that would seem to be good practice at first turn out to be horrible mistakes for newcomers. After passing around lots of similar advice for years, I've decided to collate it all into one page.
|
|
|
|
|
|
I'll cover how they work, and more importantly, how they can and should be used in worlds.
|
|
|
|
... | ... | @@ -13,6 +13,8 @@ Reflection probes also store lower-resolution versions of their textures. These |
|
|
|
|
|
As objects are rendered in the scene, they will be asking Unity "what reflection probe am I in?". Unity will provide them the texture and location of the two closest probes to their anchor position, and the shader will blend between them. If only one probe is available, Unity only will send one.
|
|
|
|
|
|
In addition to reflection probe objects, each scene has an "environment reflection", which is provided when no reflection probes are nearby. This is typically generated from the skybox material, but can be overridden manually.
|
|
|
|
|
|
## How do they work for dynamic objects, like players?
|
|
|
Dynamic objects use the probes closest to their anchor position on their mesh.
|
|
|
|
... | ... | @@ -115,4 +117,4 @@ So, if the lighting in your scene changes, you can enable and disable reflection |
|
|
|
|
|
The main catch is storing all those reflection probes. At 512x512, each one is 2MB. This can add up pretty quickly. An alternative is to set the probes to Realtime mode.
|
|
|
|
|
|
In Realtime mode, Unity will render the probe ingame, instead of saving it to a texture. Using a Realtime probe might be the best choice for your scene if major elements of the scene can change - like lighting shifting over time, or objects in the map changing appearance. |
|
|
\ No newline at end of file |
|
|
In Realtime mode, Unity will render the probe in-game, instead of saving it to a texture. Using a Realtime probe might be the best choice for your scene if major elements of the scene can change - like lighting shifting over time, or objects in the map changing appearance. |
|
|
\ No newline at end of file |