Questions tagged [monte-carlo]

Algorithms generating large sets of random numbers to simulate real-world, usually optical systems.

Filter by
Sorted by
Tagged with
0 votes
0 answers
20 views

Confusion about different sampling strategies in Monte Carlo Path Tracing

I am studying Monte Carlo Path Tracing from different sources. However, I have some confusion about the sampling part and dare to post here for experts' ...
bim's user avatar
  • 125
0 votes
0 answers
28 views

Questions about equi-angular sampling

Equiangular sampling is a sampling method for point (sphere) emitter in scattering medium. While it claims to be very efficient when dealing with point (sphere) emitter in scattering medium (see this ...
Enigmatisms's user avatar
1 vote
1 answer
54 views

Confusion about the bias during Monte Carlo integration

I recently stumbled into this question: Say, for example, we are doing mean-free-path sampling (distance sampling) in a scattering medium and to keep it simple, let's only consider the single ...
Enigmatisms's user avatar
1 vote
1 answer
108 views

Can anyone summarize in simple terms, how PSSMLT/MLT algorithms work?

I understand backwards path tracing and bidirectional path tracing (BDPT). However I'm failing to understand how Metrpolis Light Transport methods are even remotely feasible to run. My understanding ...
Chris Gnam's user avatar
2 votes
1 answer
189 views

Transforming between solid angle and spherical angle distribution in PBRT

In the Monte Carlo chapter of PBRT, in the section Transforming Between Distributions, they say "The density with respect to $\theta$ and $\phi$ can therefore be derived", but they start ...
James B's user avatar
  • 67
0 votes
1 answer
96 views

MSE & Variance of Monte Carlo Estimator

I am trying to prove the equality of $$\rm MSE(\langle I\rangle)=Var(\langle I \rangle)+Bias(\langle I \rangle)^2$$ but obviously I got something wrong as they don't equal in my calculation: So here ...
ali's user avatar
  • 730
1 vote
0 answers
143 views

Applying Monte-Carlo methods in path tracing

I've noticed that I consistently get worse results in path-tracing when I try to do monte-carlo correctly compared to when I don't, and I think this might be because of a fundamental misunderstanding. ...
Kate's user avatar
  • 11
2 votes
1 answer
175 views

importance sampling rectangular light

I have been struggling very much to wrap my head around this part of Peter Shirley's book. There is no explanation what the angle Alpha represents and to make things worse in the code the cos(Alpha) ...
Sina Dasht's user avatar
3 votes
1 answer
85 views

Relationship between probability densities

I'm reading section 8.2 of Eric Veach's thesis, in regards to the relationship between probability densities per solid angle vs projected solid angle: $$\frac{dP}{d\sigma^\perp}(w_o) = \frac{dP}{d\...
James B's user avatar
  • 67
1 vote
1 answer
278 views

PDF for sampling emissive meshes for NEE/MIS

I'm writing a Monte Carlo path tracer, and I'm trying to allow any mesh to be an emitter, but I'm not entirely sure about the probabilities to use when I sample them. Right now, my algorithm for light ...
uhwo's user avatar
  • 55
1 vote
1 answer
398 views

Integrating BRDF using Importance Sampling

I read some articles about BRDF integration with and without importance sampling and I don't understand one thing in equations. If we integrate a BRDF over hemisphere with uniform sample direction ...
Emil Kabirov's user avatar
3 votes
0 answers
41 views

Is this way of transforming QMC samples into barycentric tri coordinates agnostic to mesh-topology?

While I'll try my best to give all relevant info in all possible brevity below, please refer to the spoiler and link at the bottom of the post for the (more lengthy) original description if needed. ...
Herbert Jensch's user avatar
1 vote
1 answer
149 views

Energy redistribution sample re-integration

I'm implementing ERPT-style energy redistribution of primary samples within a pathtracer. Specifically, to improve the sampling of defocused areas. The core algorithm does two things: If sample ...
zeno's user avatar
  • 138
2 votes
0 answers
85 views

Implementing monte carlo path traced refractions problem

I am writing a forward monte carlo path tracer with the added feature of specular refractions for transparent materials, I have managed to come this far but something is not quite right and I am ...
Marcus's user avatar
  • 21
3 votes
0 answers
210 views

Understanding BRDF sampling

I'm trying to understand BRDF importance sampling following the exemples of the lambertian/diffuse model and the reciprocal Phong model. I would like to be able to extend the principle to other ...
kipgon's user avatar
  • 51
0 votes
0 answers
178 views

Visualize the variance of an image

Let $h_j$ denote the image reconstruction filter of pixel $j$. I'm estimating the color value $$I_j=\int h_jf\:{\rm d}\mu$$ of the $j$th pixel (see [Veach, Section 8.2]) by an asymptotically ...
0xbadf00d's user avatar
  • 193
1 vote
1 answer
124 views

BDPT - How to handle deterministic ray PDF?

I'm trying to implement a simple BDPT without MIS as described in Lafortune's paper. I've used the weighting scheme defined in the paper in which they suggest that the weight be based on the surface ...
gallickgunner's user avatar
0 votes
0 answers
94 views

Relation between camera sensor responsivity and image reconstruction filter associated with a pixel

Let $W_{\text e}$ denote the camera sensor responsivity (i.e. importance) and $h_j$ and $W_{\text e}^{(j)}$ denote the image reconstruction filter and sensor response associated with the $j$th pixel, ...
0xbadf00d's user avatar
  • 193
2 votes
2 answers
244 views

Properties of the image reconstruction filter in rendering

Let $f$ denote the measurement contribution function for paths of length $k\in\mathbb N$, i.e. $$f(x)=g(x_0\leftrightarrow x_1)W_{\text e}(x_1\to x_0)t_k(x_0,\ldots,x_k)L_{\text e}(x_k\to x_{k-1}),$$ ...
0xbadf00d's user avatar
  • 193
2 votes
0 answers
163 views

Scaling of the final image in Metropolis Light Transport

I don't understand why the PBR implementation of Metorpolis Light Transport scales the final image by b / mutationsPerPixel. The authors write: Each Metropolis ...
0xbadf00d's user avatar
  • 193
2 votes
0 answers
89 views

Quantify the variance of pixel measurements

Say $E_j$ is an estimator of the value $$I_j=\int f_j\:{\rm d}\lambda$$ of the $j$th pixel given by the path space integral of the corresponding measurement contribution function $f_j$. $f_j$ is of ...
0xbadf00d's user avatar
  • 193
0 votes
0 answers
52 views

Distribution of the first vertex on a camera subpath in bidirectional path tracing

Suppose we are sampling camera rays of a perspective camera with a finite aperture. The PBRT implementation of the sampling scheme looks like this: ...
0xbadf00d's user avatar
  • 193
2 votes
0 answers
54 views

Chart swaps and path inversion in bidirectional path tracing

I've got a hard time to understand how we would implement the following in practice. I'd be great if someone could explain the details for the example below. Assume we're generating a path ${\rm x}=(\...
0xbadf00d's user avatar
  • 193
1 vote
1 answer
78 views

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

In the Multiplexed Metropolis Light Transport implementation of the book Physically Based Rendering, the proposal samples are generated by the Primary Sample Space Sampler ...
0xbadf00d's user avatar
  • 193
0 votes
1 answer
264 views

How to calculate the PDF of a multi-lobe BSDF

In PBRT, a BSDF is represented as an array of BxDF lobes. Each lobe sets a bitflag representing what kind of lobe it is. (Specular, Diffuse, Reflection, Transmission, etc.) I'm investigating how PBRT ...
RichieSams's user avatar
  • 3,732
1 vote
0 answers
29 views

Report standard deviation in Rendering results

I noticed that a common metrics for image quality assessment (Monte Carlo path tracing) is MSE between the generated image and a reference one. My question is: why isn't the standard deviation ever ...
maurock's user avatar
  • 189
0 votes
0 answers
203 views

Multiple Importance Sampling in Bidirectional Path Tracing

I'm trying to understand the computation of the path density described in the book Physically Based Rendering. They assume that a path $$x=(x_0,\ldots,x_{n-1})=(q_0,\ldots,q_{s-1},p_{t-1},\ldots,p_0)$$...
0xbadf00d's user avatar
  • 193
3 votes
1 answer
421 views

Rendering equation in terms of paths rather than directions

Path tracing seems to perform Monte Carlo integration where the space being integrated over is the space of paths (e.g. chains of rays) but the rendering equation is stated in terms of outgoing rays. ...
Jake's user avatar
  • 205
1 vote
1 answer
583 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 ...
maurock's user avatar
  • 189
5 votes
2 answers
3k 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 ...
gallickgunner's user avatar
3 votes
1 answer
192 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, ...
user5280911's user avatar
2 votes
1 answer
185 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, ...
0xbadf00d's user avatar
  • 193
4 votes
1 answer
464 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 ...
0xbadf00d's user avatar
  • 193
1 vote
1 answer
493 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 ...
gallickgunner's user avatar
3 votes
1 answer
550 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 ...
0xbadf00d's user avatar
  • 193
1 vote
0 answers
143 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 ...
Marc HPunkt's user avatar
4 votes
2 answers
174 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 ...
gallickgunner's user avatar
1 vote
1 answer
973 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 ...
Row Rebel's user avatar
1 vote
1 answer
485 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 ...
Paul Ferris's user avatar
3 votes
1 answer
169 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 ...
Paul Ferris's user avatar
1 vote
0 answers
77 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 ...
demonFudgePies's user avatar
2 votes
0 answers
597 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?
chaosink's user avatar
  • 591
6 votes
1 answer
134 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(...
shashack's user avatar
  • 523
5 votes
1 answer
104 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$ $\...
shashack's user avatar
  • 523
3 votes
0 answers
554 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 ...
Aloof's user avatar
  • 31
2 votes
1 answer
222 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, ...
Steve's user avatar
  • 73
7 votes
1 answer
1k 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 ...
Henry Bergin's user avatar
2 votes
0 answers
160 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 ...
ali's user avatar
  • 730
3 votes
2 answers
1k 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 ...
Steven's user avatar
  • 315
13 votes
1 answer
7k 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: ...
Steven's user avatar
  • 315