Questions tagged [sampling]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer
47 views

Measure (or Jacobian) conversion for direction sampling

If in the path tracing use case, I have some sampling strategies to sample a scattering direction in a 2D space ($\theta, \phi$). Of course, I need to convert it to a 3D direction vector (with length ...
Enigmatisms's user avatar
1 vote
0 answers
18 views

Covering texture surface with ellipses

I am looking for an algorithm (also ideas on possible directions are appreciated) which is able to compute the distribution of ellipses on a 2D surface in order to reach a good degree of covering. I ...
StefanoScolari's user avatar
0 votes
1 answer
106 views

Evaluating the Rendering Equation by hand (simple case)

I'm trying to make intuitive sense of the rendering equation and so I'm trying to work out a trivial example by hand, though ultimately I'm just trying to understand how monte carlo importance ...
Chris Gnam's user avatar
0 votes
1 answer
112 views

How does a path tracer capture light falloff if it deals exclusively with radiance?

My understanding is that path tracers deal with radiance because radiance is constant along a ray. You simply go through and evaluate the light transport equation: $$ L_o(p, \omega_o) = L_e(p,\...
Chris Gnam's user avatar
0 votes
0 answers
36 views

How can I understand the logic of Fast Point Feature Histograms (FPFH) descriptor?

I have been using FPFH features quite a lot in global registration and key-point extraction a lot, I also looked pcl page that tries to explain what it is, but fails to give detail to reader in my ...
Lady Be Good's user avatar
1 vote
1 answer
109 views

Conditionally sample from texture in shader

I'm building a little 2D graphics library in Rust/WGPU as a means to learn graphics programming. I want to draw an outline around a shape and specify the outline's color. All of my shapes have a ...
junglie85's user avatar
  • 125
1 vote
0 answers
52 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
2 votes
1 answer
86 views

White spots when rendering diffuse material with environment light

I am trying to implement a simple shader. A round ball object is rendered with uniform albedo and I noticed some strange white spots on the outputs. I perform importance sampling with 512 light ...
Ivan's user avatar
  • 121
1 vote
1 answer
58 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
124 views

What is the "kernel" in learnopengl SSAO tutorial?

I am currently reading the SSAO tutorial on learnopengl. In it, there is a "kernel" that has the dimension of 64 and contains ...
Raildex's user avatar
  • 173
2 votes
0 answers
46 views

How to properly use scattering coefficient during volumetric path tracing?

The increased radiance during sampling is known by: $$ L_s = L_e + \sigma_s \int p(w, w')f_p(w, w')dw' $$ The latter part, which accounts for in-scattering radiance bears a $\sigma_s$ in it. The ...
Enigmatisms's user avatar
0 votes
0 answers
122 views

One-sample model Multiple Importance Sampling with balance heuristic

Recently I feel a bit confused about one-sample model MIS. One sample model MIS can be found here in Veach 1997. 9.2.4 The one-sample model, and this one-sample model is widely used in the opensource ...
Enigmatisms's user avatar
1 vote
1 answer
74 views

Question regarding texture mapping sampling

I am new to computer graphics and have taken up a course in my university on computer graphics. Need help regarding a question as I could not find any relevant resource on the internet so hoping the ...
Dexter0411's user avatar
0 votes
0 answers
44 views

Does sampling GGX VNDF take into account the cosine incidene of outgoing ray?

Could sampling GGX VNDF sampling, based on: "Sampling Visible GGX Normals with Spherical Caps" and "Sampling the GGX Distribution of Visible Normals" produce a normal that (based ...
ali's user avatar
  • 740
0 votes
0 answers
20 views

How does denoising factor into most render engines + practical question

I'm a student working on an experimental animation. The animation has been selected to be screened at a festival, but they would like a resolution that is beyond what my single graphics card can ...
TWheeler's user avatar
1 vote
0 answers
27 views

PBRT: requests sample dimensions in the same order

PBRT 7.2.2 illustrates an example on requests sample dimensions in the same order: ...
Rahn's user avatar
  • 171
1 vote
0 answers
57 views

Is there a name for the values of a material at a point?

As I understand it, the usual concept of a “material” in computer graphics, particularly 3D modeling, is a set of parameters (for example, color, specular reflectivity, IOR, light emission, etc.), ...
Kevin Reid's user avatar
  • 1,036
1 vote
0 answers
153 views

MIS path tracing got darker image than brute force path tracing

I'm trying to implement the multiple importance sampling path tracing, the MIS path tracing uses the MIS to combine the direct light sampling and brdf sampling to evaluate the direct lighting. The ...
yys_c's user avatar
  • 11
0 votes
1 answer
224 views

How is mipmap level used mathemetically in image sampling?

I am trying to simulate the behavior of "texelFetch()" and so far I've understood the following: If "gvec4 texelFetch(gsampler3D sampler, ivec3 P, int lod)" is given then : result =...
BusyCoder's user avatar
1 vote
0 answers
91 views

Sampling Quad Shape Light Using Spherical Rectangles in Local Space

The paper "An Area-Preserving Parametrization for Spherical Rectangles" describes an efficient approach for sampling solid angles for rectangle light sources. I am wondering if The light ...
ali's user avatar
  • 740
0 votes
0 answers
166 views

Derivation of Sampling 2d Tent Distribution

I am trying to do the derivation of transforming uniformly distributed 2D points on the unit square into the 2D "tent" distribution below. i.e the standard method of getting the cdf and ...
ali's user avatar
  • 740
2 votes
0 answers
297 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, ...
SupaKoopaTroopa64's user avatar
1 vote
1 answer
154 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 ...
TravisG's user avatar
  • 171
2 votes
1 answer
74 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 ...
Dave's user avatar
  • 121
0 votes
1 answer
53 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 ...
Lenny White's user avatar
3 votes
0 answers
42 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
138 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
Toothery's user avatar
2 votes
1 answer
45 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 ...
Sean's user avatar
  • 123
1 vote
1 answer
530 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 ...
Francis Moy's user avatar
2 votes
1 answer
1k 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 ...
DirectX_Programmer's user avatar
1 vote
1 answer
330 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 (...
DirectX_Programmer's user avatar
2 votes
1 answer
286 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 ...
TH3CHARLie's user avatar
2 votes
3 answers
1k 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 ...
akes's user avatar
  • 23
4 votes
1 answer
419 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 ...
Octave's user avatar
  • 41
1 vote
2 answers
206 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 ...
Lucas Morgan's user avatar
4 votes
1 answer
857 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 ...
Bram's user avatar
  • 270
1 vote
1 answer
441 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)} $$ ...
swfly's user avatar
  • 11
0 votes
0 answers
56 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 ...
Vít Gardoň's user avatar
1 vote
0 answers
63 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 (...
noName's user avatar
  • 11
2 votes
0 answers
97 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
  • 203
1 vote
0 answers
196 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-...
Philipp's user avatar
  • 11
1 vote
1 answer
67 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 & ...
TheOrestes's user avatar
1 vote
1 answer
373 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 ...
yggdrasil's user avatar
  • 145
0 votes
1 answer
278 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,772
2 votes
1 answer
426 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 ...
ali's user avatar
  • 740
4 votes
2 answers
1k 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", ...
Todd's user avatar
  • 143
1 vote
0 answers
490 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 ...
PatrickSteiner's user avatar
4 votes
0 answers
703 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/...
flipflop's user avatar
2 votes
1 answer
881 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 ...
ivokabel's user avatar
  • 1,454
5 votes
0 answers
515 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 ...
AccM's user avatar
  • 61