This preview shows pages 1–4. Sign up to view the full content.
10/15/2009
1
RAY TRACING
Ray Tracing
10/15/2009
2
03
‐
Ray Tracing
Internet Raytracing Competition
±
http://www.irtc.org/
SeptemberOctober 2006
10/15/2009
3
03
‐
Ray Tracing
Virtual Camera Definition
View
direction
Virtual
Camera
Model
1.
The camera location
2.
view or gaze direction
3.
Orientation of camera relative
to the object
4.
Frustum.
10/15/2009
4
03
‐
Ray Tracing
View Specification
View Specification:
Eye
location of eye point
At
a point along view direction vector
Up
a vector defining an arbitrary vector that
will remain upright after projection to view
plane
Z
w
u
v
e
Y
X
10/15/2009
5
03
‐
Ray Tracing
Location and Orientation (vectors):
Eye
location of eye point
At
a point along view direction vector
Up
a vector that helps defining the Y axis
Viewing Extent
‐
User
Parameters
Shape (scalars):
fov
field of view angle
aspect
view plane aspect ratio
near
perpendicular distance to near plane
far
perpendicular distance to far plane
At
Up
Eye
aspect =
width / height
near
far
fov
10/15/2009
6
03
‐
Ray Tracing
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document 10/15/2009
2
Location and Orientation (vectors):
Eye
location of eye point
At
a point along view direction vector
Up
a vector that helps defining the Y axis
Viewing Extent
‐
User
Parameters
Shape (scalars):
fov
field of view angle
aspect
view plane aspect ratio
near
perpendicular distance to near plane
far
perpendicular distance to far plane
At
Up
Eye
aspect =
width / height
near
far
fov
height
aspect
width
fov
near
height
×
=
⎟
⎠
⎞
⎜
⎝
⎛
×
×
=
2
tan
2
10/15/2009
7
03
‐
Ray Tracing
Location and Orientation (vectors):
Eye
location of eye point
At
a point along view direction vector
Up
a vector that helps defining the Y axis
‐
At
Eye
−
Shape (scalars):
fov
field of view angle
aspect
view plane aspect ratio
near
perpendicular distance to near plane
far
perpendicular distance to far plane
At
up
Eye
aspect =
width / height
near
far
fov
u
w
v
w
up
w
up
u
At
Eye
w
×
=
×
×
=
−
=
10/15/2009
8
03
‐
Ray Tracing
Ray Tracing Algorithm
±
Define a ray from Camera through a pixel
±
Intersect ray with world to find a point of
visible along the ray (if exists)
±
ComputerColor for the visible point.
10/15/2009
9
03
‐
Ray Tracing
How to define a Ray?
Line Segment
: Defined by 2 end points.
P
1
P
2
P
P = (1 t ) P
1
+ t P
2
where
t = 0 to 1
Ray
: Defined by a point and a direction.
P = (1 t ) P
1
+ t P
2
where
t > 0
P
1
P
2
P
P = P
1
+ t (P
2
P1)=P
1
+ t
d
10/15/2009
10
03
‐
Ray Tracing
Ray Casting
V
top
W
U
eye
How to compute the coordinate of pixel(i,j) ??
left
right
bottom
Raster[nRows][nCols]
10/15/2009
11
03
‐
Ray Tracing
V
top
Compute camera coordinate axes: U, V, W
U
eye
How to compute the coordinate of pixel(i,j) ??
left
right
bottom
Raster[nRows][nCols]
10/15/2009
12
03
‐
Ray Tracing
10/15/2009
3
Image Pixels
Camera Coordinate of the bottomleft Corner:
V
top
u
v
w
e
*
2
*
2
)
(
*
r
width
height
nea
−
−
+
W
U
eye
left
right
bottom
w
Raster[nRows][nCols]
10/15/2009
13
03
‐
Ray Tracing
V
top
Camera Coordinate of pixel(
0,0
):
v
w
e
*
*
2
1
2
*
r
⎟
⎠
⎞
⎜
⎝
⎛
−
−
−
nRows
height
height
nea
W
U
eye
left
right
bottom
u
*
*
2
1
2
⎟
⎠
⎞
⎜
⎝
⎛
−
−
nCols
width
width
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
This is the end of the preview. Sign up
to
access the rest of the document.
This note was uploaded on 08/22/2010 for the course CAP 6701 taught by Professor Staff during the Spring '10 term at University of Central Florida.
 Spring '10
 Staff

Click to edit the document details