... | ... | @@ -33,6 +33,11 @@ However, Unity will not combine objects affected by different probes. |
|
|
|
|
|
You can partially work around this with Anchor Overrides. Objects using the same Anchor Override will sometimes be batched together. Unity will sometimes fail to batch them together, though, so in these cases you'll be required to merge the meshes manually to regain performance.
|
|
|
|
|
|
## What do shaders do with reflection probes?
|
|
|
For the most part, shaders will follow what the Unity Standard shader does. Unity offers some functions that let any shader use parts of Standard to provide the same reflections as Standard does, or access the data to do it themselves.
|
|
|
|
|
|
In Standard, the occlusion map is used to define areas that can't normally be reached by light, which will make those parts reflect less light.
|
|
|
|
|
|
## How should they be set up?
|
|
|
Reflection probes capture an image of their surroundings into a texture. This means a few things
|
|
|
* A higher resolution probe is much sharper, but much much bigger, due to containing six textures.
|
... | ... | @@ -57,4 +62,23 @@ Then select Bake at the bottom and place your Reflection Probe texture somewhere |
|
|
|
|
|
Second, open the Lighting window from the Windows menu at the top. From there, set Environment Reflections to Custom, and drag your new probe in.
|
|
|
|
|
|
![An example Lighting setting.](uploads/505ac2516aae29304748cb2b2a8e770d/image.png) |
|
|
\ No newline at end of file |
|
|
![An example Lighting setting.](uploads/505ac2516aae29304748cb2b2a8e770d/image.png)
|
|
|
|
|
|
After doing this, you can disable the original probe. Now your scene has a default reflection that won't affect batching.
|
|
|
|
|
|
![Our scene with a steel sphere in it.](uploads/747524990d651e851cfd0100eae24005/Probe13.jpg)
|
|
|
|
|
|
### 2. Complex reflection probes
|
|
|
One obvious problem with this is that there are places where your reflections will look wrong.
|
|
|
![Probe21](uploads/6fe973e83c5bab978c64a7b05880fd35/Probe21.jpg)
|
|
|
|
|
|
If it's a substantial area of the map, just put an extra probe there!
|
|
|
![Probe22](uploads/b7e8674cb2b21bcb2624386ab1d2c160/Probe22.jpg)
|
|
|
|
|
|
In this screenshot, I've set up the probe area using the controls at the top of the Reflection Probe component. Because of this, the steel sphere next to the structure are still using the main reflection, while the sphere inside is reflecting the inside.
|
|
|
|
|
|
If the area is box-shaped, we can fit our probes bounds to the walls and enable Box Projection.
|
|
|
|
|
|
![Probe23](uploads/2ab98dd48b51c931958334baab3e0bcd/Probe23.jpg)
|
|
|
|
|
|
Box Projection is a powerful technique that will fit your reflection probe to a box. Used well, it can make reflections look really good, even if they're just blurry ambient ones. |
|
|
\ No newline at end of file |