In this lesson video, we are going to cover screen space effects in the Eevee rendering engine. Basically, we will learn how to activate reflection and refraction features when using Eevee. This lesson is not an in depth lesson about Eevee because there will be a whole section dedicated to the rendering engine in this course serious Okay, if you want to follow along, just don't look the file I provided for this lesson. In this file, I have created two spheres and a hidden box object. I already assigned a green metal material to this right sphere and a yellow diffuse material to this left sphere. Let's start with the definitions.
So what is exactly screen space reflection and screen space refraction. First, let's talk about reflection and refraction. reflection is when we see light bouncing off of a surface when you see an object With a reflective surface such as chrome or a mirror, etc, you can see the surrounding environment on the objects surface because the lights coming from the environment reflected on the objects surface into your eyes. The fraction on the other hand is when we see light passing through a transmissive material such as water, glass, Crystal, etc. When passing through an object light will bend and distorted the amount of bending and distortion depends on the materials characteristic which is known as i o r or index of refraction. Okay.
Now in the fully retraced renderer, such as cycles, this reflection and refraction effects are on by default. However, in real time renderer such as Eevee they are not turned on by default. This is because calculating reflection and refraction are expensive, Evie user surfers methods to fake reflection and refraction, and one of them is by using the screen space technique. What screen space means is actually calculating the reflection and refraction only on objects or surfaces that are visible in the camera view directly. Anything that is not visible directly, such as objects located behind the camera view, or surfaces that are blocked by other objects will be ignored from the reflection and refraction calculations. Okay, so how can we use this screen space reflection and refraction then, in this example, we can see that this sphere although it has a glassy surface, it only reflects the image from the environment texture, it doesn't reflect other objects around it.
We cannot see any yellow sphere on the surface. Currently, we are in the look def mode. And as I mentioned earlier, look death mode actually uses the Eevee rendering engine So to tweak the settings, we need to go to the V rendering Properties panel. Here you will find screen space reflections checkbox and section. Click on it. As you can see, we now have the yellow sphere reflection on the green sphere surface.
But there is something odd about this reflection, the reflection looks nice from this angle, but if you rotate to the side part of the yellow sphere is not visible. This is because the back side of the yellow sphere is not being rendered to safe performance. Therefore, it is excluded from the reflection also. So again, this is the caveat of screen space reflection. It only cares about surfaces that are visible directly and ignore the rest. Okay, now let's unhide the box.
This box already has a transmissive material. So in theory, we should be able to see pass through it. But this is what we get by default. We can See the environment through the object, but we cannot see the green in yellow spheres. To turn on the screen space refraction feature you need to deal with two different settings, the global setting and the local setting. The global setting is in the rendering Properties panel.
In a screen space reflections section, you can see the fraction checkbox. Click to turn it on. Now if we will calculate the flexion globally, we also need to turn on the refraction option locally which exists for material basis. So go to the material properties panel. Down here. In the settings section.
You can see the screen space diffraction option, turn this on. Now we can see the green sphere and the yellow sphere through the box object.