CS-184: Computer Graphics
Lecture #7: BSP and AABB Trees
Brandon Wang and Prof. James O’Brien University of California, Berkeley
V2013-S-07-1.0
Announcements
Assignment 2: Soon...
2
CS-184: Computer Graphics Lecture #7: BSP and AABB Trees Brandon - - PowerPoint PPT Presentation
CS-184: Computer Graphics Lecture #7: BSP and AABB Trees Brandon Wang and Prof. James OBrien University of California, Berkeley V2013-S-07-1.0 1 Announcements Assignment 2: Soon... 2 2 Sunday, February 24, 13 BSP-Trees Binary Space
Brandon Wang and Prof. James O’Brien University of California, Berkeley
V2013-S-07-1.0
2
3
4
a,b,c,d,e,f,g
a b c d e g f
5
a b,c1,d c2,e,f,g
a b c1 d e g f c2
6
a b c2,e,f,g c1 d
a b c1 d e g f c2
7
a b c2 c1 d e1 ,f e2 ,g
a b c1 d g f c2 e1 e2
8
a b c2 c1 d e1 e2 ,g f
a b c1 d g f c2 e1 e2
9
a b c2 c1 d e1 e2 f g
a b c1 d g f c2 e1 e2
+
+ + + + +
10
11
a b c2 c1 d e1 e2 f g
a b c1 d g f c2 e1 e2
c1:b:d:a:f:e1:c2:g:e2
12
g:e2:c2:f:e1:a:c1:b:d
a b c2 c1 d e1 e2 f g
a b c1 d g f c2 e1 e2
For ray in camera image[pixel] = Trace(ray)
t_hit = infinity For object in scene t_hit = min(object.intersect(ray), t_hit) shade at t_hit possible calls to Trace(new_ray)
13
For ray in camera image[pixel] = Trace(ray)
t_hit = infinity For object in scene t_hit = min(object.intersect(ray), t_hit) shade at t_hit possible calls to Trace(new_ray)
14
For ray in camera image[pixel] = Trace(ray)
t_hit = infinity For object in scene t_hit = min(object.intersect(ray), t_hit) shade at t_hit possible calls to Trace(new_ray)
15
16
17
18
19
Why would we do this?
20
21
22
23
24
25 26
Robot L.Foot RFoot Head L.Arm R.Arm L.Leg R.Leg Torso Mouth L.Eye R.Eye Head Shape Leg Shape Leg Shape
One of many variations
Head Shape B.Box Geometry Scale 2x Transformation XF B.Box
27
Robot L.Foot RFoot Head L.Arm R.Arm L.Leg R . L e g Torso Mouth L.Eye R.Eye Head Shape Leg Shape Leg Shape
One of many variations
XF B.Box Children Rot -25 Transformation Head Union B.Box XF B.Box
28
Robot L.Foot RFoot Head L.Arm R.Arm L.Leg R . L e g Torso Mouth L.Eye R.Eye Head Shape Leg Shape Leg Shape
One of many variations
29
One of many variations
Robot L.Foot RFoot Head L.Arm R.Arm L.Leg R.Leg Torso Mouth L.Eye R.Eye Head Shape Leg Shape Leg Shape
Robot L.Foot RFoot Head L.Arm R.Arm L.Leg R.Leg Torso Mouth L.Eye R.Eye Head Shape Leg Shape Leg Shape
30
One of many variations
31
One of many variations
Robot L.Foot RFoot Head L.Arm R.Arm L.Leg R.Leg Torso Mouth L.Eye R.Eye Head Shape Leg Shape Leg Shape Robot L.Foot RFoot Head L.Arm R.Arm L.Leg R.Leg Torso Mouth L.Eye R.Eye Head Shape Leg Shape Leg Shape
32
One of many variations
33
One of many variations
Robot L.Foot RFoot Head L.Arm R.Arm L.Leg R.Leg Torso Mouth L.Eye R.Eye Head Shape Leg Shape Leg Shape Robot L.Foot RFoot Head L.Arm R.Arm L.Leg R.Leg Torso Mouth L.Eye R.Eye Head Shape Leg Shape Leg Shape
34
One of many variations
35
36
37
38