Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [monte-carlo]

The tag has no usage guidance.

0
votes
1answer
72 views

Monte Carlo Importance Sampling

I am following the "Ray Tracing - the Rest of your Life" book by Peter Shirley and I am facing some troubles in the implementation of Monte Carlo importance sampling, and Direct light sampling. Monte ...
4
votes
2answers
290 views

Multiple Importance Sampling in Path tracer produces Dark Images

So I recently implemented Multiple Importance Sampling in my path tracer which was based on next event estimation. The problem is without MIS I get images like, This is obtained by setting ...
1
vote
1answer
50 views

Ask for help on understand an algorithm which combines stratified sampling and importance sampling of Monte Carlo

I cannot understand an algorithm which combines stratified sampling and importance sampling of Monte Carlo. It is introduced in Page 73 of a textbook "Advanced Global Illumination", 2nd edition, ...
2
votes
1answer
69 views

How do we approximate the integral of the measurement contribution function in Metropolis Light Transport?

In Metropolis Light Transport, we need to approximate the integral of the measurement contribution function. I've read that this can be done using a traditional approach like path tracing. However, ...
0
votes
1answer
95 views

How does Primary Sample Space Metropolis Light Transport work?

For simplicity, assume we're only dealing with surfaces which have either a Lambertian or perfectly specular material. Morever, assume that the only type of lights are area lights (i.e. surfaces with ...
1
vote
1answer
129 views

Path tracer isn't converging

So I just completed a naive path tracer that uses explicit direct light sampling. Problem is the path tracer isn't converging. It's like a raytracer, showing a single image on each pass. More info on ...
3
votes
1answer
150 views

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

Metropolis Light Transport is an application of the Metropolis-Hastings algorithm. Its variants differ only in the used "mutation strategy". Is there ongoing research on other Markov Chain Monte ...
1
vote
0answers
55 views

Tail Recursive Monte Carlo Raytracing

I am writing a raytracer in F# using montecarlo sampling I would like to make my recursive calls tail recursive but I am not sure of this is possible with MC raytracing as one has to evaluate sampled ...
4
votes
2answers
83 views

Variance of estimator (Monte Carlo Integration)

So I was reading this paper by Lafortune, "Mathematical Models and Monte Carlo algorithms" and in it he writes. We have a function or integrand I we want to estimate given as, $I = \int f(x) dx$ We ...
1
vote
1answer
239 views

Phong Modified BRDF Implementation

According to: https://www.cs.virginia.edu/~jdl/importance.doc For a specular sample: (page 4 of the document) $$pdf(\theta_{i}) = \frac{n+1}{2\pi} \cos^n(a)$$ And this is how you choose an ...
1
vote
1answer
172 views

Direct illumination, specular surfaces, and MIS

Multiple Importance Sampling (MIS) is a technique used by Veach's VCM technique to balance responses of different surfaces to different types of importance sampling for direct illumination. My ...
3
votes
1answer
110 views

Primary ray directions (MC Path tracer)

Do primary rays conform to the frustum? If they're randomly directed, is the randomness fitted to some distribution (as it would be for a diffuse BRDF? I'm building my existing raymarcher into a monte ...
1
vote
0answers
59 views

Sample Correlation and Random Variables — An Intuitive Explanation?

I'm mainly trying to understand what it means for Monte Carlo samples to be correlated. Can somebody fit this into the theory of what I know about random variables, covariance and correlation? And ...
2
votes
0answers
411 views

What's the nature of Monte Carlo noise?

Monte Carlo rendering is just a process of sampling and reconstruction to evaluate the rendering equation. Why is it called noise rather than error?
6
votes
1answer
100 views

Monte Carlo Integration

