Reflection Probes
As real time reflections not possible in WebGL, Reflection Probes offer an alternative allowing you to 'bake' reflections into a space at a low cost to the processing, at the cost of file size.

What are Reflection probes?

Much like lightmaps, reflection probes are a way to bake reflection information into a space. Each reflection probe is a point in space that projects the environment onto objects in a designated area, both baked and dynamic. The reflection probe information itself however is static information, so your avatar cannot be reflected in the space for example. You can have quite a few probes, but as each one creates a texture in the scene this will add to the file size of the space.

Using Reflection Probes in your Space

1. Adding Reflection probes to your scene

1. Create an empty Game Object in your Hierarchy titled "Reflection Probes". This is optional, but good for organisation.
2. Right Click on the desired folder in Hierarchy / Light / Reflection Probe. This will place the probe under the currently selected object.
Right Click to add Reflection Probe
Alternative option - Use GameObject / Lighting > Reflection probe. This will place the probe at the bottom of the Hierarchy.
Add by using the GameObject Menu.

2. Adjusting Reflection probes and Objects

1. Each probe has three things to consider for placement. The object itself, the ‘centre’ of the probe (or the point that it 'projects' from), and the area that is reflected onto the probe.
The object itself is modified with the Move gizmo as usual.
Use the Arrow button in the Reflection Probe Inspector window to move the centre of the probe to the centre of the area you would like to project to. Generally it’s a good idea to move this roughly between walking height and jump height of the avatar to reflect to the avatars/camera position.
Use the Node Button in the Reflection Probe Inspector window to adjust the edges of the projection box.
Modify the edges to surround your objects and place the centre in the middle.
2. Set all objects you want to be reflected to Static in the Inspector.
Set objects you want to be reflected to static.
3. You will want to move the edges to the outside of the objects you want reflected. The projection will not behave correctly if it is not completely within the Reflection Probe zone. An example of what not to do on one wall is included in this example.
Modify the edges of the Reflection probe to surround objcts for best results.

3. Generating the Reflection Probes

1. You can set the individual Reflection probe to bake manually by using the button at the bottom of the Reflection probe object in the Inspector, or all the reflection probes will bake automatically when you Generate Lightmaps using Unity Lightmapper. If you are using Bakery, you will have to press Bake Reflection Probes after you Render the lightmaps.
Use Bake per Reflection Probe to update manually.

4. Refining the Reflection Probes

1. Add more reflection Probes as needed. As few as possible is recommended for file size and processing load. A general rule is that each ‘room’ would have it’s own probe to reflect each individuals room/walls correctly.
Add probes for each 'area' of your space.
8. Once you are able to start optimizing your space, adjust the size of the reflection probe texture according to your needs. Larger for important areas that are important and/or have lots of ‘clear’ reflection, and smaller for areas that are less important, or have mostly rough materials. This is certainly one area where you can get your file size down in a pinch.
Adjust quality as needed.
8. Note than any object, including dynamic objects with high smoothness/metal values, will reflect the reflection probes you create. Using reflection probes well, without going overboard (as they do add to the file size somewhat) can create fantastic results!
9. For examples of how different material settings look with reflection probes, check out the reference charts for metallic and smoothness settings here.
For more information about Unity Reflection Probes, check out the Unity documentation.
Last modified 1mo ago