Stack Exchange Network

Stack Exchange network consists of 174 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 [sampling]

The tag has no usage guidance.

3
votes
1answer
115 views

High variance in path tracing specular objects

I'm testing my path tracer for specular surfaces. Images rendered with my own code have very noisy appearance, and I think they look like variance. I use point light and the bunny is of mirror ...
4
votes
0answers
29 views

Does MRG32k3a compare well with PCG and Xorshift256*?

I've been using standard 32-bit Xorshift in my GPU path-tracer for a while, following Nathan Reed's approach with hashed seeds and decorrelated state. I (finally) discovered today that Xorshift is ...
0
votes
1answer
53 views

Choosing corner values for trilinear interpolation

I'm caching distances for SDF functions in volume textures for faster rendering, and I'd like to use trilinear interpolation for smoother edges. I know that I'll need distance values at each corner; ...
0
votes
1answer
85 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 ...
4
votes
1answer
167 views

PDF when sampling from Rectangular Area Lights

So I was reading up on how to sample Rectangular Area lights, and the procedure is pretty straightforward. That is, I can get random points using the equation. $ p = X_o + \epsilon_1V_1 + \...
1
vote
1answer
85 views

Path Tracer - sampling dimensions confusion

Suppose my path tracer is shooting 64 rays per pixel (in an 8x8 grid). The confusion is, when accounting for Global illumination, should I shoot additional X number ...
1
vote
0answers
325 views

YUV (NV12) Chroma subsampling while converting from RGB image

I convert RGB input to YUV 420 semi-planar output using compute shader.Luma plane is straightforward as it maps 1:1 with RGB dimensions. As we know, NV12 packs Cb and Cr into one plane, which means ...
4
votes
2answers
319 views

Making low discrepancy sequence noise textures, not LDS sample positions

When making sampling locations, there is a lot of information out there on how to do white noise sampling, uniform sampling, uniform+jittered sampling, low discrepancy sequence sampling (eg halton) ...
5
votes
2answers
730 views

Mitchell's Best Candidate Algorithm

I'm trying to generate an image where black dots are arranged in a blue noise distribution on a white background. I know that there are other ways to do this, one of the best being "Fast Capacity ...
1
vote
1answer
305 views

Bilinear Interpolation

I am trying to implement bilinear interpolation as described in the paper Spatial Tranformer Networks by Jaderberg et. al (see link to paper). They describe bilinear interpolation in Equation 5 as: $$...
2
votes
1answer
106 views

Upscaling 720p to 1080p vs upscaling 768p to 1080p

Suppose I can run some graphics in 1366x768 equally well as 1280x720, and I have a 1920x1080 monitor. There are more pixels in 1366x768 than in 1280x720. However, in 1280x720, a 2x2 grid of pixels ...
1
vote
0answers
126 views

Nearest depth upsampling

Nvidia in this article presented a way to upsample low res buffer to full res buffer called Nearest Depth Upsampling. This works by comparing four depth values from downsampled low res depth buffer ...
2
votes
0answers
85 views

An example of Combining Stratified Sampling and Importance Sampling in AGI

Being confused about the example of Combining Stratified Sampling and Importance Sampling in Advanced Global Illumination (P72,P73). I know how to do importance sampling and stratified sampling. But ...
1
vote
0answers
57 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 ...
5
votes
1answer
245 views

About the use of Russian Roulette in Smallpt

I was taking a look at Smallpt (http://www.kevinbeason.com/smallpt), more specifically at the Russian Roulette part. Actually, RR is used in two places along the code: first, to determine ray ...
7
votes
1answer
129 views

2D sampling with multidimensional transformations

I'm currently learning mathemetical concepts of distribution and the way to use them in a ray tracer with the book "Physically Based Rendering". Let's start by uniformly sampling an hemisphere: As ...
8
votes
1answer
375 views

Link between blue noise sampling and blue noise textures?

You can have blue noise sampling like these poisson disc samples: And you can have a blue noise texture like this: I get that in the first image, there is one input (the index of the sample) and two ...
4
votes
1answer
150 views

Visualize the output of a Trowbridge-Reitz Half Vector Sampling Function

I am attempting to visualize the raw output from PBRT's half-vector sampling function, based on the trowbridge-reitz distribution. I'm isolating only the distribution and the associated functions ...
4
votes
1answer
118 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, ...
5
votes
1answer
305 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 ...
1
vote
1answer
98 views

Acceleration techniques for CPU soft-shadow calculation in light mapper

My light mapper can generate soft shadows just fine - for each texel I cast a ray to the light, offset by some distribution of the 'area' of the light on disc. The problem is that I am casting many ...
2
votes
0answers
125 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 ...
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: ...
5
votes
2answers
110 views

Downscaling by skipping rows and columns – any example images?

I'm about to implement downscaling on a microcontroller. Source resolution is e.g. 720x576 (the 576i PAL resolution, other one possible: 480i, NTSC resolution), destination is 32x16. The goal is to ...
12
votes
2answers
480 views

What is the fundamental reasoning for anti aliasing using multiple random samples within a pixel?

In graphics, it's common to take multiple samples within the bounds of a pixel and combine them together (most commonly just doing an average) for a final sample pixel color. This has the effect of ...
8
votes
2answers
443 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 ...
6
votes
1answer
136 views

How to sample 3D points to visualize a B-spline surface?

Given that I have implemented a function called calc_bspline_surf() in C, and that function has the following declaration: ...
1
vote
1answer
57 views

Reconstruction filter of LCD monitor

I'm very confused about sampling and reconstruction of images. I read that in the framebuffer there is a sampled representation of an image, for visualization the sampled representation is converted ...
3
votes
0answers
435 views

How to properly implement Phong material and importance sample it in a path tracer?

I'm recently implementing Phong materials in my path tracer. My implementation of a randomly sampled Phong material works and looks fine. But it doesn't work well if the shininess(aka power) is too ...
12
votes
3answers
1k views

Importance Sampling of Environment Maps

What is the best currently known and ideally also production-verified approach for sampling environment maps (EM) in a MIS-based uni-directional path tracer and similar types of renderers? I would ...
1
vote
1answer
116 views

How can I resize a rendered ray traced image?

Say I have rendered an HDR ray traced image with dimensions 1920x1080 (width x height) pixels and I want to instead represent it with dimensions 960x540. Assume as well that the image has not yet been ...
5
votes
2answers
525 views

Why map Hammersley 2D set's (u,v) to sphere's (θ, φ) coordinates (and not to (φ, θ) )?

As explained in Holger Dammetz page Hammersley Points on the Hemisphere, the 2D coordinates (u,v) are usually mapped to the spherical coordinates (θ, φ). As a result, the coordinate "uniformly ...
5
votes
1answer
245 views

Jitter texture generation

I am currently reading the awesome paper by Jorge Jimenez about Character rendering : Next Generation Character Rendering In the part about multi-sampled transmittance he uses some Poisson offsets ...
11
votes
1answer
726 views

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

I can't understand math equations. I'm a graphic designer. What is "importance sampling"? What is "multiple importance sampling"? Could you explain easily, using illustrations and no math equations? ...
5
votes
1answer
345 views

Speeding up convergence: am I reinventing the wheel?

I'm trying to learn about raytracing by implementing things in Python 3. I know this is always going to be slower than something like C++, and I know the speed could also be improved by using GPU ...
10
votes
3answers
332 views

What is the optimal radius of gaussian distribution for determining pixel colour?

Using a gaussian distribution of points on an image plane to calculate a pixel value, what radius/standard deviation will give the most information in the final image? Too large a radius gives a ...