DOC PREVIEW
MIT 6 837 - Sampling and Monte-Carlo Integration

This preview shows page 1-2-3-4-24-25-26-50-51-52-53 out of 53 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 53 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 53 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 53 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 53 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 53 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 53 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 53 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 53 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 53 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 53 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 53 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 53 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Sampling and Monte-Carlo IntegrationSampling and Monte-Carlo IntegrationLast TimeQuiz solution: Homogeneous sumToday’s lectureIdeal sampling/reconstructionDifficulties with perfect samplingAt the end of the dayThe special case of edgesAnisotropy of the sampling gridSlide 11Philosophy about mathematicsQuestions?Slide 14Supersampling in graphicsUniform supersamplingSlide 17Multisampling vs. supersamplingSlide 19Slide 20Slide 21JitteringJittered supersamplingSlide 24Poisson disk sampling and blue noiseSlide 26RecapAdaptive supersamplingSlide 29Slide 30Problem with non-uniform distributionSlide 32Slide 33Slide 34Slide 35Shift of perspectiveWhy integration?Monte-Carlo computation of pSlide 39Why not use Simpson integration?Dumbest Monte-Carlo integrationSlide 42Slide 43Review of probability (discrete)Ex: fair diceVariance & standard deviationSlide 47Continuous random variablesPropertiesSlide 50ExampleExpected valueVarianceMIT EECS 6.837Sampling and Monte-Carlo IntegrationMIT EECS 6.837Sampling and Monte-Carlo IntegrationMIT EECS 6.837Last Time•Pixels are samples•Sampling theorem•Convolution & multiplication•Aliasing: spectrum replication•Ideal filter–And its problems•Reconstruction•Texture prefiltering, mipmapsMIT EECS 6.837Quiz solution: Homogeneous sum•(x1, y1, z1, 1) + (x2, y2, z2, 1) = (x1+x2, y1+y2, z1+z2, 2) ¼ ((x1+x2)/2, (y1+y2)/2, (z1+z2)/2)•This is the average of the two points•General case: consider the homogeneous version of (x1, y1, z1) and (x2, y2, z2) with w coordinates w1 and w2•(x1 w1, y1 w1, z1 w1, w1) + (x2 w2, y2 w2, z2 w2, w2)= (x1 w1+x2w2, y1 w1+y2w2, z1 w1+z2w2, w1+w2)¼ ((x1 w1+x2w2 )/(w1+w2) ,(y1 w1+y2w2 )/(w1+w2),(z1 w1+z2w2 )/(w1+w2))•This is the weighted average of the two geometric pointsMIT EECS 6.837Today’s lecture•Antialiasing in graphics•Sampling patterns•Monte-Carlo Integration•Probabilities and variance•Analysis of Monte-Carlo IntegrationMIT EECS 6.837Ideal sampling/reconstruction•Pre-filter with a perfect low-pass filter–Box in frequency–Sinc in time•Sample at Nyquist limit–Twice the frequency cutoff•Reconstruct with perfect filter–Box in frequency, sinc in time•And everything is great!MIT EECS 6.837Difficulties with perfect sampling•Hard to prefilter•Perfect filter has infinite support–Fourier analysis assumes infinite signal and complete knowledge–Not enough focus on local effects•And negative lobes–Emphasizes the two problems above–Negative light is bad–Ringing artifacts if prefiltering or supports are not perfectMIT EECS 6.837At the end of the day•Fourier analysis is great to understand aliasing•But practical problems kick in•As a result there is no perfect solution•Compromises between–Finite support–Avoid negative lobes–Avoid high-frequency leakage–Avoid low-frequency attenuation•Everyone has their favorite cookbook recipe–Gaussian, tent, Mitchell bicubicMIT EECS 6.837The special case of edges•An edge is poorly captured by Fourier analysis–It is a local feature–It combines all frequencies (sinc)•Practical issues with edge aliasing lie more in the jaggies (tilted lines) than in actual spectrum replicationMIT EECS 6.837Anisotropy of the sampling grid•More vertical and horizontal bandwidth–E.g. less bandwidth in diagonal•A hexagonal grid would be better –Max anisotropy –But less practicalMIT EECS 6.837Anisotropy of the sampling grid•More vertical and horizontal bandwidth•A hexagonal grid would be better –But less practical•Practical effect: vertical and horizontal direction show when doing bicubic upsamplingLow-res image Bicubic upsamplingMIT EECS 6.837Philosophy about mathematics•Mathematics are great tools to model (i.e. describe) your problems•They afford incredible power, formalism, generalization•However it is equally important to understand the practical problem and how much the mathematical model fitsMIT EECS 6.837Questions?MIT EECS 6.837Today’s lecture•Antialiasing in graphics•Sampling patterns•Monte-Carlo Integration•Probabilities and variance•Analysis of Monte-Carlo IntegrationMIT EECS 6.837Supersampling in graphics•Pre-filtering is hard–Requires analytical visibility–Then difficult to integrate analytically with filter•Possible for lines, or if visibility is ignored•usually, fall back to supersamplingMIT EECS 6.837Uniform supersampling•Compute image at resolution k*width, k*height•Downsample using low-pass filter (e.g. Gaussian, sinc, bicubic)MIT EECS 6.837Uniform supersampling•Advantage: –The first (super)sampling captures more high frequencies that are not aliased–Downsampling can use a good filter•Issues–Frequencies above the (super)sampling limit are still aliased•Works well for edges, since spectrum replication is less an issue•Not as well for repetitive textures–But mipmapping can helpMIT EECS 6.837Multisampling vs. supersampling•Observation:–Edge aliasing mostly comes from visibility/rasterization issues–Texture aliasing can be prevented using prefiltering•Multisampling idea:–Sample rasterization/visibility at a higher rate than shading/texture•In practice, same as supersampling, except that all the subpixel get the same color if visibleMIT EECS 6.837Multisampling vs. supersamplingFor each triangleFor each pixelCompute pixelcolor //only once for all subpixelsFor each subpixelIf (all edge equations positive && zbuffer [subpixel] > currentz )Then Framebuffer[subpixel]=pixelcolor•The subpixels of a pixel get different colors only at edges of triangles or at occlusion boundariesSubpixels in supersamplingSubpixels in multisamplingExample:2 Gouraud-shaded trianglesMIT EECS 6.837Questions?MIT EECS 6.837Uniform supersampling•Problem: supersampling only pushes the problem further: The signal is still not bandlimited•Aliasing happensMIT EECS 6.837Jittering•Uniform sample + random perturbation•Sampling is now non-uniform•Signal processing gets more complex•In practice, adds noise to image•But noise is better than aliasing Moiré patternsMIT EECS 6.837Jittered supersampling•Regular, Jittered SupersamplingMIT EECS 6.837Jittering•Displaced by a vector a fraction of the size of the subpixel distance•Low-frequency Moire (aliasing) pattern replaced by noise•Extremely effective•Patented by Pixar!•When jittering amount is 1, equivalent to stratified sampling (cf. later)MIT EECS 6.837Poisson disk sampling and blue noise•Essentially


View Full Document

MIT 6 837 - Sampling and Monte-Carlo Integration

Documents in this Course
Shadows

Shadows

64 pages

Animation

Animation

37 pages

Radiosity

Radiosity

25 pages

Color

Color

86 pages

InterArch

InterArch

14 pages

Color

Color

15 pages

Animation

Animation

61 pages

Luxo Jr

Luxo Jr

14 pages

Animation

Animation

52 pages

Radiosity

Radiosity

37 pages

Load more
Download Sampling and Monte-Carlo Integration
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Sampling and Monte-Carlo Integration and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Sampling and Monte-Carlo Integration 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?