TU Wien Rendering #24 - Importance Sampling
10:27

TU Wien Rendering #24 - Importance Sampling

Two Minute Papers 15.05.2015 8 105 просмотров 70 лайков

Machine-readable: Markdown · JSON API · Site index

Поделиться Telegram VK Бот
Транскрипт Скачать .md
Анализ с AI
Описание видео
Monte Carlo integration is a fantastic tool, but it's not necessarily efficient if we don't do it right! Solving the rendering equation requires a lot of computational resources, we better use our math kung-fu to better squeeze every drop of performance from the renderer. By drawing samples from our function with a probability proportional to their function value (importance sampling), we can substantially improve our convergence speed. 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

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

<Untitled Chapter 1>

let's talk about important sampling because we have always been talking about uniform distribution it's you will see that it's not usually it's not a really great idea to assemble any function with the uniform distribution and what i usually what i am usually looking for is that i have a function that i would like to reconstruct and i have a fixed sample budget and from this project like x samples or x samples per pixel i would like to get the best estimation possible now we have written the formula

Formula for Important Sampling

for important sampling this important sampling was before when i divided by the p of x because i don't only have the f i will also take into consideration with p and there i can plug in an arbitrary sample distribution it can be uniform a gaussian distribution it can be many things now take a look at this just a second thanks okay so i would like to integrate this function which is the blue line so it's a spiky function and imagine that the green bars is the actual sampling distribution that i use it doesn't look like a good idea can anyone tell anymore exactly that's true so the green bars are too low too high on the right side and too low in the middle why is this a problem it's not representing the actual distribution exactly so it has to represent the actual distribution that we would like to sample why well let's skip a few slides okay so if the function takes a higher value at some regions this means that if i miss out on the reconstruction of this region then my error is going to be higher so what you could say is that if there is like a gaussian function or a spikey function i would want to put more samples where the spike is because that's a large area so if i can reconstruct this large area better i'm doing much better as if i would be something the parts that are actually have very small intervals so the flat regions that are almost zero so let's put more samples to the regions where the function is actually larger and if we do this correctly then what we're doing is called important sampling so what we're looking for is that i have these green bars and these green bars should match the blue function important sampling again i am looking for the expected value of f over p so i divided and multiplied with p of x in the expected value formula and the question is what should be the p that i plug in here so this can be the uniform distribution on av or it can be an arbitrary distribution what would be a good distribution usually what is proportional to the function so if the function is large somewhere the sampling distribution has to sample that region often so it also should be larger if it's small in different regions then it also should be small and this also says that if there are regions where the function is zero i don't want to put samples there at all because there's nothing to reconstruct the curve below the function is zero and we will deal with constructing functions like that but for now imagine that i have in my hand a function that is representative of the interval now we have talked a bit about this so this better this should give me quite a bit of an advantage because otherwise it's not work so this is a rendered image with no importance something that look closely you will see now results will import something so fixed sample budget it was running for the same amount of time and this is the difference that you can obtain with simple importance so this means wherever there is more light i will put more samples and the darker regions i will need left of it with my samples let's take a look at another example you can see how this how noisy this region is next to the car and with the important sampling this is accounted for much better now we are finally at the moment where we can attempt to solve the rendering equation so this infinite dimensional singular this problem child that is so difficult that it seems at first that no one should ever block butter to even try it but now it seems that we have every tool in order to solve it so just again the intuition the left side after the equality sign means that there are objects that implied light sources if you will and this i have to account for but this is not the only source of light as the as these objects emit light then these will hit other objects that reflect this amount of light so this means that i emit an amount of light and i also reflect an amount of incoming light taking into consideration also light attenuation and the vrdf which is the material properties of the object that i have at hand so let's evaluate this through monte carlo integration so again the formula i am sampling f over p this is equivalent of integrating f of x from a to b now what is f is what you see up here on the right this whole thing uh sorry just the integral part and p will be something so i just substitute the very same thing in here on the right side so incoming light times the brdn times the light attenuation vector and there is going to be a p which is now a sampling probability for outgoing direction so this means that i hit an object and i need to have a choice which outgoing direction should i assemble where should i continue in which direction in my ring so this is going to be one direction of the hemisphere this is the monte carlo

Monte Carlo Estimator

estimator for the actual integral and let's imagine that we are trying to solve this for a diffuse object so the diffuse brdf is rho over pi normally it was one over pi y how can the prdf be just a number well easy the perfect diffuse material

Perfect Diffuse Material

means that all possible outgoing directions have the same probability if i hit this cable if it would be perfectly diffused we talked about the fact that this is actually glossy but if it would be perfectly diffused like lightning i hit it somewhere and the outgoing direction can be anywhere on this illumination hemisphere they all have the same problem what does row mean rho is the albedo of the material because if i say one over pi this means that every ray that comes in will have an outgoing grade so this object would be completely it wouldn't absorb completely wide it wouldn't absorb any alternatives most objects are not like that so this absorption is wavelength dependent and we can represent this as now how does the equation look like i just substituted dou over pi for the vrdf so it seems that we know everything in this one just the incoming gradients so what do we do with this sampling distribution when we hit this diffuse object we send out samples and we try to collect the incoming gradients which is the li with this sampling distribution and the question is for this case what would be a good sampling probability function to sample the diffuse vmdf now what we said is that this p the denominator should be proportional to the numerator now l i we don't know this is some part that we cannot really estimate because i would have to send many samples out on this hemisphere to know exactly how much light is coming in but by the time i get to know how much light is coming in i've done the sampling so then i am not interested in the sampling distribution because i have a converged image so this part will leave out from the important sampling this we cannot handle as of now but this row over pi times cosine of theta we can't deal with so let's imagine this sampling distribution which is cosine of theta over pi and the goal of this is that these people will kill each other i have a cosine theta times the numerator and the denominator and the same with pi so this only so only this part will remain there i could technically also put the albedo of this given material in the sampling distribution but that's but let's be general for now so in the end i have this simple equation look at this is what is going to be the solution of this infinite dimensional integral what it says is that i'm going to send samples on this hemisphere and i'm going to average it because in the end i defined by that's it and then if you do something like this and you add the volumetric part then you can render margarita from the game of thrones

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

Ctrl+V

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

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

Подписаться

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

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