TU Wien Rendering #3 - BRDF models, The Rendering Equation

BRDF models describe how materials reflect light based on viewing angle and surface properties. The rendering equation combines incoming light, material properties, and geometry to calculate final radiance, but solving it requires handling infinite light bounces and complex recursion.
Chapters
Now there's another fundamental question, which is what makes the difference between different materials? And the other question is, how do we model it? Well, different materials reflect incoming light to different directions and they absorb different amounts of it in different wavelengths. That's the answer. We are going to talk a lot about this. But this is an example. This, these are different material models. So the specular, in the specular case, there is one incoming direction and there is one possible outgoing direction. That's it. This is what always happens. This is for instance, a mirror. Because I see exactly the reflection of myself. There's no other thing that I see in the mirror. But for a diffuse surface, for one incoming direction, there is many possible outcomes in many possible directions. And this gives a diffuse surface. We're going to see examples of that. It writes spread. Please forget this term. Let's call this glossy instead, because this is what it is. This is like the mixture of these two. So these are some basic material models that we are going to see in our renderers later on. Now, to formalize this in a way, let's create a function that's a probability density function and with three parameters. So this is a three dimensional function. One variable is the incoming light direction. The other variable is a point on the surface. And what I'm interested in is how much light is flowing out from this point in different directions. Now, a bit more formalized, this FR is going to be this function. I'm interested in the incoming direction and the point in space. This two is what I have. And I would be interested in the outgoing directions. What is the probability of different outgoing directions? And this is how we will write it formally. Omega is an incoming direction. X is a point in space that we choose, and omega prime is the outgoing direction. And this we call the BRDF or bidirectional reflectance distribution function. So this is a very complicated name for something that's very simple, brdf. Now, what about materials that don't reflect all incoming light? There are some materials that transmit some of it. So for instance, glass, water, gemstones and such. Well, it could look like that. And here, here above you can see some BRDFs and below you can see some things because it's not reflected, it's transmitted. There are some materials that let them through. So here's an example. Well, everyone had seen windows and things like that. Well, the question is why? Just a physical question. Why are these objects transparent?
Sorry, they transmit the light.
Yes, they transmit the light, but what is happening here? Exactly. So just some physical intricacy that the most fundamental question, you know, what is inside of an atom? And the best answer is nothing, because an atom is 99% empty space. There is the nucleus, which is the whole atom, is the size, for instance, of a football field. If you imagine that, then the nucleus is a small piece of rice in the middle of the football field. That's the nucleus. And the electrons are also very small things, like small rices, which are orbiting this nucleus from very far away, like the sides of the football field. And in between, there's nothing, absolutely nothing. So the more interesting question would be, why is not everything transparent? I mean, there is absolutely nothing in there that would divert or absorb the light, right? Everything, just everything should go through. Why is not everything transparent? Not only glass, but everything. And the reason is absorption. So these electrons are orbiting the nucleus. And what essentially is happening is that electrons can absorb photons. Photons are. If you imagine light as not rays or not waves, but particles, then photon is the basic particle of light. So electrons, they absorb photons, and if they do, they go from an inner orbit, like a lower energy level, they jump to a higher energy level. Because it's basically you after lunch, you eat something, you get more energetic, you get more jumpy. So it jumps to an outer orbit from the nucleus. It's a bit further away, so it absorbs the light, so the light doesn't go through. So this is why most things are not transparent. But the question is, why is them transparent? And the answer is that these orbits, these different places around the nucleus, they are so far apart that in the visible light spectrum, if the electrons absorb a photon, they don't get enough energy to jump to the next orbit. And this is why most of the light is going through these glass materials. And the interesting thing is that this is not always the case. This is the case for visible light spectrum. There is another spectrum which is absorbed. So if you have a spectrum that is a higher energy spectrum, then it may give enough energy for this electron to jump to a different orbit. And we can easily find out what spectrum it is. Because, for instance, we use glass for a number of different beneficial things. Well, for instance, you cannot get sunburn if you are inside of the house and you have your windows closed and we are wearing sunglasses in order to protect our eyes from something. So is there someone who tells me what this spectrum is exactly? Just a bit louder? Ultraviolet. Exactly. So ultraviolet is a spectrum with a higher amount of energy. Yes. And if you absorb it, then this jump is possible. So this is why it is absorbed so just some physical intricacies. So lights may get reflected. If we have a material that most of the time reflects light, then we call it the brdf. The R is the interesting part, that's the reflection. And if transmittance is possible with the material model, we have the btdf, which is the bidirectional transmittance distribution function. And as an umbrella term for both of these, this is basically the whatever term is bsdf. So bidirectional scattering distribution function. I'm not saying this because this is lots of fun. I'm saying this because you're going to find these terms in the literature all the time. So BSDF is basically things that reflect and things that transmit. Okay, what are the properties of BRDFs? And after this we will suddenly put together something beautiful very rapidly. So there is Helmholtz reciprocity. It means that the direction of the ray of light can be reversed. What it means mathematically is that I can swap the incoming and outgoing directions and I'm going to get the same probabilities. So the probability of going here to there is the same probability as coming from there to here. If I look at things. From both sides I will get the same probabilities. So that's often useful in physics. Positivity. This is self explanatory. Well, it cannot be less than zero. A probability cannot be less than zero. For every outgoing direction there is some positive probability or there is zero. That's it. Nothing else is really possible. So formally this is how it looks like and it makes some mathematicians awfully happy. And there's energy conservation, perhaps the most important property. An object may reflect or absorb incoming light, but it is impossible that more is coming out than the incoming amount. Well, obviously we have light sources and things like that, but we are talking about strictly material models. So this means that if I integrate this function for all possible incoming directions, then I get. If I take into consideration light attenuation that we have talked about, this is why it is so hot at noon and why it is so cold at night, then I'm going to get one or less. And this is because if it equals one, then this means that this kind of material reflects all light that comes in. And if it's less than 1, then this means that some amount of light is absorbed. Okay, we are almost there at the rendering equation. Generally what we are going to do is that we pick a point X and this direction is going to point towards the camera or my eye. This basically means the same thing. It's just an abstraction. And what I'm going to be doing is I'm going to sum up all the possible incoming directions where light can come to this point. And I'm interested in how much is reflected towards my direction. And let's not forget that objects can emit light themselves. And we will also compute this reflected amount of light. So just intuition, light exiting the surface towards my eye is the amount that it emits itself if it's a light source. And the amount that it reflects from the incoming light that comes from its surroundings. And this is how we can formally write this, with this beautiful integral equation. Let's see, let's tier it asunder and see what means what. This is the emitted light. So this is light from point X going towards my eye. How much is it? Well, the amount that is in point X emitted towards my eye, if it's a light source like that one, then I definitely have this amount. And there is an amount that I reflect that is reflected. Let's see what's going on. This is what I just told you. And again. And this is the integration, this is the interesting part. So I am in, I am integrating this Omega prime. So all possible incoming directions. What you have seen the hemisphere on the previous image. Hemisphere means basically half. One half of a sphere. We are integrating over a hemisphere not over, not over a full sphere. Because if we take into consideration the cosine, if the light comes from above that cosine, zero degrees is one. And as I rotate this light source around this point, then this cosine will get to 90 degrees. So from here to there and the cosine of 90 degrees is zero. Therefore there's going to be no throughput if it comes from that direction. And if I have something that's higher, that would be negative. We don't deal with these cases. So this is why I'm integrating over a hemisphere. So sunlight is coming to this point in different directions. And what I'm interested in is how much of this light is reflected towards my eye. This is multiplied by the incoming radiance. There is the BRDF and light attenuation. That's it. This is still a bit difficult. This is still a bit elusive. So first we are going to train ourselves like bodybuilders on smaller weights. So we are going to create an easier version of this because apparently this is terribly difficult to solve. If you take a look and if you would sit down and try to solve it for a difficult scene where you have objects and geometries and different BRDFs, different material models, you will Find that this is impossible to solve analytically. And one of the first problems is.
Yes, this equation is just for one point, right? So we are looking at one point and then we want to calculate exactly.
Yes, and here comes the catch. So I'm interested in how much light is going towards my eye from this point. How much is it? Well, it depends. If I turn on other light sources, then this point is going to be brighter because the radiance coming out of this point depends on its surroundings. Is the window open, Are the curtains pulled or not? So this point X depends on this other point Y, for instance, all other points. Then we can say, ok, let's not compute this X first, let's compute this Y point instead first, because then I will know X. Okay, but this Y also depends on X because how bright light is on the other side of the room also depends on how bright it is in this side of the room. So there is some recursion in there and it's. If you don't think out of the box, this is impossible to solve because you don't know where to start. This integral is hopeless to compute in closed form because there may be shapes and different objects in there and this will make integration immensely difficult. The integral is infinite dimensional. Later you will see that if I compute one bounce, this X that I have been talking about, that's okay, but I need to compute multiple bounces. I need to start tracing rays from the camera and see how much light is entering the lens of the camera. But one bounce is not enough. Is two bounces enough? So after the X, I continue somewhere else. Is this enough? Say something. It's not enough. Okay, but I think maybe three is enough. Is three enough? It's not enough. Okay, well, you guys are very picky. Okay, is 10 bounces enough? Okay, why not? Because there's still some amount of energy left that if I would continue this light path, I would encounter other objects and I don't have any knowledge of that. We need to compute an infinite amount of bounces. Even 1000 is not enough. So and this rendering equation is going to be 1.1 bounds. And if I want to compute the second bounds, that's going to be embedded. There's going to be embedded another integral equation, another rendering equation. And this goes on infinitely. This is the biggest equation in the whole universe. It's impossible to solve and it is often singular. I will later show you why. So even if you would want to integrate it, you could. So this is horribly difficult. This seems impossible. And apparently at this point, we cannot solve it. So this is the end of the course and we have an impossible problem. There is no reason even to try and goodbye. See you never, because there's never going to be any more lectures. But in order to understand what's going on, first we're going to put together a simpler version of this equation that we can understand and we can work our way up. There's another formulation of the rendering equation. I'm not going to deal with this too much. You can imagine this other version as moving points around. So there is a light source in P3 and there is the sensor at P0. And this is one example light path. And what I'm doing is I'm not stopping at one point and integrating all possible incoming directions, because this is what I did with the original formulation. What I do is I compute one light path, I compute how much light is going through, I add that to the sensor, and then I move this P2 around, I move it a bit, I compute the new light path, how much is going through, I move this P2 around again. So imagine this moving everywhere. And imagine also P1 moving everywhere. So all these points are moving everywhere. And I compute the contribution of this light source to the sensor. So this is another kind of integration. I'm not going to go through this. What is interesting is that there is a geometry term in there, and this describes the geometric relation of different points and light attenuation between them. I'm not going to deal with this too much. I just put it here because if you're interested, then chew your way through it. In literature, they often write it this way.










