TU Wien Rendering #15 - Rendering Equation Properties

LARRUZ explains the rendering equation's mathematical properties, covering diffuse and specular BRDFs, why the 1/π term appears in diffuse reflection, and how singularities from mirrors require explicit ray tracing instead of Monte Carlo sampling.
Chapters
And of course, if we have some super long light paths that are combinations of these, then obviously the ray tracer, the recursive raytracer, 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'm hitting a diffuse surface. What do I do? I tried to emphasize this earlier, but I will emphasize again that I take the perfect reflection direction. It doesn't matter if it's diffused or specular. I take the perfect reflection direction. Well, 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 this object. Now, if I switch to global illumination, however, there is this integration. And 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 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 BRDF models. How does it diffuse BRDF look like? It looks like this. So FR is the brdf, omega omega prime are incoming and outgoing directions. X is a point on this object and these are probabilities. Now this is weird because I'm used to formulae. So if I talk about diffuse shading, I've seen L dot N, that's a formula with variables, and this is a freaking number. What do I do with this number? It's 1 over PI. Does this even make sense? Can someone help me out with this? This boggles my mind a bit. So this one over PI means that if this is a scalar, if this probability distribution is a scalar, 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 vrds would be a number, because whatever directions I specify Here I will get the same probability and I can scale this one over PI with rho, 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 zero. And then you have a black body, something that absorbs everything. So you can change the color of the object. If I'm not using the right terms, but I'd like to remain intuitive. So the Albeo is going to give you the color of the object, and this we can specify as zero. Okay, the next question is, is this a probability distribution function? Of course it is. Why? Because it integrates to one. There are some other rules that we're going to disregard with respect to probability distribution functions. How much does it integrate to? This integrates to one. Why? What does the engineer guy say? Well, one over PI integrated from zero to PI. What does it mean? I have a rectangle that has the height of 1 over PI and it has the width. What is the area of the rectangle? Let's multiply these two sides so it's A times B. A is PI, B is one over PI. Just multiply the two and you'll get one. So this is indeed a probability distribution function. Good to go. What about specular BRDFs? These are what describe mirrors. How can I write such a brdf? 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 one and every single other choices have a zero probability. So this is indeed a probabilistic model that can be described by a delta distribution. Delta distribution means that one guy has a probability of one and everyone else has zero. So it's like elections in a dictatorship. Is this a probability distribution function? It is, but I put an asterisk there because I'm going to 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 everywhere else. So we have the one that we are looking for. And there are also glossy VRDFs. We haven't been really talking about this in the first lecture of mine, there was some VRDF which was called spread on one of these images. But I asked you to forget that 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 diffuse materials. They are completely view independent. Mirrors are completely view dependent. So it's like a mixture of the two. It is possible that there are some lossy 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 shout at me. Anymore? Yes. The surround. The surround. Cook field. Do you mean this? No, the floor. But the cooking. The cooking field. Glass top, stove. Oh, yeah, yeah. Exactly, 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. This would be the better question. And the table viewer sitting at is also glossy. It is a bit view dependent, but it's not a mirror. But it's not completely diffuse. And it also transfers the caustics, so it has some diffusivity. Okay, next question is if 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. 1 person 2. Okay, I'm gonna spoil all the fun and tiny 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 marbled, just the Cornell box itself. So we can conclude that, yes, this can be distinguished from a photograph. But if you look at the actual scene, it is very difficult. 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 model 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. 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 let's 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 outgoing 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 exhaustively 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 bounces. So this is definitely very difficult because the incoming light that I am sampling the hemisphere for is another rendering equation. So imagine that this Li, you can insert another one of these equations, but that equation will also contain this integral and this Li, and that's another rendering equation. So it's an infinitely large sequence of integrals. 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 is 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 infinitely thin 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 zero to one in there. And we need to handle this somehow because we can take into consideration functions, we can integrate 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 incoming direction, 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 an outgoing direction. No probabilities, nothing. 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.










