You are on page 1of 42

Edge intersections

It is applied for edges which are hidden partially


hidden edges .
1.First calculated edge intersections in
two dimension that is in the x,y plane .
These intersections are used to
determine edge visibility.

Edge Intersection

Introduction to shading
Shading of models simulates the way visible surfaces
of objects reflect light.
They determine shade of a point of an object in terms
of light source and ambient light
Shading models
Shading surface
Shading solids

Shading
Determining the light traveling from a point in the
scene to the viewers eye

Images courtesy of Watt, Watt & Watt, and Foley & van Dam

Rendering
The process of generating an image from a model (or
models in what collectively could be called
a scene file), by means of computer programs. Also,
the results of such a model can be called a rendering.
A scene file contains objects in a strictly defined
language or data structure; it would contain geometry,
viewpoint texture, lighting, and shading information as
a description of the virtual scene. The data contained
in the scene file is then passed to a rendering
program to be processed and output to a digital
image or raster graphics image file

Example for rendering

Color Models

Color models
Different meanings of color:
painting
wavelength of visible light
human eye perception

Physical properties of light


Visible light is part of the electromagnetic radiation (380750 nm)
1 nm (nanometer) = 10-10 m (=10-7 cm)
1 (angstrom) = 10 nm
Radiation can be expressed in wavelength () or
frequency (f), c=f, where c=3.1010 cm/sec

Physical properties of light


White light consists of
a spectrum of all
visible colors

Physical properties of light


All kinds of light can
be described by the
energy of each
wavelength
The distribution
showing the relation
between energy and
wavelength (or
frequency) is called
energy spectrum

Material properties
The color of an object depends on the so
called spectral curves for transparency
and reflection of the material
The spectral curves describe how light of
different wavelengths are refracted and
reflected (cp. the material coefficients
introduced in the illumination models)

Properties of reflected light


Incident white light upon an object is for
some wavelengths absorbed, for others
reflected
E.g. if all light is absorbed => black
If all wavelengths but one are absorbed
=> the one color is observed as the
color of the object by the reflection

Color definitions
Complementary colors - two colors
combine to produce white light
Primary colors - (two or) three colors used
for describing other colors
Two main principles for mixing colors:
additive mixing
subtractive mixing

Additive mixing
pure colors are put close to each other => a mix on
the retina of the human eye (cp. RGB)
overlapping gives yellow, cyan, magenta and white
the typical technique on color displays

Subtractive mixing
color pigments are mixed directly in some
liquid, e.g. ink
each color in the mixture absorbs its specific
part of the incident light
the color of the mixture is determined by
subtraction of colored light, e.g. yellow
absorbs blue => only red and green, i.e.
yellow, will reach the eye (yellow because of
addition)

Subtractive mixing,contd
primary colors: cyan, magenta and
yellow, i.e. CMY
the typical technique in printers/plotters
connection between additive and
subtractive primary colors (cp. the color
models RGB and CMY)

Additive/subtractive mixing

Overview of color models


The human eye can perceive about 382000(!)
different colors
Necessary with some kind of classification system; all using three coordinates as a basis:
1) CIE standard
2) RGB color model
3) CMY color model (also, CMYK)
4) HSV color model
5) HLS color model

CIE standard
Commission
Internationale de
LEclairage (1931)
not a computer
model
each color = a
weighted sum of
three imaginary
primary colors

RGB model
all colors are
generated from the
three primaries
various colors are
obtained by
changing the amount
of each primary
additive mixing
(r,g,b), 0r,g,b1

RGB model,contd
the RGB cube
1 bit/primary => 8 colors, 8 bits/primary => 16M colors

CMY model
cyan, magenta and
yellow are complementary colors of
red,green and blue,
respectively
subtractive mixing
the typical printer
technique

CMY model,contd
almost the same
cube as with RGB;
only black<-> white
the various colors
are obtained by
reducing light, e.g. if
red is absorbed =>
green and blue are
added, i.e cyan

RGB vs CMY
If the intensities are represented as 0r,g,b1
and 0c,m,y1 (also coordinates 0-255 can
be used), then the relation between RGB and
CMY can be described as:

c 1 r
m 1 g

y 1 b

CMYK model
For printing and graphics art industry,
CMY is not enough; a fourth primary, K
which stands for black, is added.
Conversions between RGB and CMYK
are possible, although they require
some extra processing.

HSV model
HSV stands for Hue-Saturation-Value
described by a hexcone derived from the
RGB cube

HSV model,contd
Hue (0-360); the
color, cp. the
dominant wavelength (128)
Saturation (0-1); the
amount of white
(130)
Value (0-1); the
amount of black
(23)

HSV model,contd
The numbers given after each primary are
estimates of how many levels a human being
is capable to distinguish between, which (in
theory) gives the total number of color
nuances:
128*130*23 = 382720
In Computer Graphics, usually enough with:
128*8*15 = 16384

HLS model
Another model similar
to HSV
L stands for Lightness

Color models
Some more facts about colors:
The distance between two colors in the
color cube is not a measure of how far
apart the colors are perceptionally!
Humans are more sensitive to shifts in
blue (and green?) than, for instance, in
yellow

Animation
Animation is the process in which the
illusion of movement is achieved by
creating and displaying a sequence of
images with elements that appear to
have motion
The illusion of movement can be
achieved in various ways.

The most obvious way is to change the


locations of various elements of
images in the sequence
Other ways include transforming an
object to another changing the color of
an object ,or changing light intensities

This is mostly use in producing


animated cartoons ,movies
Animation draws a sequence of
pictures which ,if animated produces
the illusion of the proper motion

Steps for utilized in


conventional animation

Animation types
Frame buffer animation
Real time playback
Skeleton algorithm

Frame buffer animation


This is animation is base on static
images.
The contents of the frame buffer donot
change during animation .
There are three types of frame buffer
animation color lookup table zoom pan
scroll ,crossbar animation.

Skeleton animation

You might also like