0% found this document useful (0 votes)
37 views

View of An Object in 3 D Is Similar To Photographing An Object

The document discusses 3D rendering pipelines and transformations. It describes how 3D objects are transformed from their local coordinate system into the world coordinate system, then into the viewing coordinate system through viewing transformations, and finally projected onto a 2D view plane through projection transformations. Key steps in the pipeline include modeling transformations, lighting, viewing transformations, projection transformations, clipping, viewport transformations, and scan conversion to produce a 2D image.

Uploaded by

Gps Kang
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views

View of An Object in 3 D Is Similar To Photographing An Object

The document discusses 3D rendering pipelines and transformations. It describes how 3D objects are transformed from their local coordinate system into the world coordinate system, then into the viewing coordinate system through viewing transformations, and finally projected onto a 2D view plane through projection transformations. Key steps in the pipeline include modeling transformations, lighting, viewing transformations, projection transformations, clipping, viewport transformations, and scan conversion to produce a 2D image.

Uploaded by

Gps Kang
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 59

GraphicsLab@KoreaUniversity

1
3D Viewing

View of an object in 3 D is similar to
photographing an object
CSE
GraphicsLab@KoreaUniversity
2
3d Rendering Pipeline
Model Transformation
Lighting
Viewing Transformation
Projection Transformation
Clipping
Viewport Transformation
Scan Conversion
3D Primitives
Image
This is a pipelined
sequence of operations to
draw a 3D primitive into a
2D image for direct
illumination
CSE
GraphicsLab@KoreaUniversity
3
In Pipeline
Transform into3d world
coordinate system
Model Transformation
Lighting
Viewing Transformation
Projection Transformation
Clipping
Viewport Transformation
Scan Conversion
Image
3D Primitives
CSE
GraphicsLab@KoreaUniversity
4
In Pipeline
Transform into3d world
coordinate system
Model Transformation
Lighting
Viewing Transformation
Projection Transformation
Clipping
Viewport Transformation
Scan Conversion
Image
Illustrate according to lighting and
reflectance
3D Primitives
CSE
GraphicsLab@KoreaUniversity
5
In Pipeline
Transform into3d world
coordinate system
Model Transformation
Lighting
Viewing Transformation
Projection Transformation
Clipping
Viewport Transformation
Scan Conversion
Image
Illustrate according to lighting and
reflectance
Transform into 3D viewing coordinate
system
3D Primitives
CSE
GraphicsLab@KoreaUniversity
6
In Pipeline
Transform into3d world
coordinate system
Model Transformation
Lighting
Viewing Transformation
Projection Transformation
Clipping
Viewport Transformation
Scan Conversion
Image
Illustrate according to lighting and
reflectance
Transform into 3D viewing coordinate
system
Transform into 2D viewing coordinate
system
3D Primitives
CSE
GraphicsLab@KoreaUniversity
7
In Pipeline
Transform into3d world
coordinate system
Model Transformation
Lighting
Viewing Transformation
Projection Transformation
Clipping
Viewport Transformation
Scan Conversion
Image
Illustrate according to lighting and
reflectance
Transform into 3D viewing coordinate
system
Transform into 2D viewing coordinate
system
Clip primitives outside windows view
3D Primitives
CSE
GraphicsLab@KoreaUniversity
8
In Pipeline
Transform into3d world
coordinate system
Model Transformation
Lighting
Viewing Transformation
Projection Transformation
Clipping
View port Transformation
Scan Conversion
Image
Illustrate according to lighting and
reflectance
Transform into 3D viewing coordinate
system
Transform into 2D viewing coordinate
system
Clip primitives outside windows view
Transform into viewport
3D Primitives
CSE
GraphicsLab@KoreaUniversity
9
In Pipeline
Transform into3d world
coordinate system
Model Transformation
Lighting
Viewing Transformation
Projection Transformation
Clipping
Viewport Transformation
Scan Conversion
Image
Illustrate according to lighting and
reflectance
Transform into 3D viewing coordinate
system
Transform into 2D viewing coordinate
system
Clip primitives outside windows view
Transform into viewport
Draw pixels(includes texturing,
hidden surface etc.)
3D Primitives
CSE
GraphicsLab@KoreaUniversity
10
Transformation
Transform into3d world
coordinate system
Model Transformation
Lighting
Viewing Transformation
Projection Transformation
Clipping
Viewport Transformation
Scan Conversion
Image
Illustrate according to lighting and
reflectance
Transform into 3D viewing coordinate
system
Transform into 2D viewing coordinate
system
Clip primitives outside windows view
Transform into viewport
Draw pixels(includes texturing,
hidden surface etc.)
3D Primitives
CSE
GraphicsLab@KoreaUniversity
11
Transformation Pipeline
3D Object Coordinate or modelling
coordinate
Modeling Transformation
Viewing Transformation
Projection Transformation
Workstation Transformation
p(x, y)
P(x, y, z)
3D World Coordinate
3D Viewing Coordinate
2D Projection Coordinate
2D Device Coordinate
3D Viewing Coordinate
3D Object Coordinate
3D World Coordinate
CSE
GraphicsLab@KoreaUniversity
12
Viewing Transformation
3D Object Coordinate
Model Transformation
Viewing Transformation
Projection Transformation
Viewport Transformation
p(x, y)
P(x, y, z)
3D World Coordinate
Viewing
Transformation
3D Viewing Coordinate
2D Projection Coordinate
2D Device Coordinate
CSE
GraphicsLab@KoreaUniversity
13
Specifying the view plane
Choose the particular view for a scene
by establishing viewing coordinate
system or view reference coordinate
system.
The view plane or projection plane is
set up perpendicular to viewing zv
axis.

