 Let's go with a simplified version of the whole thing. We're going to talk about simplified BRDF models. Well, there's going to be the ambient BRDF. How does it look like? Well, first, first. On the left side, I see I. This is intensity. Well, what is this? Well, no one knows because we have not radians, not something very physical here. This is going to be simplified version of the whole rendering equation. Basically, a bunch of hex, if you know something that is vastly simplified, it doesn't really have a physical meaning, it doesn't have physical feelings, but it works. It's beautiful and it's a good way to understand what's going on. So the intensity that we measure is going to be an ambient, the product of an ambient coefficient of an object. This is dependent of the object. This means that this means something like the color of the object. And the eye is going to be the intensity, the ambient intensity of a scene, or the light source. And later on, we're going to be talking about why this is interesting. So this is an example. We have a blue object over here and it's the same color everywhere. Why? Because the farther that doesn't depend on anything. There's just one coefficient that's multiplied by this intensity of the scene. So that's an ambient shading. What else is there? There's the diffuse BRDF. This is what we compute. It's a diffuse coefficient. What is the diffuse color? The diffuse albedo of this thing. And there's going to be a product of L and M. This is what we did before. Diffuse objects look like that. Please raise your hand if you have ever done any kind of diffuse lambershine model in graphics. Okay, excellent. Great. And just another thing. This diffuse coefficient is the very least RGB. Okay, so this is how much light is not absorbed on every different wavelength. Because I cannot describe colors in one number. The very least RGB or a continuous spectrum. Just for the background. And now it's looking better because I can more or less see where the light source is for this diffuse shading. There's also a specular BRDF. What I compute is V dot R times specular coefficient and V is the vector pointing towards the viewer and R is the reflected. There's going to be examples of that. Okay, so just that you see the formula here. And there's an M which is a shining as factor in the next assignment you will play with this yourself. So for now I will keep this a secret what this exactly does. And whoops, I'm going to jump through this because I would like to ask a question later on and you're going to find out. Yes, I'm looking at, excuse me. So this is how the specular highlights look. And if I add up all of these things ambient and diffuse and specular I get some complex-looking model that looks something that is that approximates physical reality. So I just simply add all these terms up. Okay, well I have something like this here and I have on purpose removed the light source from this image. But probably everyone can tell where the light source is expected to be. So raise your hand if you know where the light source should be. Okay, cool. Where should it be? Exactly. So it's going to be above the spheres. This is exactly where it is. So these material models are descriptive in a way that I get images that have some physical meaning that resemble physical reality. Well let's take a look at an actual example. The question is what would this region look like? The one that I marked, this pixel existed in the real world. Would it look the same if I wound my head in reality? And that sounds like a tricking question. I have seen the answer. Yes. Well let's say that this part is purely diffuse. I don't see any specular reflections in there. The diffuse is L dot n. So light vector direction times the normal. Does it change if I move my head? Well how to answer this question? You don't only need to see what is in an equation. You have to be aware of what is not in there. Doesn't change if I move my head. Raise your hand if you know the answer. It's very apparent to many of you. Yes. So the answer? Yes. It does not change if I move the head. It does not change if I move the head. It does not change because the specularity might move. Yes. That's very true. So it does not change because we know that it does not change. The walls look the same if I move around. I mean I'm not talking about shapes. I'm talking about colors. They don't change. The mirror, however, does change. The mathematical reason for this is that the view direction is not in this equation. I can change the view direction all I want and nothing will change in the diffuse. The idea. So this is like a general mathematical trick or principle that you can use in a number of different things. Don't just don't just look at what variables are in there. Try to think of variables what you would imagine that would be there. Okay, why are they missing? That's also information. That's what they're not only what's there but what is missing is valuable information. So what about these regions? These are specular highlights. These are described by the specular V or V of R. So viewing direction times the reflected light direction. Let's actually compute what's going on. So I would be interested in the intensity. This fake something of this point where this is the light vector. This is where it points to. It is probably reflected somewhere there because it comes in and it's an ideal reflection. So it's going to be reflected in this direction. And this is where I am just for example. So I'm interested in V dot R. Well, this is going to be a cosine. There is a small angle between V and R. So if there is a small angle that's cosine of a small number, that's large. That's close to one. And that's going to be a huge scalar product. Therefore, this point is bright and this is indeed bright. And the question is, which is very easy to answer in a second, is doesn't change if I move around. Does it change? Obviously, it does change because V isn't the equation and if I change this around, this is going to be different. For the specular BRDF, this is going to be bright. Just one of my favorite intuitions of this V dot R because otherwise this is just letters. This means how much am I standing in the way of the light? So, a life lesson. If you can't find the water droplets on the floor after having a shower, move your head around. Because that's specular. If the windshield of a car is too bright and you just can't take it anymore, move your head around. This connects to the physical reality around us. And that's good tips. In case you didn't know that you need to move your head around. Thanks, thank you. Now you know. Okay, so this is the point where we can just for a second stop and Marvel have how beautiful things we can create with such simple equations. And the rendering equation is going to be even more beautiful than that infinitely more beautiful. And there is some additional beauty that you can think about when you look at images like that. Okay, how would I shape this point? Is this diffusive? Is this specular? Why does it look the way it does? So, you can, if you have nothing better to do, you can think about these things when on public transport. Let's call this thing the illumination equation. This is the simpler version of the rendering equation. Now, what is in there? Most of this is familiar. There is an ambient-sharing term. And then there is the diffuse L.M. There is the specular V.R. We add all these together. And we multiply this by the amount of incoming light. Because if there is no light sources in the scene, there is no light. The whole light is not coming from anywhere. Therefore, this is all multiplied by zero. If there is a bright light source, that things get brighter. So, we multiply by this incoming light. And what is important to know is that this is only the direct effect of light sources. This sounds a bit as a taric at the moment, but later on a few lectures down the road. We are going to be more about indirect illumination and goodies like that. And this is neglected, and the ambient term is used to make up for it. You will see the examples of this in the next lecture. And this is a crude approximation, but it's still beautiful. It's easy to understand. And it serves as a stepping stone to solve the real rendering equation. But this is not done. One thing is that if there are multiple light sources, the scene is expected to be brighter. So, I would compute the whole thing for multiple light sources. So, there is going to be a sum in there. And inside the sum, the indexes are the number of light sources. Basically, I just didn't want to overcomplicate this. But still, something is still missing. This is not done. I arrived to a point. I compute this specular ambient and diffuse shading. And I am not done. Let's discuss how ray tracing works, and we will find out. So, the first thing is that what you see here is non-trivial, because what you would imagine is that you start shooting rays from the light source. And then, some of the rays would make up to make it to the camera to your eye. And most of them won't. So, we go with a simple optimization that we turn the whole thing around and then we start tracing rays from the camera. Because if I start tracing from there, I can guarantee that I didn't with rays that are not wasted, because I am not interested in the light rays that do not make it to the camera. So, if I start from there, I can guarantee that this is not wasted computation. So, how do we do this? There is this camera plane. We will discuss how to construct such a thing. And we construct rays through this camera plane. And what I am interested in is the projection of the 3D world to this plane. This is what you will see on your monitor. So, I should raise from this camera, and I intersect this, I guess, objects that are in the scene. I want to know where is the light stopping? What objects does it hit? And where does it get reflected? So, the second is intersection with scene objects. I have to realize that it hits this sphere. Then I stop there, I compute the basic shading, turns, lighted diffuse and the rest. And then I don't stop there, but I am interested in where the light is reflected. I need to continue from here. And this light ray may be reflected or refracted. And I need some kind of recursion in order to account for that. And the recursion works in the following way. I stop at this point where I hit the ball, the sphere. And what I do is that I imagine that this is now the starting point of the ray. And I am shooting the ray outwards and I start this ray tracing algorithm again. So, this is how the recursion works. This was missing from the formula. And this is just what the text version of what I have set for those who are meeting this at home. And you will be in live refractions for some.