TU Wien Rendering #4 - Diffuse, Specular and Ambient Shading
13:05

TU Wien Rendering #4 - Diffuse, Specular and Ambient Shading

Two Minute Papers 25.03.2015 20 119 просмотров 256 лайков

Machine-readable: Markdown · JSON API · Site index

Поделиться Telegram VK Бот
Транскрипт Скачать .md
Анализ с AI
Описание видео
As we don't yet know enough to solve the full rendering equations, we invoke simplified BRDF models to capture the most common materials seen in nature: one for diffuse, specular, and ambient shading. They provide quite beautiful and powerful results with a staggeringly simple formulation. About the course: This course aims to give an overview of basic and state-of-the-art methods of rendering. Offline methods such as ray and path tracing, photon mapping and many other algorithms are introduced and various refinement are explained. The basics of the involved physics, such as geometric optics, surface and media interaction with light and camera models are outlined. The apparatus of Monte Carlo methods is introduced which is heavily used in several algorithms and its refinement in the form of stratified sampling and the Metropolis-Hastings method is explained. At the end of the course students should be familiar with common techniques in rendering and find their way around the current state-of-the-art of the field. Furthermore the exercises should deepen the attendees' understanding of the basic principles of light transport and enable them to write a simple rendering program themselves. These videos are the recordings of the lectures of 2015 at the Teschnische Universität Wien by Károly Zsolnai and Thomas Auzinger Course website and slides → http://www.cg.tuwien.ac.at/courses/Rendering/ Subscribe → http://www.youtube.com/subscription_center?add_user=keeroyz Web → https://cg.tuwien.ac.at/~zsolnai/ Twitter → https://twitter.com/karoly_zsolnai

Оглавление (9 сегментов)

<Untitled Chapter 1>

let's go with a simplified version of the whole thing we're going to talk about simplified brdf models one there's

Ambient Brdf

going to be the ambient brdf how does it look like well first on the left side I see I this is intensity well what is this well no one knows because we have not radians not something very physical here this is going to be a simplified version of the rendering equation basically a bunch of hexs if you will something that is vastly simplified it doesn't really have a physical meaning it doesn't have physical units but it works it's beautiful and it's a good way to understand what's going on so the intensity that we measure is going to be an ambient the product of an ambient

Ambient Coefficient

coefficient of an object this is dependent of the object this means that uh this means something like the color of the object and the I is going to be the intensity the ambient intensity of a scene or the light source and uh later on we're going to be talking about why this is interesting so this is an example we have a blue object over here and it's the same color everywhere why because the formula doesn't depend on anything there's just one coefficient that's multiplied uh by this uh intensity of the seene so that's an ambient shading uh what else is there is the diffuse brdf this is what we compute is a diffuse coefficient what is the diffuse color the diffuse albo of this thing and there's going to be a product of L and N this is what we did before defuse objects look like that uh please raise your hand if you have ever done any kind of diffus Lum verion model in graphics okay excellent great uh and just another thing this uh diffuse qu efficient is the very least RGB okay so this is how much light is not absorbed on every different wavelength because I cannot describe colors in one number the very least RGB or a continuous Spectrum just for the record and now it's uh looking better because I can more or less see where the light source is with for this diffuse shading uh

Specular Brdf

