4 ms·
Would someone mind talking this down a bit? It seems like we are pre-dithering the textures so that, when rendered, the noise is less visible. Is that right?
by debacle 6y ago
Would someone mind talking this down a bit? It seems like we are pre-dithering the textures so that, when rendered, the noise is less visible. Is that right?
- mmastrac 6y agoI can try: If you're familiar with Moire patterns and/or the Nyquist theorem, it's basically ensuring that we don't have too much information for the sampled channel (ie: the pixels that make up the line). The symptom of "overloading the channel" is shimmering and/or moire patterns -- the same sort of artifacts you'd get while trying to record high frequencies at a very low sampling rate.
- thatcherc 6y agoHere's what I think is going on - - In raytracing, you're evaluating some complicated equation at each pixel location. In this case, there are some cosine components that have a really high spatial frequency, so you get that aliased TV-static-looking effect in some parts of the image - One way to avoid that would be take many samples in a small region around each pixel location (at sub-pixel distances) which the author refers to as 'supersampling'. This would work except you'd need to raytrace a lot more points, which would slow down rendering - What you could do instead would be (and this is what the post is mostly about) would be to replace the cosine(x) function with a function that is "the average value of cosine(x) from x-w/2 to x+w/2" - that's the big integral in the post. This function would effectively just be cosine(x) when x is much greater than w, but would average out the high-frequency cosine components of the image when x ~=< w - The neat effect is that you can get the same smooth, alias-free image as you would with the expensive super-sampling operation just by using a modified version of cosine instead!
- 0-_-0 6y agoIn short: as the frequency of the cosine gets too high you gradually turn it off so you don't get aliasing from the high frequencies.
- pfortuny 6y agoYou are “blurring” the samples because you know your function is NOT a step-function, essentially. So instead of trying to be “super precise” (you cannot), you “blur” your Fourier transform. It is NOT that but my explanation is morally what you achieve.
- shoo 6y agoIt's a blur operation. Blurs are often defined as transforming input function by convolving it with some kernel function (often a Gaussian, see the Wikipedia page on Gaussian blur, similar idea holds for blurring 1d, 2d, 3d, nd signals). Convolution is an operation to combine two functions by integrating then together in a particular way. This defines output at each location that's a weighted average of what values the input function took at neighbouring points to each given location. Integration provides a way of computing averages. The weights used in weighted average are defined by the choice of kernel function. In this case the kernel function is an indicator function that is 1 in some window and 0 everywhere else, instead of a Gaussian function that'd be used for a Gaussian blur. Since the input image is defined as a continuous function that maps a coordinate to a colour (it isn't discretised into pixels) we can apply the blur operation to the input image function and figure out analytically for a new image function that directly evaluates the output smoothed colour value for any coordinate. Then we can just sample that function at each pixel. Blurring removes or damps high frequency components of input leaving lower frequency components, so it can be used to remove or reduce high frequency "noise".