You are on page 1of 7

Three-Dimensional Viewing

overview of 3D viewing concepts


3D viewing pipeline
3D Viewing 3D viewing-coordinate parameters
transformation world Æ viewing coordinates
y

z
dp Pp
xp
z projection transformations
x
x
orthogonal and parallel projections
perspective projections

Werner Purgathofer / Computergraphik 1 1

3D Display Methods: Projection Plane 3D Display: Wireframe Display

display
plane

coordinate reference for obtaining a


selected view of a 3D scene

Werner Purgathofer / Computergraphik 1 2 Werner Purgathofer / Computergraphik 1 3

3D Display: Depth Cueing 3D Display: Visibility

visible line and surface identification


= or ?

= or !

intensity decreases with


increasing distance

Werner Purgathofer / Computergraphik 1 4 Werner Purgathofer / Computergraphik 1 5

1
3D Display: Depth Cueing + Visibility 3D Display: Shaded Display

only visible lines


intensity decreases
with increasing distance

shading + depth cueing:

Werner Purgathofer / Computergraphik 1 6 Werner Purgathofer / Computergraphik 1 7

3D Display: Parallel Projection 3D Display: Perspective Projection

top side front

3 parallel-projection views of an
object, showing relative proportions
from different viewing positions

Werner Purgathofer / Computergraphik 1 8 Werner Purgathofer / Computergraphik 1 9

3D Display: Illumination and Shadows 3D Display: Reflection and Transparency

perspective perspective
projection projection
local and global local and global
illumination illumination
models models
shadow reflectivity
generation transparency
shadows

Werner Purgathofer / Computergraphik 1 10 Werner Purgathofer / Computergraphik 1 11

2
3D Display: Surface Rendering Other 3D Display Methods
exploded and
perspective cutaway views
projection
simple
illumination model a fully rendered
surface textures turbine can also be
viewed as a surface-
rendered exploded
display

Werner Purgathofer / Computergraphik 1 12 Werner Purgathofer / Computergraphik 1 13

Other 3D Display Methods 3D Display: Stereoscopic Views


exploded and two views (one for the left, one for the
cutaway views right eye)
head mounted displays (hmd)
color-coded raster monitor with (shutter) glasses
cutaway view of a
lawn mower engine
showing the
structure and
relationship of
internal
components

Werner Purgathofer / Computergraphik 1 14 Werner Purgathofer / Computergraphik 1 15

2-dim. Viewing-Transformation Pipeline 3D Viewing: Camera Definition


3-dim. similar to taking a photograph
modeling world involves selection of
coord. construction coord. definition of
of objects and viewing area camera position
scenes and orientation camera direction
camera orientation
projection
coord. projection to viewing coordinates “window” (aperture) of camera
viewing plane
normalized device
transformation to coord. mapping to coord.
normalized device dependent
viewing frame values

Werner Purgathofer / Computergraphik 1 16 Werner Purgathofer / Computergraphik 1 17

3
3D Viewing: Camera Definition 3D Viewing Coordinates (1)
similar to taking a photograph view reference point
involves selection of origin of viewing-coordinate system
camera position camera position or look-at point
camera direction
camera orientation yv
right-handed
“window” (aperture) of camera xv viewing-coord.
yw zv
world system, with
coordinates P0 = (x0, y0, z0 ) axes x0, y0, z0,
relative to
xw world-coord.
viewing
coordinates zw scene
Werner Purgathofer / Computergraphik 1 18 Werner Purgathofer / Computergraphik 1 19

3D Viewing Coordinates (2) 3D Viewing Coordinates (3)


view-plane normal vector N (= positive zv-axis, view-plane normal vector N (positive zv-axis)
points to the viewer)
orientation of
the view plane
for a specified
N=(1,0,1) look-at point P,
relative to the
viewing-
coordinate
origin P0
N=(1,0,0)

Werner Purgathofer / Computergraphik 1 20 Werner Purgathofer / Computergraphik 1 21

3D Viewing Coordinates (4) 3D Viewing Coordinates (5)


choosing the view-up vector V (positive yv-axis) viewing-coordinate system
u = v x n (positive xv-axis)
view-plane distance

choose arbitrary up-vector often: choose V a right-handed viewing


and adjust it perpendicular along the yw axis ⇒ system defined with unit view-plane positioning
to normal vector N desired direction vectors u, v, and n along the zv axis
Werner Purgathofer / Computergraphik 1 22 Werner Purgathofer / Computergraphik 1 23

4
3D Viewing Coordinates (6) 3D Viewing Coordinates (7)

moving around
in a scene by
changing the
position of the
view reference
point

viewing a scene
from different
directions with a
fixed view-
reference point
Werner Purgathofer / Computergraphik 1 24 Werner Purgathofer / Computergraphik 1 25

3D Viewing Coordinates (8) Projections