CSE
GraphicsLab@KoreaUniversity
14
The view plane or projection plane is set up perpendicular
to viewing zv axis.
yw
zw
xw
yv
xv
zv
CSE
GraphicsLab@KoreaUniversity
15
View plane positioning
along zv axis
xv
yv
zv
CSE
GraphicsLab@KoreaUniversity
16
Viewing system defined with
unit vectors u, v, n
yv
xv
zv
n
v
u
CSE
GraphicsLab@KoreaUniversity
17
World coordinate positions in the scene are
transformed to viewing coordinates, then
viewing coordinates are projected to the
view plane.
To establish viewing coordinate , first pick
up the world coordinate position called view
reference point.
View reference point is the particular point
of aim to view the whole object.

CSE
GraphicsLab@KoreaUniversity
18
Next select the positive direction for the
viewing zv axis and the orientation of the
view plane, by specifying the view plane
normal vector, N.
View plane is perpendicular to zv. Therefore
perpendicular to view plane is along zv and
so N along positive zv axis.

CSE
GraphicsLab@KoreaUniversity
19
Finally choose the up direction for the view
by specifying a vector V called the view up
vector. This vector establishes the positive
direction for yv axis.
Compute the third vector U perpendicular to
both N & V to define the direction for xv axis.

CSE
GraphicsLab@KoreaUniversity
20
Viewing system defined with
unit vectors u, v, n
yv
xv
zv
n
v
u
CSE
GraphicsLab@KoreaUniversity
21
Transformation from world to
viewing coordinate.
Before object descriptions can be projected
to the view plane , they must be transferred
to viewing coordinates.
Transformation sequence is
1. Translate the view reference point to the
origin of the world coordinate system.
2. Apply rotations to align the xv, yv & zv axes
with the world xw, yw and zw axes.
CSE
GraphicsLab@KoreaUniversity
22
yw
zw
xw
yv
xv
zv
yw
z
w
xw
yv
xv
zv
yw
zw
xw
yv
xv
zv
Mwc,vc = RT
CSE
GraphicsLab@KoreaUniversity
23
Viewing Transformation
3D Object Coordinate
Model Transformation
Viewing Transformation
Projection Transformation
Viewport Transformation
p(x, y)
P(x, y, z)
3D World Coordinate
Viewing
Transformation
3D Viewing Coordinate
2D Projection Coordinate
2D Device Coordinate
CSE
GraphicsLab@KoreaUniversity
24
Projection
General definition
Transform points in n-space to m-space(m<n)
In computer graphics
Map viewing coordinates to 2D screen coordinates
After converting world coordinate to viewing coordinates
project 3 D objects into the 2D view plane.
CSE
GraphicsLab@KoreaUniversity
25
2 Basic Projection Methods
PARLLEL PROJECTION
Coordinate positions are transformed to the
view plane along parallel lines.
Preserves relative proportion of object .
Accurate views of object are obtained
But does not give a realistic representation
of the appearance of a 3 D object.


