Upload
brindhas3
View
221
Download
0
Embed Size (px)
Citation preview
7/30/2019 3D Viewing 2
1/10
Copyright of most images by Computer Graphics C Version Hearn D. & Baker M.P. Computergraphik @ TU Wien
ThreeThree--Dimensional ViewingDimensional Viewing
overview of 3D viewing conceptsoverview of 3D viewing concepts
3D viewing pipeline3D viewing pipeline
3D viewing3D viewing--coordinate parameterscoordinate parameters
transformation worldtransformation world viewing coordinatesviewing coordinates
projection transformationsprojection transformations
orthogonal and parallel projectionsorthogonal and parallel projections perspective projectionsperspective projections
viewport transformation & 3D screen coord.viewport transformation & 3D screen coord.
Copyright of most images by Computer Graphics C Version Hearn D. & Baker M.P. Computergraphik @ TU Wien
3D Display Methods3D Display Methods
coordinate reference for obtaining a
selected view of a 3D scene
display
plane
Copyright of most images by Computer Graphics C Version Hearn D. & Baker M.P. Computergraphik @ TU Wien
3D Display: Wireframe Display3D Display: Wireframe Display
wireframe display of 3 objects, with back lines
removed, from a commercial database of object
shapes. Each object
in the database isdefined as a grid of
coordinate points,
which can then be
viewed in wireframe
form or in a surface-
rendered form
7/30/2019 3D Viewing 2
2/10
Copyright of most images by Computer Graphics C Version Hearn D. & Baker M.P. Computergraphik @ TU Wien
3D Display: Parallel Projection3D Display: Parallel Projection
3 parallel-projection views of an object,
showing relative proportions from
different viewing positions
Copyright of most images by Computer Graphics C Version Hearn D. & Baker M.P. Computergraphik @ TU Wien
3D Display: Perspective Projection3D Display: Perspective Projection
Copyright of most images by Computer Graphics C Version Hearn D. & Baker M.P. Computergraphik @ TU Wien
3D Display: Depth Cueing3D Display: Depth Cueing
= or ?
intensity decreases
with increasing
distance
Copyright of most images by Computer Graphics C Version Hearn D. & Baker M.P. Computergraphik @ TU Wien
3D Display: Visibility3D Display: Visibility
visible line and surface identificationvisible line and surface identification
= or !
7/30/2019 3D Viewing 2
3/10
Copyright of most images by Computer Graphics C Version Hearn D. & Baker M.P. Computergraphik @ TU Wien
3D Display:3D Display:
Depth Cueing + VisibilityDepth Cueing + Visibility
only visible linesonly visible lines
intensity decreasesintensity decreases
with increasing distancewith increasing distance
Copyright of most images by Computer Graphics C Version Hearn D. & Baker M.P. Computergraphik @ TU Wien
3D Display: Surface Rendering3D Display: Surface Rendering
realistic room display achieved with stochastic
ray-tracing methods that apply perspective
projection
surface-texture
mapping
illumination
models
Copyright of most images by Computer Graphics C Version Hearn D. & Baker M.P. Computergraphik @ TU Wien
Other 3D Display MethodsOther 3D Display Methods
explodedexploded andand
cutaway viewscutaway views
a fully rendered
turbine can also
be viewed as a
surface-rendered
exploded display
Copyright of most images by Computer Graphics C Version Hearn D. & Baker M.P. Computergraphik @ TU Wien
exploded andexploded and
cutawaycutaway viewsviews
color-coded cutaway
view of a lawn
mower engine
showing the
structure and
relationship of
internal components
Other 3D Display MethodsOther 3D Display Methods
7/30/2019 3D Viewing 2
4/10
Copyright of most images by Computer Graphics C Version Hearn D. & Baker M.P. Computergraphik @ TU Wien
two views (one for the left, one for thetwo views (one for the left, one for the
right eye)right eye) head mounted displays (hmd)head mounted displays (hmd)
raster monitor with (shutter) glassesraster monitor with (shutter) glasses
3D Display: Stereoscopic Views3D Display: Stereoscopic Views
Copyright of most images by Computer Graphics C Version Hearn D. & Baker M.P. Computergraphik @ TU Wien
3D Viewing Pipeline3D Viewing Pipeline
general 3-dim. transformation pipeline, from
modeling coordinates to final device coordinates
modelingtransformation
viewingtransformation
projectiontransformation
viewporttransformation
modeling
coord.
world
coord.
device
coord.
projection
coord.
viewing
coord.
normalizationtransformation
and clipping
normalized
coord.
Copyright of most images by Computer Graphics C Version Hearn D. & Baker M.P. Computergraphik @ TU Wien
3D Viewing: Camera Definition3D Viewing: Camera Definition
similar to taking a photographsimilar to taking a photograph
involves selection ofinvolves selection of camera positioncamera position camera orientationcamera orientation windowwindow (aperture) of camera(aperture) of camera
Copyright of most images by Computer Graphics C Version Hearn D. & Baker M.P. Computergraphik @ TU Wien
3D Viewing Coordinates (1)3D Viewing Coordinates (1)
view reference pointview reference point origin of viewingorigin of viewing--coordinate systemcoordinate system camera position or lookcamera position or look--at pointat point
right-handed
viewing-coord.
system, with
axes x0, y0, z0,
relative to
world-coord.
scene
7/30/2019 3D Viewing 2
5/10
Copyright of most images by Computer Graphics C Version Hearn D. & Baker M.P. Computergraphik @ TU Wien
3D Viewing Coordinates (2)3D Viewing Coordinates (2)
view-plane normal vector N (= positive zv-axis,
points to the viewer)
N=(1,0,0)
N=(1,0,1)
Copyright of most images by Computer Graphics C Version Hearn D. & Baker M.P. Computergraphik @ TU Wien
3D Viewing Coordinates (3)3D Viewing Coordinates (3)
orientation ofthe view plane
for a specified
look-at point P,
relative to the
viewing-
coordinateorigin P0
view-plane normal vector N (positive zv-axis)
Copyright of most images by Computer Graphics C Version Hearn D. & Baker M.P. Computergraphik @ TU Wien
3D Viewing Coordinates (4)3D Viewing Coordinates (4)
choose arbitrary up-vector
and adjust it perpendicular
to normal vector N
often: choose V
along the yw axis
desired direction
choosing the view-up vector V (positive yv-axis)
Copyright of most images by Computer Graphics C Version Hearn D. & Baker M.P. Computergraphik @ TU Wien
3D Viewing Coordinates (5)3D Viewing Coordinates (5)
viewingviewing--coordinate systemcoordinate system u = vu = v xx nn (positive x(positive xvv--axis)axis) viewview--plane distanceplane distance
a right-handed viewing
system defined with unitvectors u, v, and n view-plane positioningalong the zv axis
7/30/2019 3D Viewing 2
6/10
Copyright of most images by Computer Graphics C Version Hearn D. & Baker M.P. Computergraphik @ TU Wien
3D Viewing Coordinates (6)3D Viewing Coordinates (6)
viewing ascene from
different
directions with
a fixed view-
reference
point
Copyright of most images by Computer Graphics C Version Hearn D. & Baker M.P. Computergraphik @ TU Wien
3D Viewing Coordinates (7)3D Viewing Coordinates (7)
moving
around in ascene by
changing the
position of
the view
reference
point
Copyright of most images by Computer Graphics C Version Hearn D. & Baker M.P. Computergraphik @ TU Wien
3D Viewing Coordinates (8)3D Viewing Coordinates (8)
TRRRM xyzVCWC ,aligning viewing system with world-coordinate
axes using translate-rotate transformations
Copyright of most images by Computer Graphics C Version Hearn D. & Baker M.P. Computergraphik @ TU Wien
ProjectionsProjections
parallel projection:
parallel lines,
preserves relative
proportions
perspective projection:
center of projection,realistic views
7/30/2019 3D Viewing 2
7/10
Copyright of most images by Computer Graphics C Version Hearn D. & Baker M.P. Computergraphik @ TU Wien
Parallel Projection (1)Parallel Projection (1)
orthographicprojection
obliqueprojection
orientation of the projection vectorVp
Copyright of most images by Computer Graphics C Version Hearn D. & Baker M.P. Computergraphik @ TU Wien
Parallel Projection (2)Parallel Projection (2)
orthographic projectionsof an object
isometric projectionfor a cube
plan view
side
elevationview
front
elevationview
Copyright of most images by Computer Graphics C Version Hearn D. & Baker M.P. Computergraphik @ TU Wien
Orthographic Parallel ProjectionOrthographic Parallel Projection
=
1000
0000
0010
0001
parallelM
xp = x
yp = y
zp = 0
Copyright of most images by Computer Graphics C Version Hearn D. & Baker M.P. Computergraphik @ TU Wien
Oblique Parallel ProjectionOblique Parallel Projection
siny
cos
p Ly
Lxxp
++
=
1000
0000
0tansin
10
0tancos
01
parallelM
tan/ /tan zL Lz= =
7/30/2019 3D Viewing 2
8/10
Copyright of most images by Computer Graphics C Version Hearn D. & Baker M.P. Computergraphik @ TU Wien
Parallel Proj.: Cavalier ProjectionParallel Proj.: Cavalier Projection
depth of the cube is projected
equal to the width and the heightCopyright of most images by Computer Graphics C Version Hearn D. & Baker M.P. Computergraphik @ TU Wien
Parallel Proj.: Cabinet ProjectionParallel Proj.: Cabinet Projection
depth of the cube is projected as
one-half that of the width and height
Copyright of most images by Computer Graphics C Version Hearn D. & Baker M.P. Computergraphik @ TU Wien
Perspective ProjectionPerspective Projection
perspective projection of equal-sized objects
at different distances from the view plane
view plane
projectionreference
point
Copyright of most images by Computer Graphics C Version Hearn D. & Baker M.P. Computergraphik @ TU Wien
z=0
11stst Derivation of Perspective (1)Derivation of Perspective (1)
xp : x = dp : (dp z)x
y
zdp
xp
Pp z
x
P(x,y,z)
(0,0,zprp)
xp =
xdp
dpz yp =ydp
dpz zp = 0
1. forzvp = 0
7/30/2019 3D Viewing 2
9/10
Copyright of most images by Computer Graphics C Version Hearn D. & Baker M.P. Computergraphik @ TU Wien
z=zvp
11stst Derivation of Perspective (2)Derivation of Perspective (2)
xp : x = dp : (zprp- z)
xp
Pp z
x
P(x,y,z)(0,0,zprp)
2. forzvp 0
xp =xdp
zprpz yp =ydp
zprpz zp = zvp
x
y
z
dp
Copyright of most images by Computer Graphics C Version Hearn D. & Baker M.P. Computergraphik @ TU Wien
22ndnd Derivation of Perspective (1)Derivation of Perspective (1)
uzzzz
yuyy
xuxx
prp)(
zz
zzuzz
prp
vp
vp =
perspective
projection of apoint P (x,y,z)
to position
(xp, yp, zp) on
the view plane
(x,y,z) any point on line for0 u 1
u=0 u=1
Copyright of most images by Computer Graphics C Version Hearn D. & Baker M.P. Computergraphik @ TU Wien
22ndnd Derivation of Perspective (2)Derivation of Perspective (2)
= zz dyzz zzyy prp pprp vpprpp
=xpvpprpp zzd
zz
zzu
prp
vp =x xu = x (1 u)
zzd
xprp
p
zz
zzx
prp
vpprp=xp
Copyright of most images by Computer Graphics C Version Hearn D. & Baker M.P. Computergraphik @ TU Wien
h 1 !!!
22ndnd Derivation of Perspective (3)Derivation of Perspective (3)
p
prp
dzz
h =
hy
hx
h
h
/y
/x
p
p ==
1//100
)/(/00
0010
0001
z
y
x
dzd
dzzdz
h
z
y
x
pprpp
pprpvppvph
h
h
h 1 !!!
7/30/2019 3D Viewing 2
10/10
Copyright of most images by Computer Graphics C Version Hearn D. & Baker M.P. Computergraphik @ TU Wien
Perspective Projection PropertiesPerspective Projection Properties
special cases: zspecial cases: zvpvp=0 or z=0 or zprpprp=0=0
parallel lines parallel to view planeparallel lines parallel to view plane
parallel linesparallel lines
parallel lines not parallel to view planeparallel lines not parallel to view plane
converging lines (vanishing point)converging lines (vanishing point)
lines parallel to coordinate axislines parallel to coordinate axis
principal vanishing point (one, two or three)principal vanishing point (one, two or three)
Copyright of most images by Computer Graphics C Version Hearn D. & Baker M.P. Computergraphik @ TU Wien
Vanishing PointsVanishing Points
perspective views & principle vanishing pointsof a cube for various orientations of the viewplane relative to the principle axes of the object
1-point persp. proj. 2-point persp. proj.