Presentation is loading. Please wait.

Presentation is loading. Please wait.

01/28/05© 2005 University of Wisconsin Last Time Improving Monte Carlo Efficiency.

Similar presentations


Presentation on theme: "01/28/05© 2005 University of Wisconsin Last Time Improving Monte Carlo Efficiency."— Presentation transcript:

1 01/28/05© 2005 University of Wisconsin Last Time Improving Monte Carlo Efficiency

2 01/28/05© 2005 University of Wisconsin Today Improving Efficiency with Monte Carlo Integration

3 01/28/05© 2005 University of Wisconsin Cameras The camera’s task is to take a pixel and compute a ray out into the scene –Camera is given an image point, a lens sample point, and a time –Output is a ray in world space, with normalized direction There are many types of camera –Orthographic –Perspective –Spherical –Define your own …

4 01/28/05© 2005 University of Wisconsin Depth of Field Details on constructing rays are in PBR Ch 6 All cameras in PBRT take parameters for depth of field –A Lens radius parameter –A focal distance parameter When asked for a ray, the camera gets sample values to use to compute a point on the lens

5 01/28/05© 2005 University of Wisconsin Realistic Lens System Aperture: Size controls how many world rays project to pixel

6 01/28/05© 2005 University of Wisconsin Simplified Lens Model (1) Image PtNear Clip PlaneFocal PlaneLens Plane All rays through a single point on the focal plane land at the same pixel – things at focal plane are in focus –The aperture controls how big the solid angle is that gets thorugh Aperture size

7 01/28/05© 2005 University of Wisconsin Simplified Lens Model (2) Rays through a point off the focal plane land at multiple pixel locations – circle of confusion Or, a single pixel sees multiple points at a given depth Image PtNear Clip PlaneFocal PlaneLens Plane Aperture size

8 01/28/05© 2005 University of Wisconsin Adjusting Rays for Depth of Field The lens radius is the size of the little circle on the lens –NOT aperture size – includes aperture and lens position Compute a sample within this circle –Circle is centered at same (x,y) as image point –It will be the “start” of our adjusted ray

9 01/28/05© 2005 University of Wisconsin Input Image PtNear Clip PlaneFocal PlaneLens Plane Start with ray that has origin at near clip plane and passes through the “focal point” –Regardless of where they hit the lens, all rays should hit focal plane at same location as this ray

10 01/28/05© 2005 University of Wisconsin Adjusting Ray (2) Compute hit point with focal plane Regardless of where we hit the lens, we should hit this same point Image PtNear Clip PlaneFocal PlaneLens Plane Aperture size

11 01/28/05© 2005 University of Wisconsin Adjusting Ray (3) New ray uses lens point as origin, and passes through focal plane point PBR is actually a little fuzzy on exactly where ray starts –Only makes sense if lens plane is same as near clip plane Image PtNear Clip PlaneFocal PlaneLens Plane Aperture size

12 01/28/05© 2005 University of Wisconsin Depth of Field Effect

13 01/28/05© 2005 University of Wisconsin Realistic Cameras Kolb et al. describe a more realistic camera model –Craig Kolb, Don Mitchell and Pat Hanrahan, “A realistic camera model for computer graphics”, SIGGRAPH '95, pp 317-324 –Model all parts of lens system, including sizes and shapes of all sub- parts, distances between surfaces, index of refraction, etc

14 01/28/05© 2005 University of Wisconsin Using Kolb’s Model Sample in solid angle out of pixel Trace ray through lens system –Fast – know sequence of intersections already Also important to know the “exit pupil”, the range of solid angle that passes through the lens

15 01/28/05© 2005 University of Wisconsin Thick Lens Approximation WorldCamera Thin Lens WorldCamera Thick Lens Can be done with 4x4 transformation

16 01/28/05© 2005 University of Wisconsin Effect of Lens Incorrect field of view due to standard model is apparent Not in these images: –Distortion around the edge of the image: “coma”, “pincushion distortion”, “barrel” –“Vignetting”: darkening around edge due to rays from edge of image hitting obstacles inside the lens AccurateThick approxStandard graphics

17 01/28/05© 2005 University of Wisconsin Sampling The Lens (PBR Sect 14.5.2) The camera is passed two canonical random variables for the lens sample These must be converted into samples on a disk First method:

18 01/28/05© 2005 University of Wisconsin But … Regions on the right all have equal area – which is requirement for uniform distribution But why is it still a problem?

19 01/28/05© 2005 University of Wisconsin Shirley’s method Regions are more similar in shape

20 01/28/05© 2005 University of Wisconsin Image Sampling and Reconstruction (PBR Chap 7) No time for an review of this topic –See CS559 notes We have several samples of the image at points scattered over the image plane –They are not uniformly arranged, which means most reconstruction theory, particularly frequency domain methods, are useless The problem is to combine them to determine the pixel’s final color –We want to do this as each sample comes in, because we may have many many more samples than pixels

21 01/28/05© 2005 University of Wisconsin Filtering We will use weighted interpolation to reconstruct: f is the filter function Filter has a width and height – area of support Sum is over samples falling inside support We can compute this as each sample comes in – is sample’s contribution to pixel –Same sample may contribute to many pixels

22 01/28/05© 2005 University of Wisconsin Filtering and Sampling Filters and samples can interact in strange ways Different sampler, same filter

23 01/28/05© 2005 University of Wisconsin Different Filters BoxGaussianMitchell

24 01/28/05© 2005 University of Wisconsin Box and Triangle Note: Code in PBR ignores normalization

25 01/28/05© 2005 University of Wisconsin Gaussian and Mitchell Gaussian tends to blur too much Mitchell enhances edges a little, which is perceptually pleasing –Parameterized filter: B and C. Keep B=2C=1 for good results

26 01/28/05© 2005 University of Wisconsin Windowed Sinc Would like a sinc function but without infinite support Solution is to multiply it by another functions that has finite support

27 01/28/05© 2005 University of Wisconsin Windowed Sinc

28 01/28/05© 2005 University of Wisconsin More Filters There is a wealth of research on filter design In images with noisy samples, as we will frequently see, a common idea is to avoid the effect of an outlier –Or view it as the one sample that found the really bright spot, and smooth it over many samples

29 01/28/05© 2005 University of Wisconsin Next Time Reflectance Functions


Download ppt "01/28/05© 2005 University of Wisconsin Last Time Improving Monte Carlo Efficiency."

Similar presentations


Ads by Google