# Tag Info

### Is Russian Roulette really the answer?

In order to understand Russian Roulette, let's look at a very basic backward path tracer: ...
• 3,792

### Is Russian Roulette really the answer?

Just to expand on some of the other answers, the proof that Russian Roulette does not give a biassed result is very simple. Suppose that you have some random variable $F$ which is the sum of several ...
• 781
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 ...
• 656
Accepted

### What effects does path tracing capture that recursive ray tracing does not?

Generally speaking, path tracing removes a number of assumptions that ray tracing makes. Ray tracing usually assumes that there is no indirect lighting (or that indirect lighting can be approximated ...
• 3,982

### Is Russian Roulette really the answer?

The Russian roulette technique itself is a way of terminating paths without introducing systemic bias. The principle is fairly straightforward: if at a particular vertex you have a 10% chance of ...
• 3,982
Accepted

### Full Monte-Carlo Volumetric Scattering

First of all, a good reference for Monte Carlo path tracing in participating media is these course notes from Steve Marschner. The way I like to think about volume scattering is that a photon ...
• 25.1k
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 ...
• 2,226
Accepted

### Why random monte carlo sampling instead of uniform sampling?

Sample locations with a uniform pattern will create aliasing in the output, whenever there are geometric features of size comparable to or smaller than the sampling grid. That's the reason why "...
• 25.1k

### Why random monte carlo sampling instead of uniform sampling?

Monte Carlo methods rely on the law of large numbers, which states that the average of a random event repeated a large number of times converges toward the expected value (if you flip a coin a ...
• 4,420
Accepted

### Path Tracing With Multiple Lights

It's not that hard. If you have just planar or angular light sources, you can think of them as one light source split into multiple chunks and the only thing to deal with is how to sample this multi-...
• 1,464

### Is there ongoing research on Markov Chain Monte Carlo algorithms (other than Metropolis-Hastings) for use in ray tracing?

Overview Here is a short overview of the most used space representations, MLT variants and mutation strategies for these MLT variants. As you can see, there are quite some papers dating back to 2017 (...
• 1,084

### 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 ...
• 1,585
Accepted

### How does everyone count "Rays per Second"?

I've seen both, unfortunately. I'm not fond of rays per second as meaning exclusively primary rays and I'd suggest "paths per second" or better yet "samples per second" instead. "Complete ray" is not ...
• 330
Accepted

### Is this Russian roulette code correct?

I think you're right and the subtraction is a mistake. The code should rather be multiplying the fraction of photons not absorbed into the weight. Something like: ...
• 25.1k
Accepted

### The variance for the Monte Carlo estimator

I don't have that book to check the context of this, but from the equations you posted, yes, it looks like you're right. The $1/N$ factor should be applied to both terms. That agrees with the formula ...
• 25.1k
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 ...
• 2,226
Accepted

### Transforming between solid angle and spherical angle distribution in PBRT

As lightxbulb mentioned in the comments, one confusing thing here is that two different functions are being called $p$. Kind of like function overloading in C++, the $p(\omega)$ and $p(\theta, \phi)$ ...
• 25.1k
Accepted

### Path tracer isn't converging

I can find two possible reasons for the image not converging. #1. Every sample is the same For every sample, you generate random rays. You do that when you shoot the ray through a pixel (for anti-...
• 1,605
Accepted

• 1,585
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 ...
• 1,464
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 ...
• 1,585

### In bidirectional path tracing, is a camera subpath with $n$ vertices determined by a fixed number of random numbers?

For a fixed strategy, you can end up consuming a different number of samples depending on your mutation. This can happen for at least two reasons. If your perturbation changes some material along the ...
• 344

### BDPT - How to handle deterministic ray PDF?

Sorry about leaving it for so long but I was so busy implementing the goddamn algorithm, I forgot about this :) So after reading up on Veach's thesis pretty closely, I understood what was going on. ...
• 2,468

### Energy redistribution sample re-integration

It sounds like you yet have to adjust the importance function of the Markov Chain according to the way you assign paths to each of the two estimators, path tracing and ERPT. If you think about it in ...
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 ...
• 25.1k

### 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 ...
• 25.1k
Accepted

### Confusion about the bias during Monte Carlo integration

I think so. I did some numerical experiments using Monte-Carlo intergation. discard no-discard within-range uniform GT $x^2,x\in[0, 2)$ 14.705318 2.66772274 2.6668968 2.666666 $\sin x, x\in[0, \pi)$...
• 36
1 vote
Accepted

### How to calculate the PDF of a multi-lobe BSDF

The summation doesn't include the BxDF that was picked for sampling. Look again at this line: if (bxdfs[i] != bxdf && bxdfs[i]->MatchesFlags(type)) ...
• 25.1k
1 vote
Accepted

### Monte Carlo Importance Sampling

During the implementation, the way rays are scattered does not actually change and remains random. Actually the way rays are scattered does change, specifically when you sample a light. In chapter 8 ...
• 2,226

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