Let $I$ = the value of integration and $p$ = probability distribution. The estimator is denoted as $\left\langle I \right >$ and is $$\left\langle I \right >=\frac{1}{N}\sum_{i=1}^{N}\frac{f(...
5
votes
1answer
90 views

The variance for the Monte Carlo estimator

I was wondering about the variance for Monte Carlo. The book (Advanced Global Illumination 2ed, p.60) writes the equation as follows: $\sigma^2 = \frac{1}{N} \int(\frac{f(x)}{p(x)} - I)^2p(x)dx$ $\...
4
votes
0answers
324 views

Problem with specular BRDF (Monte Carlo & Path Tracing)

Above on the left is my attempt and on the right is what I'm aiming for.As you can see my sphere with the specular brdf has a weird dark ring In my radiance function I am recursing through the ...
4
votes
1answer
130 views

Troubleshoot half vector sampling from a distribution (cook-torrence, trowbridge-reitz, etc)

I am learning ray tracing and the mathematics behind it. I have a working monte-carlo raytracer I am experimenting on. I have gotten past pure diffuse BRDFS, area lights, acceleration structures, ...
6
votes
1answer
375 views

Path Tracing With Multiple Lights

I've got my path tracer working great for a single light, but I'm having trouble coming up with a solution for scenes with multiple lights. My first thought was to just send a ray to each light and ...
2
votes
0answers
136 views

Picking multiple light sources from a mixture densities

According to Peter Shirely paper, one pdf(probability density function) can be defined for the union of the light sources and pick only one using a random number from this density: $$p(x) = \alpha_1 ...
4
votes
2answers
604 views

Generation of stratified cosine weighted samples on hemisphere

I have had luck with cosine weighted hemisphere samples, and I know how to generate stratified uniform samples, but I wanted to experiment with combining the two. However, how do I correctly stratify ...
11
votes
1answer
2k views

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

When converting from uniform hemisphere sampling to cosine weighted hemisphere sampling I am confused by a statement in an article. My current indirect contribution is calculated as: ...
8
votes
1answer
205 views

Is this Russian roulette code correct?

I'm using www.scratchapixel.com among other resources to help me learn how to implement a renderer. I am looking at the following code from this page where a packet of photons moving through a ...
8
votes
2answers
511 views

Why random monte carlo sampling instead of uniform sampling?

Why is it that it's so common to use monte carlo randomized sample locations, instead of uniform sampling? I'm assuming that taking randomized samples gives some benefit but I don't know what they ...
10
votes
1answer
940 views

Full Monte-Carlo Volumetric Scattering

I would like to add full monte-carlo volumetric scattering to my path tracer, but I'm having a hard time researching how to do it. Let me explain what I would like to do: A ray enters a material, and ...
6
votes
1answer
691 views

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

So I have been wanting to make a rendering engine as a summer project. I'd like to shoot for photo-realism of static scenes rather than real time dynamic game like graphics. So in my research I came ...
8
votes
1answer
706 views

How does everyone count “Rays per Second”?

Recently I'm developing a Monte-Carlo path tracer. To measure my tracer's performance, I decided to implement a simple mechanism to count how many rays can it trace in a second. Then here comes the ...
18
votes
3answers
4k views

Is Russian Roulette really the answer?

I have seen that in some implementations of Path Tracing, an approach called Russian Roulette is used to cull some of the paths and share their contribution among the other paths. I understand that ...
12
votes
2answers
1k views

How to build a decent lens/camera objective model for path tracing?

I have written a small path-tracer after learning and experimenting on smallpt. The only thing that I did not write (and understood) myself is how the initial rays are computed and fired from the ...
18
votes
2answers
552 views

How do correlated samples influence the behavior of a Monte Carlo renderer?

Most descriptions of Monte Carlo rendering methods, such as path tracing or bidirectional path tracing, assume that samples are generated independently; that is, a standard random number generator is ...
27
votes
2answers
8k views

Why does monte carlo ray tracing perform better than distributed ray tracing?

I've heard that the quality of a monte carlo ray tracer (based on path tracing algorithms) is much more realistic than a distributed (stochastic) engine. I try to understand why, but I'm just at the ...