Saturday, March 21, 2009

MIT computer graphics online

http://ocw.mit.edu/NR/rdonlyres/Electrical-Engineering-and-Computer-Science/6-837Fall2003/BA38C6F3-9352-479B-91CF-908D417F2C37/0/01_1_intro_print.pdf

Thursday, March 19, 2009

OpenGL ES, OpenVG and OpenMAX

• OpenGL ES family
– fixed functionality (1.x)
– programmable (2.x)
• OpenVG
– 2D vector graphics
– SVG players, UI frameworks, low-level OS
graphics

OpenMAX
– building-blocks for multimedia codecs
– Integration level
• abstracted media lib interfaces: portability to different OSs
– Development level
• optimized routines: portability across processors

What is the concept of normal in C.G.?

A surface normal, or simply normal, to a flat surface is a vector which is perpendicular to that surface. A normal to a non-flat surface at a point P on the surface is a vector perpendicular to the tangent plane to that surface at P.


The normal is often used in computer graphics to determine a surface's orientation toward a light source for flat shading, or the orientation of each of the corners (vertices) to mimic a curved surface with Phong shading.





Wednesday, March 18, 2009

Basic Computer Graphics Concepts

  • Spline: In computer graphics, a smooth curve that passes through two or more points. Splines are generated with mathematical formulas. Two of the most common types of splines are Bezier curves and b-spline curves.
  • Dithering: Creating the illusion of new colors and shades by varying the pattern of dots. Newspaper photographs, for example, are dithered. If you look closely, you can see that different shades of gray are produced by varying the patterns of black and white dots. There are no gray dots at all. The more dither patterns that a device or program supports, the more shades of gray it can represent. In printing, dithering is usually called halftoning, and shades of gray are called halftones. Note that dithering differs from gray scaling. In gray scaling, each individual dot can have a different shade of gray. Dithering is a technique used in computer graphics to create the illusion of color depth in images with a limited color palette (color quantization). In a dithered image, colors not available in the palette are approximated by a diffusion of colored pixels from within the available palette. The human eye perceives the diffusion as a mixture of the colors within it (see color vision). Dithering is analogous to the halftone technique used in printing. Dithered images, particularly those with relatively few colors, can often be distinguished by a characteristic graininess, or speckled appearance.
  • An illustration of dithering. Red and blue are the only colors used, but as the pixels become smaller, the patch appears violet.
  • dithering
  • Mipmap

    From Wikipedia, the free encyclopedia

    Jump to: navigation, search

    In 3D computer graphics texture filtering, MIP maps (also mipmaps) are pre-calculated, optimized collections of images that accompany a main texture, intended to increase rendering speed and reduce aliasing artifacts. They are widely used in 3D computer games, flight simulators and other 3D imaging systems. The technique is known as mipmapping. The letters "MIP" in the name are an acronym of the Latin phrase multum in parvo, meaning "much in a small space". They need more space in memory although they form the basis of wavelet compression.

    [edit] How it works

    An example of mipmap image storage: the principal image on the left is accompanied by filtered copies of reduced size.

    Each bitmap image of the mipmap set is a version of the main texture, but at a certain reduced level of detail. Although the main texture would still be used when the view is sufficient to render it in full detail, the renderer will switch to a suitable mipmap image (or in fact, interpolate between the two nearest, if trilinear filtering is activated) when the texture is viewed from a distance or at a small size. Rendering speed increases since the number of texture pixels ("texels") being processed can be much lower than with simple textures. Artifacts are reduced since the mipmap images are effectively already anti-aliased, taking some of the burden off the real-time renderer. Scaling down and up is made more efficient with mipmaps as well.

    If the texture has a basic size of 256 by 256 pixels, then the associated mipmap set may contain a series of 8 images, each one-fourth the total area of the previous one: 128×128 pixels, 64×64, 32×32, 16×16, 8×8, 4×4, 2×2, 1×1 (a single pixel). If, for example, a scene is rendering this texture in a space of 40×40 pixels, then either a scaled up version of the 32×32 (without trilinear interpolation) or an interpolation of the 64×64 and the 32×32 mipmaps (with trilinear interpolation) would be used. The simplest way to generate these textures is by successive averaging, however more sophisticated algorithms (perhaps based on signal processing and Fourier transforms) can also be used.

    The increase in storage space required for all of these mipmaps is a third of the original texture, because the sum of the areas 1/4 + 1/16 + 1/64 + 1/256 + · · · converges to 1/3. In the case of an RGB image with three channels stored as separate planes, the total mipmap can be visualized as fitting neatly into a square area twice as large as the dimensions of the original image on each side. This is the inspiration for the tag "multum in parvo".

    In many instances, the filtering should not be uniform in each direction (it should be anisotropic, as opposed to isotropic), and a compromise resolution is used. If a higher resolution is used, the cache coherence goes down, and the aliasing is increased in one direction, but the image tends to be clearer. If a lower resolution is used, the cache coherence is improved, but the image is overly blurry, to the point where it becomes difficult to identify.

    To help with this problem, nonuniform mipmaps (also known as rip-maps) are sometimes used. With a 16×16 base texture map, the rip-map resolutions would be 16×8, 16×4, 16×2, 16×1, 8×16, 8×8, 8×4, 8×2, 8×1, 4×16, 4×8, 4×4, 4×2, 4×1, 2×16, 2×8, 2×4, 2×2, 2×1, 1×16, 1×8, 1×4, 1×2 and 1×1.

    The unfortunate problem with this approach is that rip-maps require four times as much memory as the base texture map, and so rip-maps have been very unpopular. Also for 1×4 and more extreme 4 maps each rotated by 45° would be needed and the real memory requirement is growing more than linearly.

    To reduce the memory requirement, and simultaneously give more resolutions to work with, summed-area tables were conceived. However, this approach tends to exhibit poor cache behavior. Also, a summed area table needs to have wider types to store the partial sums than the word size used to store the texture. For these reasons, there isn't any hardware that implements summed-area tables today.

    A compromise has been reached today, called anisotropic mip-mapping. In the case where an anisotropic filter is needed, a higher resolution mipmap is used, and several texels are averaged in one direction to get more filtering in that direction. This has a somewhat detrimental effect on the cache, but greatly improves image quality.

  • Culling:
    § The removal of objects that don’t contribute
    to the final scene
    § It can take place anywhere in the pipeline
    § The earlier in the pipeline the better
    § Ideally only the Exact Visible Set (EVS) will
    be sent down the pipeline
    § Not practical
    § Typical algorithms Potentially Visible Set
    (PVS)
    § Conservative – Fully includes the EVS
    § Approximate – May have errors but is faster