there's also specular brdf what I compute is v. R * a specular coefficient and V is the vector pointing towards the viewer and R is the reflected there's going to be examples of that okay so just that you see the formula here and there's an N which is a shininess Factor uh in the next assignment you will play with this yourself so for now I will keep this a secret what this exactly does and whoops I'm going to jump through this because I would like to ask a question later on and you're going to find out the solution excuse me uh so this is how the specular highlights look and if I add up all of these things ambient and diffuse and specular I get some complex looking uh model that looks something that is that approximates uh physical reality so I just simply add all these terms up and uh okay well I have something like this here and I have on purpose removed the light source from this image but probably everyone can tell where the light source is expected to be right so raise your hand if you know where the light source should be okay cool uh where should it be um above of exactly ball somewhere exactly so it's going to be above the Spheres and this is exactly where it is so these material models are descriptive in a way that I get images that have some physical meaning that resemble physical reality well let's take a look at an actual example uh the question is what would this region look like the one that I marked like this pixel if pixels existed in the real world uh would it look the same if I moveed my head in reality and that sounds like an you know it sounds like a tricky question yeah I I've seen the answer yes uh well uh let's say that this part is purely diffuse I don't see many specular Reflections in there diffuse is l. n so light Vector Direction times the normal does it change if I move my head well how to answer this question you don't only need to see what is in an equation you are you have to be aware of what is not in there does it change if I move my head raise your hand if you know the answer it's very apparent to many of you yes should I answer yes it does not change if I move a little okay but it might change because the specularity might move over there yes that's very true so it doesn't change because we know that it doesn't change I mean uh the walls look the same uh if I move around I mean I'm not talking about shapes I'm talking about colors they don't change in Mirror however that's change uh and the mathematical reason for this is that the view direction is not in this equation I can change the view Direction all I want and nothing will change in the diffuse brdf so this is like a general mathematical uh trick or uh principle that you can use in a number of different things don't just look at what variables are in there uh try to think of variables what you would imagine that would be there and okay why are they missing and that's also information that's what there not only what's there but what is missing is valuable information so what about these regions these are specular highlights these are described by the specular brdf v. R so viewing Direction times the reflected uh light Direction and let's actually compute what's going on so I would be interested in the intensity this fake something of this point where this is uh the light Vector this is where it points to it is probably reflected uh somewhere there because it comes in and it's an ideal reflection so it's going to be reflected in this direction and this is where I am just for example so I'm interested in v. r well uh this is going to be a cosine uh there is a small angle between V and R so if there's a small angle that's cosine of a small number that's large that's close to one and there's going to be a huge scalar product therefore this point is bright and this is indeed bright and the question is which is uh very easy to answer in a second is does it change if I move around does it change yes obviously it does change because V is in the equation and if I change this around you see something different uh for the specular vdf this is going to be bright just one of my favorite intuitions of this v. r because otherwise this is just Lads this means how much am I standing in the way of the light so uh life lesson if you can't find the water droplets on the floor after having a shower move your head around because that's specular if the windshield of a car is too bright and it's and you just can't take it anymore move your head around this this connects to uh the physical reality around us and that's good tips in case you didn't know that you need to move your head around if things are too bright now you know okay so uh this is the the point where we can just for a second stop and Marvel at how beautiful things we can create with such simple equations and the rendering equation is going to be even more beautiful than that like infinitely more beautiful and there is some uh additional beauty that you can think about uh when you look at images like that okay how would I shape this point is this diffusive is this specular why does it look the way it does so you can if you have nothing better to do you can think about these things when on public transport uh let's call this thing the

Illumination Equation

illumination equation this is the fake simpler version of the rendering equation now what is in there most of

Ambient Shading

this is familiar there is an ambient shading term and then there's the diffuse l. n there is the specular v. we add all these together and we multiply this by the amount of incoming light because if there's no light sources in the scene there's no light is not coming from anywhere therefore this is all multiplied by zero if there's a bright light source then things get brighter so we multiply by this incoming light and what is important to know is that this is only the direct effect of light sources uh this sounds a bit esoteric at the moment but later on a few lectures down the road we're going to be all about indirect illumination and goodies like that and this is neglected and the ambient term is used to make up for it you will see examples of this in the next lecture and this is a crude approximation but it's still beautiful it's easy to understand and it serves as a stepping stone to solve the real rendering equation uh but this is not done uh one thing is that if there are multiple light sources the scene is expected to be brighter so I would compute the whole thing for multiple light sources so there's going to be a sum in there and the inside the sum this the indexes are the number of light sources basically just I just didn't want to over complicate this uh but still something is still missing this is not done I arrive to a point I compute this specular ambient and theuse shading and I am not done let's discuss how R tracing works

How Ray Tracing Works

and we'll find out so the first thing is that what you see here is non-trivial because what you would imagine is that you start shooting Rays from the light source and then some of the Rays would make up to make it to the camera to your eye and most of them won't so we go with a simple uh optimization that we turn the whole thing around and then we start tracing Rays from the camera because if I start tracing from there I can guarantee that I deal with rays that are not wasted because the I'm not interested in the light rays that do not make it to the camera so I if I start from there I can guarantee that this is not wasted computation so how do we do this uh there is this camera plane we will discuss how to construct such a thing and we construct Rays through this camera plane and what I'm interested in is the projection of the 3D World to this plane this is what you will see on your monitor so I should raise from this camera and I intersect this against objects that are in the scene I want to know where is the light stopping where what object objects does it hit and where does it get reflected

Intersection with Scene Objects

so the second is intersection with seene objects I have to realize that it hits this sphere then I stop there I compute the basic shading terms like the diffuse and the rest and then I don't stop there but I'm interested in where the light is reflected I need to continue from here and this light this uh light rate may be reflected or refracted and I need some

Recursion

kind of recursion in order to account from that for that and the recursion works in the following way I stop at this point where I hit the ball the sphere and what I do is that I imagine that this is now the starting point of the Ray and I'm shooting AR aray outwards and I start this Ray tracing algorithm again so this is how the recursion works this was missing from the formula and this is just what uh the text version of what I have said for those who are reading this at home and you will deal with Reflections yourself

Другие видео автора — Two Minute Papers

Ctrl+V

Экстракт Знаний в Telegram

Экстракты и дистилляты из лучших YouTube-каналов — сразу после публикации.

Подписаться

Дайджест Экстрактов

Лучшие методички за неделю — каждый понедельник