yw yv xv yw yw
zv
yv xv yv
zv xv
xw xw zv xw
zw zw zw
parallel projection:
MWC,VC = Rz· Ry· Rx·T parallel lines,
preserves relative perspective projection:
aligning viewing system with world-coordinate
proportions center of projection,
axes using translate-rotate transformations
realistic views
Werner Purgathofer / Computergraphik 1 26 Werner Purgathofer / Computergraphik 1 27

Parallel Projection (1) Parallel Projection (2)


plan view
viewing plane viewing plane

Vp Vp

orthographic oblique
projection projection front side
elevation elevation
view view
orientation of the projection vector Vp
orthographic projections isometric projection
of an object for a cube
Werner Purgathofer / Computergraphik 1 28 Werner Purgathofer / Computergraphik 1 29

5
Orthographic Parallel Projection Oblique Parallel Projection
tan α = z / L
yv xp = x
(x,y,z) yv L = z / tan α
yp = y
zp = 0 xp = x + Lcos φ
(xp,yp) y p = y + Lsin φ
(x,y)
⎡1 0 0 0⎤ (x,y,z) α ⎡ cos φ ⎤
⎢0 0⎥
1 0 L ⎢1 0
tan α
0⎥
xv M parallel = ⎢ ⎥ φ ⎢ ⎥
⎢0 0 0 0⎥ xv sin φ
⎢0 M parallel = ⎢0 1
tan α
0⎥
⎣ 0 0 1⎥⎦ (x,y) ⎢ ⎥
⎢0 0 0 0⎥
zv zv ⎣⎢0 0 0 1⎦⎥
Werner Purgathofer / Computergraphik 1 30 Werner Purgathofer / Computergraphik 1 31

Parallel Projections: Cavalier Projection Parallel Projections: Cabinet Projection

depth of the cube is projected depth of the cube is projected as


equal to the width and the height one-half that of the width and height
Werner Purgathofer / Computergraphik 1 32 Werner Purgathofer / Computergraphik 1 33

Perspective Projection 1st Derivation of Perspective (1)


y y
1. for zvp = 0
z=0
projection
reference P(x,y,z)
point (0,0,zprp)
dp Pp z
z z xp
view plane
x
x x
xp : x = dp : (dp − z)
perspective projection of equal-sized objects
x⋅dp y⋅dp
at different distances from the view plane xp = yp = zp = 0
dp−z dp−z
Werner Purgathofer / Computergraphik 1 34 Werner Purgathofer / Computergraphik 1 35

6
1st Derivation of Perspective (2) 2nd Derivation of Perspective (1)
y
2. for zvp ≠ 0 P(x,y,z)
perspective
z=zvp (xp,yp,zvp) projection of a
P(x,y,z) u=1 point P (x,y,z)
(0,0,zprp) u=0
dp Pp to position
z zvp zprp zv (xp, yp, zp) on
z xp view
x plane the view plane
x
xp : x = dp : (zprp- z) x′ = x − xu (x’,y’,z’) any point on line for 0 ≤ u ≤ 1
y′ = y − yu
x⋅dp y⋅ d p zvp − z
xp = yp = zp = zvp z′ = z − ( z − z prp)u z′ = zvp ⇒ u =
zprp−z zprp−z z prp − z
Werner Purgathofer / Computergraphik 1 36 Werner Purgathofer / Computergraphik 1 37

2nd Derivation of Perspective (2) Perspective Projection Properties


⎛z − z ⎞ ⎛ dp ⎞ zvp − z
xp = x ⎜⎜ prp vp ⎟⎟ = x ⎜⎜ ⎟
⎟ u= special cases: zvp=0 or zprp=0
z
⎝ prp − z ⎠ ⎝ z prp − z ⎠ z prp − z
parallel lines parallel to view plane ⇒
⎛z prp − zvp ⎞ ⎛ dp ⎞
y p = y ⎜⎜ ⎟=
⎟ y ⎜⎜ ⎟
⎟ d p = z prp − zvp parallel lines
⎝ z prp − z ⎠ ⎝ z prp − z ⎠ parallel lines not parallel to view plane ⇒
z prp − z converging lines (vanishing point)
⎡ xh ⎤ ⎡1 0 0 0 ⎤ ⎡ x⎤ h= lines parallel to coordinate axis ⇒
⎢ y ⎥ ⎢0 ⎥ ⎢ ⎥ dp
⎢ h⎥ = ⎢
1 0 0
⎥ ⋅ ⎢ y⎥ h ≠ 1 !!! principal vanishing point (one, two or three)
⎢ zh ⎥ ⎢0 0 − zvp / d p zvp ( z prp / d p )⎥ ⎢ z ⎥ x p = xh / h
⎢ h ⎥ ⎢0 0 − 1/ d p zprp / d p ⎥⎦ ⎢⎣ 1 ⎥⎦
⎣ ⎦ ⎣ y p = yh / h

Werner Purgathofer / Computergraphik 1 38 Werner Purgathofer / Computergraphik 1 39

Principle Vanishing Points


vanishing point

1-point 3-point
perspective persp. proj.
projection

2-point
persp. proj.
Werner Purgathofer / Computergraphik 1 40

You might also like