Download presentation

Presentation is loading. Please wait.

Published byBarrett Teesdale Modified about 1 year ago

1
Computer Graphics Viewing, Rendering, Antialiasing گرد آوري و تاليف: دكتر احمد رضا نقش نيل چي دانشگاه اصفهان گروه مهندسي كامپيوتر

2
Right Handed Coordinate System +X +Y +Z +X +Y +Z

3
Viewing a 3D world We have a model in this world and would like to view it from a new position. We’ll call this new position the camera or eyepoint. Our job is to figure out what the model looks like on the display plane. +X +Y +Z

4
Parallel Projection +X +Y +Z

5
Perspective Projection +X +Y +Z

6
Major Tasks of a Renderer Modelling: Produce sets of vertices that define geometric objects Geometric Processing: Determine which objects should appear and in what colour Normalization Clipping Hidden Surface Removal Shading Vertex-based: floating point processing in 3-D Rasterization: Generate frame buffer pixels by Scan Conversion Pixel-based: integer processing in 2-D Display: Pixels are read from the frame buffer onto the CRT Must overcome display artefacts through Antialiasing

7
A Note about Hidden-Surface Removal Hidden Surface Removal (Visible Surface Determination) seeks to discover which objects are visible or obscured from the viewpoint Object Space Approach: Consider polygons A and B pair-wise and determine if: (a) B partially obscures A, (b) A partially obscures B, (c) A and B are completely visible, (d) B obscures A (or vice versa) Image Space Approach: Follows ray-casting approach

8
Aliasing Occurs when the sampling inherent in rendering does not contain enough information for an accurate image. Original Scene Scanline Luminosity Sampling Pixel Centres Sampled Signal Luminosity Signal Rendered Image

9
Antialiasing What is antialiasing? How do we see the affects of antialiasing? What can we do about it? Math behind antialiasing Antialiasing in modern day graphics cards Advanced stuff on AA

10
Let’s Revisit a pixel A pixel is which of these things (theoretically)? point circle/disk square/rectangle has area has a location sample

11
Samples Continuous - function with values at any input. Most things in the world. Ex. sine and cosine Discrete - function with values only at specific inputs. Computers are discrete. What is a 2D example? To convert from a continuous function to a discrete one, we discretize or sample To convert form a continuous variable to a discrete one, we quantize When we render an image (which is a continuous function), we sample and quantize

12
A New Thought about Images Images are really a 2D function Here’s an image plotted as a height field Now we store this image as an “array” of points. What does that mean?

13
We Sample the Image Function Here is the sampling function. It is called the delta function

14
Thus we are “sampling” a continuous image function We call these samples at this regular grid of points, pixels. Pixels are a sampling of the function that describes the image. We store these pixels into memory as an array of colors. How densely should we sample? What would govern this?

15
A quick footnote into frequency analysis A way to understand the sampling question is to convert the function into a different “space” or domain. We use the Fourier Transform to convert the function (in our case the image) into the frequency domain.

16
What does sampling mean? What happens if we don’t sample enough?

17
Aliasing in General If we sample at too low a rate, the high frequencies in the image appear as lower frequencies. How do we fix it? Increase sampling Remove high frequencies

18
Aliasing in Image Aliasing manifests itself as “jaggies” in graphics. Thus we don’t have enough pixels to accurately represent the underlying function. Check out what happens when we increase our sampling.

19
Effects of Aliasing in Image Common aliasing errors (called artefacts) are: jagged profiles, disappearing or improper fine detail, and disintegrating textures. Jagged Profiles Loss of Detail

20
Fixing Aliasing Increase Resolution What’s wrong with this approach? Filtering is another possibility We want to remove the high frequency areas How would we do that? Let’s re-examine what a pixel is in reality.

21
Prefiltering No AntialiasingPrefiltering

22
Postfiltering Sampling: take jittered, regular or random samples. Averaging: use an filter to assign weights to each sample. Sum all the weighted samples to obtain a pixel. Jittered Regular

23
Filtering Example

24
(0,0) (4,2) (4,0) 2 2 1 10 0 34 Let’s recall

25
Filter Sampling This reduces the high frequencies (which cause aliasing) Interpolate between samples.

26
Filter Sampling Result (Example)

27
What are we doing? (0,0) (4,2) (4,0) 2 2 1 10 0 34

28
Two ways to Antialias Increase resolution (increase sampling) or Supersampling

29
Increase Rendering Resolution Render the image at a higher resolution and downsample. Really, you are letting your eye do some filtering for you.

30
Supersampling For each pixel, we would like to figure out what “percentage” is covered. (0,0) (4,0) 2 1 10 0 34

31
Line Antialiasing

32
Full Screen Antialiasing Another way to do the supersampling is to do full screen antialiasing We want to draw the image with several camera jitter positions and average the answers

33
Full Screen Antialiasing Example (Exaggerated)

34
Anti-aliasing in Summary Developed to combat aliasing Super-sampling (Post-filtering): Compute pixel color by averaging multiple samples. Sample the scene at n times the display resolution. For example, suppose the display resolution is 512x512. Sampling at three times the width and three times the height of the display resolution would yield 1536x1536 samples A filter provides the weights used to compute the average

35
Antialiasing Examples

39
پايان

Similar presentations

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google

Ppt on advertising and brand management Ppt on sobel edge detection Download ppt on direct and inverse proportion Ppt on characteristics of computer Ppt on latest technology in ece Ppt on mirror link Ppt on mauryan dynasty Ppt on various layers of the earth Kids ppt on batteries Beautiful backgrounds for ppt on social media