Day 53 — Reflection probes vs screen space reflections
Hey and welcome!
Got a bit of a fun one for you here. We’re going to be looking into two different ways that we can add reflections into our games and that’s through either a Reflection probe or Screen space reflections. I’ll also go over when best to use either one.
Firstly let’s look into this reflection probe I’m talking about. You may have noticed that within our LightProbes_ReflProbes_GodRays object there are two reflection probe objects in there. Go ahead and delete and delete the first one and you’ll notice that our floor with the blue tiles is no longer reflective.
What we’re going to do now is create a reflection probe ourselves in order to mimic the effect we had here previously. In your hierarchy go ahead and right click and choose the Light > Reflection Probe option. With that in the scene drag it over to the blue tile floor so that the bottom of the box is just below the floor and then click on the edit bounding volume button in the inspector and expand the box so that it covers all of the floor and is tall enough to be over our wall objects.
With that in place you’ll see that the floor is looking reflective again! If it looks off you’ll need to make sure that your box is larger then the floor itself. Now let’s go ahead and take a look at what screen space reflection looks like and lucky for us it’s easy to implement in this project.
To use screen space reflection go ahead and navigate your way to the Main Camera object and you’ll see a post-processing script attached to it that has an unchecked box. Go ahead and check that box and watch the magic happen.
Instantly the scene comes to life with high detail reflections as well as some alterations with the lighting. While fancy looking as it is this form of post-processing is quite taxing for the game. It’s ideal to use when you’re creating a game that’s going to be on console or PC but if you’re planning on developing a game for mobile it will be alot more optimised to make use of reflection probes instead.
You should remember a little bit about post-processing from a previous article but for the time being I’ll leave this as it is as we’ll be looking into post-processing once again later in this particular project.