CSE
GraphicsLab@KoreaUniversity
26
Parallel Projection
P1
P2
P1
P2
CSE
GraphicsLab@KoreaUniversity
27
Parallel Projection
Center of projection is at infinity
Direction of projection (DOP) same for all points
CSE
GraphicsLab@KoreaUniversity
28
2. Perspective Projection
Object positions are transformed to the view plane
along lines that converge to a point called
projection reference point or centre of projection.
The projected view of an object is determined by
calculating the intersection of the projection lines
with the view plane.
Perspective projection produces a realistic view ,but
does not preserve relative proportion.
Projection of distant objects are smaller than the
projections of object of the same size that are closer
to the projection.

CSE
GraphicsLab@KoreaUniversity
29
P1
P2
P1
P2
View plane
Projection reference point
CSE
GraphicsLab@KoreaUniversity
30
Projection of distant objects are smaller than
the projections of object of the same size
that are closer to the projection.


View plane
Projection reference point
CSE
GraphicsLab@KoreaUniversity
31
Perspective Projection
Map points onto view plane along
projectors emanating from center of
projection(cop)
CSE
GraphicsLab@KoreaUniversity
32
Taxonomy of Projections
Planar geometric
projection
Parallel Perspective
Orthographic Oblique
Top
Front
Side
Axonometric Cabinet
Cavalier
Other
One-point
Two-point
Three-point
CSE
GraphicsLab@KoreaUniversity
33
Taxonomy of Projections
Planar geometric
projection
Parallel Perspective
Orthographic Oblique
Top
Front
Side
Axonometric Cabinet
Cavalier
Other
One-point
Two-point
Three-point
CSE
GraphicsLab@KoreaUniversity
34
Parallel Projection
Specify parallel projection with a projection
vector that defines the direction of
projection lines.
CSE
GraphicsLab@KoreaUniversity
35
Orthographic Projections
DOP perpendicular to view plane
orthographic
CSE
GraphicsLab@KoreaUniversity
36
Orthographic projections are used to produce
front, side and top views of an object.
Front ,side and rear orthographic projections
are called as Elevations.
Top projection is called plan view.
Orthographic projection that displays more
than one face of an object is-Axonometric
orthographic projection.
The mostly used axonometric projection-
Isometric Projection
CSE
GraphicsLab@KoreaUniversity
37
Oblique Projections
DOP not perpendicular to view plane
Cavalier
(DOP at 45 )
Cabinet
(DOP at 63.4 )


CSE
GraphicsLab@KoreaUniversity
38
Transformation equation for
orthographic projection
Viewplane is positioned
at zvp along zv axis.

