Questions tagged [sampling]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
0 answers
101 views

How are point and pure directional lights sampled in an unbiased path tracer?

To perform importance sampling on a light source, a probability density function must be provided for the sampling distribution. For most light sources, a valid probability distribution can be found, ...
user avatar
0 votes
1 answer
73 views

Interpolating poisson disk samples in real time

If I have a regular sampling pattern there typically exist many reasonably fast ways to interpolate the results of the sampling procedure in between the sample locations. For example bilinear or ...
user avatar
  • 161
1 vote
1 answer
50 views

BTF Find Four Closest Sampling Directions

I am trying to use the techniques discussed in this paper to implement a BTF into PBRT. I am stuck on how to actually interpolate the weights of the four closest sampling directions. At the BTF, I ...
user avatar
  • 111
0 votes
1 answer
41 views

MSAA performance with forward shading

I have done some tests in OpenGL with multisampling, by specifying a multisample buffer as the default framebuffer. I used forward shading for rendering. From what I've observed the more primitives I ...
user avatar
3 votes
0 answers
39 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. ...
user avatar
1 vote
1 answer
86 views

Does film filter introduce bias in path tracing?

Does using box or gaussian filter introduce bias to the image when reconstructing the pixel? Bias does not seem to be talked in the Chapter 7.8 of PBRT
user avatar
2 votes
1 answer
34 views

Algorithm for proper drawing of cosine function

I am working with the cosine function with a very large input, like cos(a* t), where t varies between ...
user avatar
  • 123
1 vote
1 answer
263 views

How does the GPU know whether to magnify/minify?

Let me first state what I think I know and please correct me if I'm too inaccurate or plainly wrong. When you use a function like texture, you're requesting a texel value given a pair (u,v) of texture ...
user avatar
2 votes
1 answer
419 views

Importance sampling a cosine distribution

Let's take a look at this blog article - https://schuttejoe.github.io/post/ggximportancesamplingpart1/ and image presented as a result of implementing it: Inside above link, you can see description ...
user avatar
1 vote
1 answer
190 views

Path tracing - cannot converge diffuse sampling + oversaturation

