 And of course, if we have some super long live paths that are combinations of these, then obviously the ray-face-circum, or recursive ray-face-circum cannot take this into account. Why is that? That's the big question. Let's go back to the illumination equation and imagine that I can think of a diffuse surface. What do I do? I try to emphasize this earlier, but I will emphasize again that I take the perfect reflection by it. It doesn't matter if it's diffuse or specular, I take the perfect reflection direction. But if I do this, I have no idea about the surroundings of the object. I have no idea what is, for instance, above this diffuse plane. If there is some red object, I don't shoot a ray there in order to get some indirect illumination. So I will have no idea about the surroundings of this object. Now, if I switch to global illumination, however, there is this integration, and the part of the integration is the incoming light, the incoming radiance. And how I can integrate this over the hemisphere is basically sending samples out in every direction in this hemisphere. Now, if I do this, then I will know about the surroundings of the object. If there is a red wall or a red object in nearby or the desert nearby, then I will have samples of the incoming light, and therefore it will appear in the color of the object. This is fundamental. This is the very important way to understand why ray tracers are missing these effects. Now, let's talk about the real deal, the real, physically based PRDF models. How does it diffuse PRDF look like? It looks like this. So FR is the PRDF. Omega, omega prime, our incoming and outgoing directions, X is a point on this object. These are probabilities. Now, this is weird because I am used to formulate. So, if I talk about, if you are sharing, I have seen L. at that step of formula with variables. And this is a freaking number. What do I do with this number? It's 1 over pi, but does this even make sense? Can someone help me out with this? This bug was no longer with. So, this 1 over pi means that if this is a scaler, if this probability distribution is a scaler, remember that this is the distribution of the possible outgoing directions. So, imagine this scenario up here where you have an incoming direction. And if I have a completely diffuse material, it means that it will diffuse the incoming light in every direction. So, all possible outgoing directions on the hemisphere have the very same probability. And if they have the very same probability, then this should be a number. Then the whole PRDF should be a number because whatever directions I specify here, I will get the same probability. And I can scale this 1 over pi with a row, which is the albedo of the material because not all materials reflect all light. In fact, most, or if not all of the materials we know, absorb some amount of light. So, this is again a number. This can be wavelength dependent because it depends how much you absorb on the red channel, how much absorb on the blue channel. But this can be potentially 0. And then you have a black body, something that absorbs everything. So, you can call it, you can change the color of the object if I'm not using the right terms, but I'm not doing the intuitive. So, the albedo is going to give the color of the object. And this we can specify on 0. Okay, the next question is, is this a probability distribution function? Of course it is. Why? Because it's because it integrates to 1. There are some other rules that we're going to disregard. We respect the probability distribution functions. How much does it integrate to this integration 1? Why? What does the engineer guy say? Well, 1 over pi integrated from 0 to pi, what does it mean? I have a rectangle that has the height of 1 over pi, and it has the width of pi. What is the area of the rectangle? Let's multiply these two sides. So, it's a times b. A is pi, b is 1 over pi, just multiply it to, and you get 1. So, this is indeed a probability distribution function. Good to go. What about specular bRDS? These are what describe mirrors. How can I write such a bRDS? It's a bit trickier because it is fundamentally different than just diffuse materials. Why? They don't diffuse incoming light in all possible directions. What is possible is only one outgoing direction. I see only one thing in the mirror. Not the mixture of everything, like on the walls. So, this means that one outgoing direction is going to have a probability of 1, and every single other choices have the zero probability. And this is indeed a probabilistic model that can be described by a delta distribution. Delta distribution means that one guy has a probability of 1 and everyone else has zero. So, it's like elections in a tink tadership. Is this a probability distribution function? It is, but I couldn't last a while. I'm going to talk a bit more about this. But let's say for now that it is because this is one for one incoming direction and zero everybody else. So, we have the one that we're looking for. And there are also glossy bRDS. We haven't been really talking about this in the first lecture of mine. There was some bRDS which was called spread on one of these images, but I asked you to forget this term immediately. Glossy is the mixture of the two. So, it is not like a mirror, but it's not like a completely diffuse material. So, there is some view dependence. In this is material, they are completely viewing the pendant. Mirrors are completely view dependent. So, it's like a mixture of the two. It is possible that there are some glossy materials in this scene. Can you find them? Raise your hand if you see at least one. Many of you. Okay. Yes? How about the cupboard? The cupboard. Excellent. Yes. Anything else? Just show that we're in good. Yes. Is it round? Is it round? Is it round in good fit? Do you mean this? No. The floor? No, the cooking field class. Slow. Top to slow. Oh, yeah. Exactly. That's also glossy. So, there is many examples. I think the question would be what is not glossy in this scene? The better it is would be the better question. And the people you are sitting at is also glossy. It is a bit view dependent, but it's modern mirror, but it's not completely diffuse. And it also transfers the caustics. So, it has some diffusibility. Okay. Next question is, it looks good, but the mathematician guy asks how accurate is this? We have these two images. One of these is generated by means of global illumination, solving this equation, and the other one is a photograph. Do you know which is which? Raise your hand if so. Okay. One person. Two. Okay. I'm going to spoil all the front-end tie-in solution. Okay. So, look at this part. So, this is the difference that you can see, for instance, because this is an actual box that the guys put together at Cornell University. And you cannot only see the box in the photograph, but what is next to the box? Whereas, in global illumination, these surroundings are not modern, just the Cornell box itself. So, you can have a blue text. Yes, this can be distinguished from a photograph. But if you look at the actual scene, it is very beautiful. And if everything is perfectly implemented, then this is so close to physical reality that it is literally indistinguishable. So, this is really amazing that we can do this. Whatever you see out there in the world, we can mount with this equation. There are exceptions, because there are wave effects, such as diffraction and stuff like that. But these are very rare. I mean, there are butterflies who look the way they look, because of interference. And these effects. But 99% of what you see can be modeled with this equation. And the rest can be handled by more sophisticated methods. So, back to this previous question. What is the dimensionality of the rendering equation? Let's try to think it through and we will see. So, just for now, imagine that I shoot a ray out from the camera. And I hit the diffuse object. I need to sample this hemisphere exhaustively. This is not how I will evaluate the algorithm. But technically, this is what I need to do. All possible outcome directions have the same probability. So, I need to shoot these outgoing rays many of them. Now, I will hit more diffuse objects after the first bounce. And I have to exhaust the sample all of these as well. And if I take this other ray, I also have to do this. And so on and so on and so on. Until how many bounces we have concluded previously that we have to take into consideration an infinite number of points. So, this is definitely very difficult because the incoming light that I am sampling the hemisphere form is another rendering equation. So, imagine that this LI, you can insert another one of these equations. But that equation will also contain this chemical and this LI. And there is some random rendering equation. So, it is an infinite large sequence of intervals. Therefore, this is infinite dimensional. Now, I told you before that this is also singular. This is not such a bad thing. But this is because of the possibility of specular BRDFs. The specular BRDF is some kind of a delta distribution. And delta distributions are not really functions. So, in signals processing, you may have studied this function. And the first thing that they tell you about this, that this is not a function. This can be defined in terms of a limit. So, you can, for instance, imagine like a Gaussian curve. And you start pushing this Gaussian curve from two sides. Therefore, this is going to be a larger and larger and thinner and thinner spike. And you do this until you have an infinite bit of spike. Now, if you check it for the properties of a function, you will get something that has nothing to do with the function. That's a singularity. There is an infinitely quick jump from 0 to 1 in there. And we need to handle this somehow because we can take into consideration functions with an integrated functions. So, let's just solve this trivially by handling this specular interreflection explicitly. What does it mean? This means that if you have an income interaction, you're not going to play with probabilities. You are just going to grab, like in a ray tracer, you are just going to grab the perfect reflection direction as a loud-core interaction. No probabilities. No. A beauty break. We have some scenario which is ray tracing because of different things. Because the image you create by means of ray tracing, but there's literally one ray of light being reflected here many times. So, awesome laser experiments with Lux render. We will try things out like this, a bit later during the course. And another example. It's amazing what we can do with these algorithms.