Document Sample
Antialiasing Powered By Docstoc
					Introduction to Computer Graphics
Environment Mapping
Used to model a object that reflects surrounding textures
 to the eye
  • Polished sphere reflects walls and ceiling textures
  • Cyborg in Terminator 2 reflects flaming destruction
Texture is distorted fish-eye view of environment
Spherical texture mapping creates texture coordinates
  that correctly index into this texture map
Sphere Mapping
Blinn/Newell Lattitude Mapping
Cube Mapping
The q-coordinate
Remember, texture coordinate interpolation is linear
Texture coordinates
  can contain an
  optional q-parameter
q scales texture
  coordinates by
  dividing each
  coordinate by q                           Z – into the scene

This captures perspective transformations
Pipelining of multiple texture applications to one
The results of each texture unit application is
 passed to the next texture unit, which adds its
More bookkeeping is required to pull this off
What is a pixel?
  A pixel is not…
     • A box
     • A disk
     • A teeny tiny little light
  A pixel is a point
     • It has no dimension
     • It occupies no area
     • It cannot be seen
     • It can have a coordinate

     A pixel is more than a point, it is a sample

 Most things in the real world are continuous
 Everything in a computer is discrete
 The process of mapping a continuous function to a
   discrete one is called sampling
 The process of mapping a continuous variable to a
   discrete one is called quantization
 Rendering an image requires sampling and
Line Segments
We tried to sample a line segment so it would map
 to a 2D raster display
We quantized the pixel values to 0 or 1
We saw stair steps, or jaggies
Line Segments
Instead, quantize to many shades
But what sampling algorithm is used?
Area Sampling
Shade pixels according to the area covered by thickened
This is unweighted area sampling

A rough approximation formulated by dividing each pixel
  into a finer grid of pixels
Unweighted Area Sampling
Primitive cannot affect intensity of pixel if it does
  not intersect the pixel
Equal areas cause equal intensity, regardless of
 distance from pixel center to area
Weighted Area Sampling
Unweighted sampling colors two pixels identically
 when the primitive cuts the same area through
 the two pixels

Intuitively, pixel cut through the center should be
  more heavily weighted than one cut along
Weighted Area Sampling

 Weighting function, W(x,y)
   • specifies the contribution of primitive passing through
     the point (x, y) from pixel center


An image is a 2D function I(x, y) that specifies
 intensity for each point (x, y)
Sampling and Image
Our goal is to convert the continuous image to a
 discrete set of samples
The graphics system’s display hardware will
 attempt to reconvert the samples into a
 continuous image: reconstruction
Point Sampling an Image
Simplest sampling is on a grid
Sample depends
 solely on value
 at grid points
Point Sampling
Multiply sample grid by image intensity to obtain a
 discrete set of points, or samples.

   Sampling Geometry
Sampling Errors
Some objects missed entirely, others poorly
Fixing Sampling Errors
  • Take more than one sample for each pixel and combine
                                            150x15 to 100x10
    – How many
      samples is                            200x20 to 100x10
                                            300x30 to 100x10
    – How do we
      know no                               400x40 to 100x10
      features are
Unweighted Area Sampling
Average supersampled points
All points are weighted equally
Weighted Area Sampling
Points in pixel are weighted differently
  • Flickering occurs as object moves
    across display
Overlapping regions eliminates flicker
How is this done today?
Full Screen Antialiasing
Nvidia GeForce2
  • OpenGL: render image 400% larger and supersample
  • Direct3D: render image 400% - 1600% larger
Nvidia GeForce3
  • Multisampling but with fancy overlaps
     – Don’t render at higher resolution
     – Use one image, but combine values of neighboring pixels
     – Beware of recognizable combination artifacts
          Human perception of patterns is too good
  • After each pixel is rendered, write pixel value to two
    different places in frame buffer
GeForce3 - Multisampling

After rendering two copies of entire frame
  • Shift pixels of Sample #2 left and up by ½ pixel
  • Imagine laying Sample #2 (red) over Sample #1 (black)
GeForce3 - Multisampling
Resolve the two samples into one image by
 computing average between each pixel from
 Sample 1 (black) and the four pixels from
 Sample 2 (red) that
 are 1/ sqrt(2) pixels
GeForce3 - Multisampling

   No AA            Multisampling
GeForce3 - Multisampling

• 4x Supersample   Multisampling
ATI Smoothvision
ATI SmoothVision
• Programmer selects
  samping pattern
3dfx Multisampling
• 2- or 4-frame shift and average


About if any file u wil find copyright contact me it will be remove in 3 to 4 buisnees days. add me on or visit