I'm in process of creating progressive path tracer using DX12 + DXR. I managed to create working raytracing code + pathtracing code with multiple bounces but I'm experiencing problems stated below (...
user avatar
2 votes
1 answer
156 views

Path Integral Form with Path Tracing

The description is going to be long and detailed, thanks in advance for your patience! I am learning the path integral form of light transport equation(LTE) to be able to follow recent rendering ...
user avatar
2 votes
3 answers
500 views

How to Sample 3D Points Outside and Inside the Mesh Surface

I have a mesh of an object enclosed in unit volume cube and I would like to sample points inside and outside the mesh surface. What are the different ways of doing it? Is there any sample code ...
user avatar
  • 23
3 votes
1 answer
171 views

How do I make sure my cosine-weighted sampling works fine?

I'm working on a pathtracer and while it's working mostly fine, I'm getting different outputs with cosine-weighted sampling and uniform sampling : Uniform sampling is on the left, cosine-weighted is ...
user avatar
  • 31
1 vote
2 answers
124 views

What's more optimal - sampling one channel at a time or all channels at once?

I'm going through and optimizing some of my glsl code for a project, and have come across a scenario several times that I am not sure how best to optimize. In summary - Is it faster to sample a ...
user avatar
3 votes
1 answer
366 views

Analytical derivative of a 3D Simplex Noise field

I am using Simplex Noise to generate a 3D field. The specific implementation is FastNoise-SIMD. Assume I want to have a gradient (or derivative) for a sample at Sx, Sy, Sz in that field. Do I ...
user avatar
  • 260
0 votes
1 answer
224 views

Calculate BRDF and PDF when doing direct light sampling

I learned in PBRT that to sample direct lighting for a surface a integrator usually calculates the sample as $$ Sample = \frac{L_d(p,\omega_r) f(p,\omega_o,\omega_r)|cos\theta_i|}{p(\omega_r)} $$ ...
user avatar
  • 1
0 votes
0 answers
43 views

Birectional path tracing - connection of paths

I have a few questions about setting up a bidirectional path tracer described by Veach here. I have created both an eye path and a light path. Both are using BRDF for calculating how much light can ...
user avatar
1 vote
0 answers
48 views

How to handle negative reflection directions in raytracing?

I got a function that generates samples from a GGX visible normal distribution function. When I use it to calculate reflection directions obviously some of these intersect with the surface agin (...
user avatar
  • 11
2 votes
0 answers
49 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 ...
user avatar
  • 163
1 vote
0 answers
141 views

GPU Procedural placement - Creating evenly distributed sampling points

I am working on a procedural placement system on the GPU, inspired by the work done by Guerrilla Games in Horizon Zero Dawn: https://www.guerrilla-games.com/read/gpu-based-procedural-placement-in-...
user avatar
  • 11
1 vote
1 answer
51 views

Mapping sample to a disk

So I have been reading this wonderful book on ray tracing by Kevin Suffern, Ray tracing from Ground Up. I am reading this book after finishing Peter Shirley's first two book on ray tracing & ...
user avatar
1 vote
1 answer
280 views

Multiple samples per pixel and texture blurring

As far as I know path tracers (or super-sampling antialiasing) typically calculate the final color of a single pixel by averaging the result of all samples taken inside that pixel. This gives a nice ...
user avatar
  • 135
0 votes
1 answer
187 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 ...
user avatar
  • 3,502
0 votes
0 answers
24 views

Drawing non-uniform samples from uniform density

To calculate the cartesian coordinates for scattering rays over a hemisphere based on cosine-weighted importance sampling, one method can be to obtain the marginal and conditional PDF for the polar ...
user avatar
  • 189
2 votes
1 answer
308 views

computing derivatives of sampled data

I am trying to calculate the derivatives of a sampled data set by following an example in this book. The data is a set of 2d quads(green area in below) and their vertices(4 each). The data is in the ...
user avatar
  • 698
3 votes
2 answers
721 views

What does texture resolve mean?

In the context of render targets or textures, what does "resolve" mean? For example: To resolve a color texture. From my understanding, it seems to mean, "copy but process/convert at the same time", ...
user avatar
  • 133
1 vote
0 answers
379 views

What is the difference between post-/pre- sampling, aliasing, filtering and processing?

What is the difference between post-/pre- sampling, aliasing, filtering and processing? How do the terms post-/pre-aliasing, post-/pre-processing, post-/pre-sampling and post-/pre-filtering relate to ...
user avatar
4 votes
0 answers
519 views

Proper way of consuming stratified samples in path/ray tracing

I'm working on a (toy-level) path/ray-tracer, currently trying to implement (and understand) improved sampling strategies. The obvious next choice after uniform random sampling would be stratified/...
user avatar
2 votes
1 answer
547 views

Downscaling texture via mipmap [DirectX 11]

I am implementing a post-processing effect in my DirectX 11 pet renderer. The post-processing pass is implemented by rendering a full-screen quad covered with texture containing original rendered ...
user avatar
  • 1,377
5 votes
0 answers
426 views

Where do "fireflies" come from?

I'm using a renderer developed by other people, and I found there are fireflies. It is strange that in a completely diffuse scene, there are still fireflies presented. To my understanding, I think it ...
user avatar
  • 61
1 vote
0 answers
57 views

Anti aliasing thin features in textures

Assume I have a texture with a repeating line pattern. The lines are exactly 2 texels wide (really thin). Ans very spaced out (50 texels in between each line). I am now struggling with the ...
user avatar
  • 1,447
2 votes
1 answer
555 views

Naive Path tracer produces much darker images than Explicit light sampling

So I just thought of comparing the results from a Naive Path tracer and one using Next Event Estimation aka Explicit Direct Light Sampling. However the results from the Naive PT are very dark. Is ...
user avatar
4 votes
1 answer
416 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 ...
user avatar
  • 293
4 votes
0 answers
91 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 ...
user avatar
0 votes
1 answer
102 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; ...
user avatar
1 vote
1 answer
358 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 ...
user avatar
4 votes
1 answer
741 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 + \...
user avatar
3 votes
1 answer
245 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 ...
user avatar
0 votes
0 answers
1k 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 ...
user avatar
3 votes
2 answers
575 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) ...
user avatar
  • 7,331
7 votes
2 answers
3k 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 ...
user avatar
  • 7,331
1 vote
1 answer
943 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: $$...
user avatar
2 votes
1 answer
251 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 ...
user avatar
  • 123
1 vote
0 answers
372 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 ...
user avatar
  • 2,037
1 vote
0 answers
127 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 ...
user avatar
  • 551
1 vote
0 answers
68 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 ...
user avatar
4 votes
1 answer
687 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 ...
user avatar
7 votes
1 answer
159 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 ...
user avatar
  • 73
9 votes
1 answer
998 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 ...
user avatar
  • 7,331
3 votes
1 answer
358 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 ...
user avatar
  • 73