64 votes
Accepted

What is Importance Sampling?

Short answer: Importance sampling is a method to reduce variance in Monte Carlo Integration by choosing an estimator close to the shape of the actual function. PDF is an abbreviation for Probability ...
user avatar
  • 3,552
12 votes

What is the difference between importance sampling and mutiple importance sampling?

When shading a point on an opaque surface, you need to gather incoming light and weight it with the bidirectional reflectance distribution function (BRDF) of the material. The naive approach is to ...
user avatar
  • 2,223
12 votes
Accepted

Does cosine weighted hemisphere sampling still require NdotL when calculating contribution for indirect light?

You always need to multiply by the cosine term indeed (that's part of the rendering equation). Though when you do indirect diffuse using ray-tracing and thus monte-carol integration (which is the most ...
user avatar
  • 656
11 votes

What is Importance Sampling?

If you have a 1D function $f(x)$ and you want to integrate this function from say 0 to 1, one way to perform this integration is by taking N random samples in range [0, 1], evaluate $f(x)$ for each ...
user avatar
  • 3,566
7 votes
Accepted

Rendering equation in terms of paths rather than directions

This is a very good question. There is a common misconception that Monte Carlo, or integration is applied "recursively" on the rendering equation. That is not what's happening. Numerical integration ...
user avatar
  • 1,837
6 votes

Path weight for direct light sampling

By "bounces by the BRDF", I assume you mean picking random directions in the hemisphere and weighting by the BRDF, then averaging over those samples. I guess you're accumulating one sample per frame, ...
user avatar
  • 23.7k
6 votes

Importance Sampling of Environment Maps

This is not a full answer, I would just like to share the knowledge I obtained by studying two of the papers mentioned in the question: Steerable Importance Sampling and Practical Product Importance ...
user avatar
  • 1,377
5 votes

Generation of stratified cosine weighted samples on hemisphere

The classic method is to uniformly sample the disc at the base of your hemisphere and to project your samples upwards on the hemisphere (eg. compute z from x and y). This yields a cosine weighted ...
user avatar
  • 1,575
4 votes

Importance Sampling of Environment Maps

Disclaimer: I have no idea what is the state of the art in the environmental map sampling. In fact, I have very little knowledge about this topic. So this will not be complete answer but I will ...
user avatar
  • 446
4 votes
Accepted

Power heuristic in multiple importance sampling

PBRT v3 Page 799: Veach determined it empirically.
user avatar
  • 551
3 votes
Accepted

Importance sampling a cosine distribution

You can sample using absolutely any distribution you want, as long as you weight the results by dividing by the pdf of the sampled distribution. It will converge to the right answer (as long as the ...
user avatar
  • 23.7k
3 votes

Multiple Importance Sampling with more than one light

It seems that the answer to my question is that my approach inherently can't work. After doing thinking about it some more and researching existing renderers, none seem to implement what I'm doing, ...
user avatar
  • 1,100
3 votes
Accepted

Multiple Importance Sampling in Path tracer produces Dark Images

Throughout my answer I'll sometimes refer to some results in https://sites.fas.harvard.edu/~cs278/papers/veach.pdf by using [MIS,section_number]. You can skip the following derivation if you don't ...
user avatar
  • 1,837
3 votes
Accepted

Path Tracer - sampling dimensions confusion

Only one path per sample. If you had 64 bounces per first hit and 64 per second hit and so forth you'd never get an image. Edit: And that's why you need to sample each pixel so many times (easily ...
user avatar
  • 315
3 votes
Accepted

Importance Sampling in Unreal Engine Formula Derivation (Irradiance term)

I just read notes on moving frostbite to pbr and I found the derivation of the method above. So I will just show the derivation here and quote some of the explanation. One can notice an extra〈n·l〉...
user avatar
  • 473
2 votes

Efficiently sampling specific surfaces using MIS in path tracing

I will not answer your questions directly, but will try to change your mindset a bit. I hope got your intentions reasonably well... The usual way the path tracing is implemented is that the ...
user avatar
  • 1,377
2 votes
Accepted

Generation of stratified cosine weighted samples on hemisphere

If you have a deterministic mapping function which transforms uniformly distributed samples into the desired PDF (cosine shaped in your case), just feed it directly with stratified uniformly ...
user avatar
  • 1,377
2 votes
Accepted

using importance sampling to reduce the error of outscattered radiance

In general, the idea of importance sampling is to distribute samples in a way that matches the function being integrated (or more practically, matching some factor in it). This reduces the variance of ...
user avatar
  • 23.7k
2 votes
Accepted

Direct illumination, specular surfaces, and MIS

Specular surfaces which use MIS are not perfectly specular like a mirror. They have a small amount of blur, otherwise there is indeed no point in sampling the light as all the samples will evaluate ...
user avatar
  • 1,575
2 votes

When sampling direct light, what to do if testing ray been blocked by transparent object?

If a ray intersect a transparent object (regardless of the order) multiply by the colour to get proper attenuation, then continue. Note that the order does not matter. The other options is to ignore ...
user avatar
  • 1,837
2 votes
Accepted

PBR : Understanding importance sampling

Leaving the actual derivation of mathematics aside, I'll try to give a general description of how can we combine the NDF with importance sampling in spherical coordinates. What is NDF ? The problem is ...
user avatar
  • 441
2 votes
Accepted

Integrating BRDF using Importance Sampling

Think of this way: when integrating uniformly over the hemisphere, it's like you are importance-sampling with a constant pdf of $1/2\pi$. The multiplication by $2\pi$ at the end, then, can be seen as ...
user avatar
  • 23.7k
2 votes
Accepted

Can't understand the Importance sampling GGX

In microfacet BRDFs, the half-vector is the same as the microfacet normal. The half-vector is exactly the required normal for a microfacet to reflect light from the incident ray to the outgoing ray, ...
user avatar
  • 23.7k
2 votes

importance sampling rectangular light

From looking at the equations, it looks to me like alpha must be the angle between the surface normal of the light source, and the ray direction. This is the "projected area" factor: the ...
user avatar
  • 23.7k
1 vote
Accepted

Relationship between probability densities

I think this is mainly just giving new names to terms and a bit of algebra. $p^\perp(\omega_o)$ is the name given to the probability density $\frac{dP}{d\sigma^\perp}(\omega_o)$. Similarly $p(\omega_o)...
user avatar
  • 23.7k
1 vote

How can I make the simplest physically based mixed specular-diffuse BRDF (and how to properly sample it)?

A common way of combining diffuse and specular brdfs is by using a fresnel equation. Essentially, for some specular materials, the amount reflected and transmitted (passed through the object) depends ...
user avatar
  • 479
1 vote
Accepted

Confusion about light PDF

Most of the answer is in the text you linked: Shapes almost always sample uniformly by area on their surface. Therefore, we will provide a default implementation of the Shape::Pdf() method ...
user avatar
  • 1,575
1 vote
Accepted

How does Next Event Estimation work with transformed lights?

Sampling is typically done in local coordinates first and then mapped to world space. You don't have to change the formula for this, but $\mathbf{p}'$ needs to be in world space when you compute the ...
user avatar
  • 309
1 vote

Multiple Importance Sampling in Path tracer produces Dark Images

One of the first things that many people get wrong with MIS of direct lighting is that you have to always consider the same light source for both light sampling and BSDF sampling. For example, if you ...
user avatar
  • 126
1 vote

BSDF sampling versus light sampling

Edit: I suddenly understood the issue. The noise in the top right corner of (b) is because it's struggling to find the tiny fraction of angles in which the BSDF is not extremely close to zero. Yes ...
user avatar
  • 476

Only top scored, non community-wiki answers of a minimum length are eligible