 Okay, so let's jump into the thick of it. What do we measure in a simulation? A quick recap from the last lecture, this is going to be just a few minutes. So, first, radiant flux. This is the total amount of energy passing through a surface per second. What does it mean? I imagine some shape anywhere in this space, and I count the amount of energy that is passing through this shape every second. What is the unit of it? It's watts or joule per second. This is the state. And this is apparently not enough. This is not descriptive enough to create light simulations. And please raise your hand if you know why. Okay, well, let's take a look. So this says that amount of energy passing through a surface is measured per second. So when we measure a high radiant flux value somewhere, we don't know if we have measured a lot of energy that passes through a small surface, or if we have drawn or imagined a large surface, and there's just a bit of energy passing through. This is the same amount of radiant flux. So this metric is ambiguous. It's not good enough. And this is just an image to imagine what is really happening. So, what is the solution for the time being? Let's compute the flux by unit area. This we call iridians. And this unit area means that we don't imagine any kind of shape. We imagine something that is one square meter. So we normed by square meters. So I have explicitly said that it's going to be this big and whatever is going through this, this is what I'm interested in. Okay, well, unfortunately this is still ambiguous. And the reason for this is that we haven't taken into consideration what angle the light comes in. And you will hear about this in a second. So it matters whether you get a lot of energy in a big angle or a small amount of energy in a small angle. This is ambiguous. So let's remedy this by also norming with the angle. So we are talking about unit angle. So this meters, this square meters, we also divide by steridians. Well, what does it mean? So steridians is basically angle in multiple dimensions. Because in the textbook, there is only one angle to take into consideration if you draw a triangle. But if you would like to look at, for instance, you, it matters that I turn my head to the right direction in this direction. But if I would be looking here, I wouldn't be seeing you. So I need to take kind of another direction. So this is what we need to know of the piste steridians. So multiple directions. Next question is, so this was radians. What's normed piste square meters, normed piste steridians? Why is this still not good enough? Raise your hand if you know the answer. Well, nothing. It's fine as it is. So it's going to be questions like that. Make sure to think it through because I think last year someone was almost folding out of the chair. I know. I know. I know. Okay. This is fine. You can build simulations. Okay. So how do we do the actual light simulation? What I'm interested in is how much light exits the surface at a given point. So I pick a point in space and the direction is going to be the direction of pi i. How much is light? How much light is coming through from there? Solution is obviously the Maxwell equations. Why? Maxwell equations tell you how electromagnetic waves behave and light is an electromagnetic wave in a given spectra. That is around visible light as you heard in the last lecture about from 400 nanometers to 730. That's more or less the visible spectra. Well, apparently some people are overly excited about from Maxwell equations. Myself included. Well, I don't have a clue to have to like that. I reserve this part for the rendering equation at some point. Let's see about that. So, but unfortunately this doesn't work. Hopefully Thomas have said some things about this. The basic principle is that if it's really nanometers, then we would need to have a simulation on the scale of nanometers. And that's impossible. That's the simple way to put it. And the solution is going to be the rendering equation. And if you would like a tattoo of an equation, I would propose definitely having the rendering equation. You will see how beautiful it is. But at this point, we are not ready to digest all of it. So, let's have some theory before that. This is the trivial part. Okay. So, scalar product. Scalar product is a number. So, on the left side, I have two vectors. On the right side, I have a number. And the scalar product is of A and B. Vectors is the length of A times the length of B times the cosine of the angle between the two vectors. In this course, if even if I don't say anything about the length of the vectors, a length of one is assumed. Almost every single vector is going to be normalized. So, if they are normalized, then A, length, and B, length is one. So, this is strictly going to be the angle between the two vectors. So, the cosines are going to be angles. I mean, the cosine of the angle. Okay. Sound notation. This is what you are going to see in many of the figures in the literature. What's going on? This point of, this is, axis the point of interest. This is where we compute some unit. And V is the direction towards the viewer. It's flipped on purpose. I'm going to fix that in a second. So, V is a direction towards the viewer. Okay. So, if I have this projector above me, the V vector would be pointing towards me if the axis is there. And is the surface normal? L is the vector pointing towards the light source. Okay. So, if I would be at this point, then this L vector would be towards, for instance, that light source. R is the reflected ray direction. This means that I have a point. I have a light source. Light is coming towards that point. And R is where it's going to be reflected. So, again, an example. There is the projector. This is the point text. This is where the light comes from. And this is the reflected direction. So, this is flipped along the surface normal. You will see examples of all of these. And theta i and R are incidental from your reflected angles. And because we are going to be computing scalar products and things with vectors, it is important that these vectors that we are talking about are starting from the same point. So, generally in the images, you are going to see this X and some vectors that are pointing outwards all the time. Because these vectors I can use for computations. And just another important thing. This is the mathematical definition of R. This is how you compute the actual reflected vector. But I think you have done this before in previous courses. I think is it not the ECG, but unfortunately I don't remember the name. But there is some basic ray tracing. Is there? There is some ECG. You will need it for a shadow. But even if you haven't seen it, you will see this info. And you will see how this works. Let's talk about light attenuation. With some experience. Let's be practical. So, the sun shines onto a point of the surface from above. What portion of the output of one ray will hit the surface? Well, this is something like a diffuse shading. So, I am going to compute a dot program between L and N. L is towards the light vector and is the surface normal. Well, it seems to me that L and N is the very same thing in this scene. So, this cosine is going to be 0 degrees. So, the cosine of 0 is 1. So, I am not going to have any kind of light attenuation in this case. So, let's take another example. So, the sun is around here. And this is the light vector and you can also see the R. Just as an example. This is where it is reflected. So, I am computing this diffuse shading formula again. So, L dot N. Now, there is some angle. Let's say that this is 45 degrees. 45 degrees is the cosine of 45 degrees is 1 over square root of 2. So, the square root of 2 is 1.41. So, 1 over 1.41, that is around 1.7. So, there is some light attenuation if the sun is located here. And what about the extreme case? Another extreme case where it is almost at a 90 degree angle. Well, the cosine of 90 degrees is 0. So, this means that there is tons of light attenuation. And this is the reason why it is the hardest point of the day is moon when the sun is exactly above us. And after that, it is just, it is usually, if you do not take into consideration anything else, then it is only going to get colder and colder. And this is why it is so cold at night. So, we can neatly model this light attenuation with a simple dot product, which is the cosine of these vectors.