i-1 steps of image generation –create a model of the objects –create a model for the...
TRANSCRIPT
I-1
• Steps of Image Generation– Create a model of the objects– Create a model for the illumination of the
objects– Create an image (render) the result
I Computer Graphics Background
I-2
Image Terminology• Pixel – picture element
– One location in a computer image– Gray scale image has one value– Color image has three values for red, green,
and blue
• Frame buffer– The two-dimensional grid of pixels for an
image
• A window is an area of the computer screen where the image is displayed
I-3
Graphics Pipeline
• Three main stages– Modeling– Rendering– Display
I-4
Modeling Stage
• Specifies details of objects in scene– Shape– Materials– Color– Shininess, transparency, translucency– Texture
I-5
Rendering Stage
• Simulates the flow of light
• Models the way light interacts with objects– Different materials react with light differently
• Determines visibility of objects
I-6
Image Display Stage
• Image display is supported by graphics hardware
• Different devices output images differently– Manufacturers use different components,
which accounts for the difference
I-7
View Information• The viewpoint gives the location of the
viewer• The view direction is a vector specifying
the direction the viewer is looking
I-8
Coordinate Systems
• Object coordinate system– Used to define object shape
• World coordinate system– Used to position various objects in the scene
• View coordinate system– Defined by the viewpoint, view direction, and
view up direction
• Window coordinate system– Defines the part of the world that is visible
I-9
Local or object, world, view, and window coordinate systems
I-10
• Right-handed vs. left-handed coordinate systems
I-11
Homogeneous Coordinates
• Locations are typically specified through the (x, y, z) coordinate
• Homogeneous coordinates add a fourth component to get (x, y, z, w)
• Typically, the w term will be 1 but transformations may change this
• If w in (x, y, z, w) is not 1, the actual (x', y', z') coordinate is (x/w, y/w, z/w)
I-12
Color Models
• Used to specify a color
• There are many different color models that have different purposes
• Color can be defined by wavelength– Wavelengths can be combined to produce
color
I-13
RGB Color Model
• Based on red, green, and blue
• An additive color model– Red, green, and blue light is combined to
create different colors
• Can be shown on a cube with red, green, and blue on the three major axes
• Shades of gray appear along the main diagonal
I-14
RGB Color Model
I-15
CMY Color Model• Based on cyan, magenta, and yellow
• A subtractive color model– Cyan, magenta, and yellow ink or toner
subtract color from white
• Closely related to the RGB model– C=1.0-R, M=1.0-G, Y=1.0-B
• CMYK model also includes black to create richer output– K=minimum(C, M, Y), C=C-K, M=M-K, Y=Y-K
I-16
HSV Color Model
• Based on hue, saturation, and value
• An artistic model
• Hue determines color
• Saturation determines the amount of color– How much white is added to the full color
• Value indicates the lightness of the color– How much black is added to the full color
I-17
HSV Color Model
I-18
HLS Color Model
• Based on hue, lightness, and saturation
• Similar to the HSV color model
I-19
Displaying Images
• Output devices include:– Monitors– Flat panel displays– Printers– Three-dimensional printers
I-20
I-21
I-22