1
Ray Tracing
2
Ray Tracing
Ray Tracing kills two birds with one stone:
Solves the Hidden Surface Removal problem Evaluates an improved global illumination model
⌧shadows ⌧ideal specular reflections ⌧ideal specular refractions
Ray Tracing 1 Ray Tracing Ray Tracing kills two birds with one - - PDF document
Ray Tracing 1 Ray Tracing Ray Tracing kills two birds with one stone: Solves the Hidden Surface Removal problem Evaluates an improved global illumination model shadows ideal specular reflections ideal specular refractions
1
2
⌧shadows ⌧ideal specular reflections ⌧ideal specular refractions
3
4
5
1
i i
n r a a att p d i s i i
=
=
i n i s i d p att i a a r
i i
6
s s I
t t I
t t s s i n i s i d p att i a a r
i i
=
7
8
9
10
11 12
13
14
15
16
( ) ( ) ( ) ( )
x x x y y y z z z
R t O tD R t O tD R t O tD R t O tD = + = + = + = +
) , , ( = + + +
z z y y x x
tD O tD O tD O f
17
z z z y y y x x x
tD O t R tD O t R tD O t R tD O t R + = + = + = + = ) ( ) ( ) ( ) (
O D N ( , , ) ( ) ( ) ( ) ( ) ( )
x y z x x x y y y z z z x x y y z z x x y y z z x x y y z z x x y y z z
f x y z N x N y N z d N O tD N O tD N O tD d N D N D N D t d N O N O N O d N O N O N O t N D N D N D = + + + = + + + + + = − + + = − + + + + + + = − + +
18
O D
2 2 2 2 2 2
( , , ) 1 ( ) ( ) ( ) 1 ...
x x y y z z
f x y z x y z O tD O tD O tD = + + − + + + + + = C R
19
= ) , ( ) , ( ) , ( ) , ( v u z v u y v u x v u S
20
( , ) ( , ) ( , ) ( , ) ( , ) ( , ) ( , ) ( , ) ( , )
x x u v
y u v
z u v
tD x u v x u v x u v x O tD y u v u y u v v y u v y O tD z u v z u v z u v z + + = = + + +
21
22
23
⌧Adaptive recursion depth control
⌧Faster intersection calculations ⌧Fewer intersection calculations
⌧beams ⌧cones ⌧pencils
24
25
26
⌧Uniform grids ⌧Octrees ⌧BSP-trees ⌧Hybrids
⌧The light buffer ⌧Ray classification
27
spheres bounding boxes bounding slabs
Clipping acceleration Collision detection
28
29
30
Procedure Procedure IntersectBVH(ray IntersectBVH(ray, node) , node) begin begin if if IsLeaf(node IsLeaf(node) ) then then Intersect(ray, node.object) Intersect(ray, node.object) else if else if IntersectBV(ray,node.boundingVolume IntersectBV(ray,node.boundingVolume) ) then then foreach foreach child of node do child of node do IntersectBVH(ray IntersectBVH(ray, child) , child) endfor endfor endif endif end end
31
32
33
34
35
36
37