TU Wien Rendering #30 - Dispersion and Spectral Rendering

Lecture (TU Wien Rendering #30) introducing optical dispersion and spectral rendering. The speaker explains that indices of refraction are wavelength-dependent functions (not constants), demonstrates dispersion effects (prism, rainbows, chromatic aberration), shows example renders produced with LuxRender (including diamonds) and references cultural examples. The lecture then outlines how to represent light using spectral power distributions and suggests Monte Carlo integration over wavelengths to produce physically-correct renders, with a pointer to PBRT chapter five for further details.
Chapters
Okay, so why don't we get started? These. I will show you some of the small paint contest assignments from previous years. Is this visible? Is this looking good enough? I think I should pull some of the curtains maybe, right? Maybe a bit. Just. Thanks. How about that? So you can see that even with a small paint program, you can make incredible, incredible scenes. So this is the. Thanks. So this is the state of the art lecture. Basically what we are interested in. This and the next lecture is starting from the very first algorithm that was ever created to solve the rendering equation, a classical path tracer, up to the most sophisticated works, some of them which came out less than a week ago. And I won't go into deep mathematical details for most of these techniques. What I would like you to know is the basic idea and the intuition behind the method and why we are doing the things we do. So deep mathematical details will also be there in the form of links where you can look behind the curtain and you will see what is exactly going on in there. Now, before we start with the state of the art part, there's a few things that we need to discuss. One, Dispersion. So we have talked about indices of refraction, the index of refraction for different materials. What was it? It was a number. So in every code, in every program, in every theory, we use numbers. Well, in reality, indices of refractions are not numbers. They are in fact functions. What does it mean? They could be functions that depend on the wavelength of incoming light. And what it exactly means is that there are materials that refract incoming light of different colors to different directions. And that's quite profound because you will see the beautiful effects of dispersion in a second. And there are also some supplementary videos that you should take a look at home. This is a good example of it. This is a prism. So you can see that the incoming light is white. And the prism does break down to this white incoming light to all possible colors. There are another good example of this is rainbows. So whenever you are on a family trip and they are asking what you're looking at, and if you accidentally don't say rainbow, you will maybe say dispersion and they will put you in an asylum instead. But don't worry, you were correct scientifically and that's all that matters. You can also see a maybe not so beneficial and not so beautiful effect of this Persian. It is called chromatic aberration. This means that we have a camera lens that is possibly not the highest quality and it can introduce artifacts like this because different Colors of light are reflected into different directions and you don't get the sharp image that you would be looking for. Now this is dispersion rendered inside Lux Render. So you can see that with physically based rendering, you can actually capture this effect. And you can also render diamonds. So if you have a fiance and you would like to buy a ring but you're broke because, because you're a university student, then you can just render one. And you can also render one with this person. Well, see if you have a nerd girlfriend, because if so, then maybe she will be happy about it. Most people aren't. And I speak from experience. And you can also see this really beautiful effect in the old, old Pink Floyd album cover called the Dark side of the Moon. There are also some videos about this in the Internet rendered with Lux render. Take a look. Now, the first question is, is the index of refraction of glass constant? Well, let's look it up. Obviously, we may have glasses that are made and manufactured in different ways. Most of them are not completely clear. They are some kinds of a mixture. So there are different kinds of glass. But let's just pick one randomly from a database that gives you indices of refraction. And you can see that it is actually not flat. It is not a constant. There is something happening in the function. So this means that there are glass types that have dispersion effects and even only slightly, because you can see that between the minimum and the maximum, there's not such a large difference, but there is something. So you could say that at least this kind of glass introduces some degree of dispersion. So let's take a look. What do you think about this image? Does this caustic have any kind of dispersion effect or does it not? What do you think? Is it a bit more colorful around the edges or is it completely white? Looks exactly. It looks a bit red for me, but it might be. Okay, could be, could be. Give me one more opinion. What do you think? Yeah, it's a little bit red and the board is plastic. I don't know. Doesn't look like a rainbow or something. It might be a rainbow, but it may be significantly smaller. So maybe you would have to zoom in really close to see the rainbow. So this is up for debate. We could see that the IOR seems to be non constant and therefore there should be a dispersion effect. So some artists claim that they can spot the difference between a physically based renderer, even for materials like that, and simple RGB rendering where you cannot render these dispersion effects correctly. This is up for debate whether you can see it, but science says that yes, even if there is a slight difference. There is a difference. If you would like to know more about this version, then there is this wonderful series called A Space Time Odyssey. Have any of you heard of this before? Raise your hand. Okay, few of you. So this is hosted by the magnificent Neil DeGrasse Tyson. Yeah, Neil DeGrasse Tyson. And you should absolutely watch it. So everyone who hasn't watched it yet, I'd like to hear your excuse. Or at least I'd like to hear that you will go home and watch it. So this episode is about that. This version mostly. And you will know all about this version if you watch it. Okay, now we have another question, because we have written an RGB renderer. So if you look up the Source Code of SmallPaint Everywhere, you just see RGB, RGB, RGB. How do we write a correct physically based renderer? And even before that, how do we even represent light in the visible spectrum? Now a good answer to this is to introduce a function that describes how much light is carried at different wavelengths. Now this would be a continuous function that we could call spectral power distribution. And you can see that at these lower wavelengths there is not too much light carried. And on the higher wavelengths there is more. So you can put this representation into your render. And what you would do is that you would just a naive solution, you would pick a randomly chosen wavelength and you would trace a ray into the scene using this wavelength. And if you do this, you can actually do another kind of Monte Carlo integration, because you would also add one more dimension of integration. And this one more dimension would be over wavelengths, because you would also be stochastically taking random samples of the rendering equation for a given wavelength in a given color. And then you would need to sum it up somehow to get a sensible solution. There is more about this in PBRT chapter five.