P (x,y,z)
(x,y)
zv
xv
yv
Orthographic projection of P (x,y,z) to viewing plane
xp = x
yp =y
Z coordinate is preserved for depth
information
CSE
GraphicsLab@KoreaUniversity
39
Oblique projection of P (x,y,z) to (xp,yp)
on the view plane
CSE
GraphicsLab@KoreaUniversity
40
Projection line from (x,y,z) to (xp, yp) make
an angle with the line on the projection
plane that joins (xp, yp) and (x, y).
L is at an angle with horizontal direction in
projection plane.
Express projection coordinates in terms of
x, y, L &
CSE
GraphicsLab@KoreaUniversity
41
Parallel Projection Matrix
General parallel projection transformation
) sin (
) cos (
tan
, tan
sin , cos
1
1
1
|
|
o
o
| |
L z y y
L z x x
zL
z
L
L
z
L y y L x x
p
p
p p
+ =
+ =
= = =
+ = + =
Where L
1
is the inverse of tan , which is also
the value of L when z=1
CSE
GraphicsLab@KoreaUniversity
42
Parallel Projection Matrix
General parallel projection transformation
(
(
(
(

(
(
(
(

=
(
(
(
(
(

1 1 0 0 0
0 0 0 0
0 sin 1 0
0 cos 0 1
1
1
z
y
x
L
L
w
z
y
x
p
p
p
p
|
|
CSE
GraphicsLab@KoreaUniversity
43
Taxonomy of Projections
Planar geometric
projection
Parallel Perspective
Orthographic Oblique
Top
Front
Side
Axonometric Cabinet
Cavalier
Other
One-point
Two-point
Three-point
CSE
GraphicsLab@KoreaUniversity
44
Classes of Perspective Projection
One-Point Perspective
Two-Point Perspective
Three-Point Perspective- depending
upon the number of vanishing points.
View from Above
CSE
GraphicsLab@KoreaUniversity
45
Perspective Projection
How many vanishing point?
CSE
GraphicsLab@KoreaUniversity
46
Vanishing Points
Any set of parallel lines in the object that are not
parallel to the view plane are projected into
converging lines.
Parallel lines that are parallel to the view plane will
be projected as parallel lines.
The point at which a set of projected parallel lines
appears to converge is called vanishing point.

Vanishing point of a principal axis principal
vanishing point (pvp)
CSE
GraphicsLab@KoreaUniversity
47
One-Point Perspective
One principal axis cuts
projection plane one
principal vanishing
point
Projection plane parallel
to one principal plane
object
image
CSE
GraphicsLab@KoreaUniversity
48
Two-Point Perspective
Two principal
axes cut
projection plane
two principal
vanishing points
Projection plane
parallel to one
principal axis
object
image
CSE
GraphicsLab@KoreaUniversity
49
Three-Point Perspective
Three principal axes
cut projection plane
three principal
vanishing points
CSE
GraphicsLab@KoreaUniversity
50
Perspective Projection
Transform points along projection lines that
meet at projection reference point.
Set projection reference point at position
zprp along zv axis .
Place view plane at zvp.
P (x,y,z)
(xp,yp,zvp)
(0,0,zprp)
zvp
View
plane
CSE
GraphicsLab@KoreaUniversity
51
Perspective projection
coordinates in
parametric form
1. x = x-xu
2. y = y-yu
3. z =z-(z-zprp)u
u from 0 to 1
When u =0 , P (x,y,z)
When u=1, (0,0,zprp)
x,y,z be any point from
P (x,y,z) to (0,0,zprp) on
the projection line.
On the view plane z=zvp
Substituting in 3
zvp = z - (z-zprp)u
u= (zvp z)/(zprp z)
Substituting u in 1 &2 you
will get the value of x &
y


CSE
GraphicsLab@KoreaUniversity
52
u= (zvp z) / (zprp - z)
Substituting u in (1) & (2)
xp = x (zprp zvp)/(z zprp)
yp = y (zprp zvp)/(z zprp)
Distance of the view plane from the
projection reference point is dp
dp= zprp zvp
xp=dp/z-zprp
yp=dp/z-zprp

CSE
GraphicsLab@KoreaUniversity
53
View plane as uv plane or xy
plane.
Since viewplane is on xy plane zvp = 0

xp = x (zprp zvp) / (z zprp)
yp = y (zprp zvp) / (z zprp)
xp = x (zprp) / (z zprp)
yp = y (zprp) / (z zprp)
CSE
GraphicsLab@KoreaUniversity
54
Projection reference point at
viewing coordinate origin
xp = x (zprp zvp) / (z zprp)
Since zprp =0,
xp = x( -zvp/z)
yp = y (zprp zvp) / (z zprp)
Since zprp =0,
yp = y(-zvp/ z)
CSE
GraphicsLab@KoreaUniversity
55
Taxonomy of Projections
Planar geometric
projection
Parallel Perspective
Orthographic Oblique
Top
Front
Side
Axonometric Cabinet
Cavalier
Other
One-point
Two-point
Three-point
CSE
GraphicsLab@KoreaUniversity
56
Perspective vs. Parallel
Perspective projection
Size varies inversely with distance looks
realistic
Distance and angles are not(in general)
preserved
Parallel line do not (in general) remain parallel
Parallel projection
Good for exact measurements
Parallel lines remain parallel
Angles are not (in general) preserved
Less realistic looking







CSE
GraphicsLab@KoreaUniversity
57
View Volume
3 D viewing window.
Set up view volume using window
boundaries.
Only the objects within the view volume will
appear in the generated display of output
device.
Size of the view volume depends on the size
of the window
Shape of the view volume depends on the
type of projection used to generate the
display.
CSE
GraphicsLab@KoreaUniversity
58
Parallel Projection View
Volume
For parallel projection the view volume is infinite parallelpiped
CSE
GraphicsLab@KoreaUniversity
59
Perspective Projection
View Volume
For perspective projection the view volume is a pyramid with apex
at projection reference point

You might also like