Vlastimil Havran, Jiri Bi ttner: LCTS: Ray Shooting using Longest Common Tra versal Sequences 1 LCTS: Ray Shooting using Longest Common Traversal Sequences Vlastimil Havran , Jiří Bittner [email protected]Dept. of Computer Science Czech Technical University in Prague Department of Computer Science and Engineering Computer Graphics Group http://www.cgg.cvu t.cz
24
Embed
LCTS: Ray Shooting using Longest Common Traversal Sequences
Computer Graphics Group. Department of Computer Science and Engineering. http://www.cgg.cvut.cz. LCTS: Ray Shooting using Longest Common Traversal Sequences. Vlastimil Havran , Jiří Bittner havran @fel.cvut.cz Dept. of Computer Science Czech Technical University in Prague. Outline. - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Vlastimil Havran, Jiri Bittner: LCTS: Ray Shooting using Longest Common Traversal Sequences
1
LCTS: Ray Shooting using Longest Common Traversal Sequences
Dept. of Computer Science Czech Technical University
in Prague
Department of Computer Science and Engineering
Computer Graphics Group
http://www.cgg.cvut.cz
Vlastimil Havran, Jiri Bittner: LCTS: Ray Shooting using Longest Common Traversal Sequences
2
Outline
1) Introduction (ray shooting, BSP tree)
2) Key Idea of LCTS
3) Simple LCTS
4) Hierarchical LCTS
5) Improvements for LCTS
6) Application and Results
7) Conclusions and Future Work
Vlastimil Havran, Jiri Bittner: LCTS: Ray Shooting using Longest Common Traversal Sequences
3
A B
D
Cray
1) Introduction - ray shooting
Given a ray, find out the first object intersected.
Input: a scene and a ray
Output: the object C
Vlastimil Havran, Jiri Bittner: LCTS: Ray Shooting using Longest Common Traversal Sequences
4
1) Introduction to BSP trees - construction
A
C
B
D
1 1
A
3
3CD
2
24
B C
4
x
y
Vlastimil Havran, Jiri Bittner: LCTS: Ray Shooting using Longest Common Traversal Sequences
5
L R
Left only
L R
Left, then right
L R
Right only
L R
Right, then left
Interior node of BSP tree
1) Introduction to BSP trees - recursive ray traversal algorithm
Vlastimil Havran, Jiri Bittner: LCTS: Ray Shooting using Longest Common Traversal Sequences
6
A B
D
D B
x
y
1) Introduction to BSP trees - recursive ray traversal algorithm
BSP tree:
Stack:
2
R R
L R
4
ray
A
L R
C1C
42
412
3
3
1
IntersectionfoundLeft | Right
Left
| Rig
h t
C2
Vlastimil Havran, Jiri Bittner: LCTS: Ray Shooting using Longest Common Traversal Sequences
7
1) Introduction to BSP trees - Efficiency of ray shooting
1) Decreasing number of ray-object intersection tests
2) Faster ray-object intersection tests
3) Decreasing number of traversal steps
4) Faster traversal step
Total ray shooting time = time for ray-object intersection tests + time for ray traversal of BSP tree
Vlastimil Havran, Jiri Bittner: LCTS: Ray Shooting using Longest Common Traversal Sequences
8
R2:
R1:
2) LCTS - MAIN IDEA
A
C
B
D
1
2
3
x
yB
2
1
A
3
1
B
3
C
2
A D
B
2
1
3
A
R1
R2
Ray origin
Vlastimil Havran, Jiri Bittner: LCTS: Ray Shooting using Longest Common Traversal Sequences
9
Traversal History for R1:
head
3) Simple LCTS = sequence of leaves
R1, R2:
A
C
B
D
1
2
3
x
y
B
2
1
3
A
R1
R2
Ray origin
SLCTS(R1, R2):
B
head
B A
tail
Traversal History for R2:
B A
A
tail
head tail
Vlastimil Havran, Jiri Bittner: LCTS: Ray Shooting using Longest Common Traversal Sequences
10
;
A
C
B
D
1
3
2
4
x
y
R1
R2
3) Simple LCTS - Problems
1) No common sequence of leaves exists.
2) When accessing SLCTS, object was not found, and traversal has to continue further.
R1
R2
x
y A
C
B
D
1
3
4
2
Vlastimil Havran, Jiri Bittner: LCTS: Ray Shooting using Longest Common Traversal Sequences
11
4) Hierarchial LCTS
Traversal History for R2:
Traversal History for R1:
A
C
B
D
1
2
3
x
y
R1
R2
Ray origin
1
B
3
C
2
A D
BC
1(R,L)
D
3(R,L)2(L)
BA
1(R,L)
D
3(R,L)2(R)
Vlastimil Havran, Jiri Bittner: LCTS: Ray Shooting using Longest Common Traversal Sequences
12
Traversal History for R2:
Traversal History for R1:
Common Traversal History for all rays between R1 and R2:
= HLCTS(R1, R2):
4) Hierarchial LCTS - contd.
A
1(R,L)
3(R,L)2(R)
1
B
3
C
2
A D
head
D B
tail
2(?)
C
1(R,L)
3(R,L)2(L)
D
DB
B
Matching two traversal histories into common one:
Vlastimil Havran, Jiri Bittner: LCTS: Ray Shooting using Longest Common Traversal Sequences
13
4) Hierarchical LCTS - contd.
1) Matching traversal histories for two or more rays.
2) Matching traversal histories for rays with the previously constructed common traversal history.
R1
R2
HLCTS1
R3HLCTS2
HLCTS1 - constructed from traversal history of R1 and R2
HLCTS2 - constructed from HLCTS1 and
traversal history of R3
Ray R3 - traversal uses HLCTS1
Vlastimil Havran, Jiri Bittner: LCTS: Ray Shooting using Longest Common Traversal Sequences
14
5) Further Improvements of LCTS concept
1) Unification of empty leaves.
2) Common termination object.
3) Initial leaf sequence.
Vlastimil Havran, Jiri Bittner: LCTS: Ray Shooting using Longest Common Traversal Sequences
15
head
Simplified LCTS(R1,R2):
2(?)
tail
2(?)
5) Unification of empty leaves
A
C
BD
1
2
3
x
y
R1
R2
Ray origin
45
head
LCTS(R1,R2):
tail
2(?)
=
Vlastimil Havran, Jiri Bittner: LCTS: Ray Shooting using Longest Common Traversal Sequences
16
5) Termination object
A
C
BD
1
2
3
x
y
R1
R2Ray origin
45 tail
head
Simplified LCTS(R1,R2):
C
= tailhead
More simplified LCTS(R1,R2):
CTermination object must be convex !
Vlastimil Havran, Jiri Bittner: LCTS: Ray Shooting using Longest Common Traversal Sequences
17
5) Initial Leaf Sequence - only for HLCTSUse: For matching common traversal sequence with new traversal history of ray.How: Initial leaf nodes of HLCTS need not be matched,but they are copied only.
R1
R2
HLCTS1
R3HLCTS2
Vlastimil Havran, Jiri Bittner: LCTS: Ray Shooting using Longest Common Traversal Sequences
18
A
C
B D
1
2
3
x
y
45
6) LCTS Application and Results
Application - where rays exhibit similarities.
2) Shooting between two patches.
1) Hidden Surface Removal
BA
Vlastimil Havran, Jiri Bittner: LCTS: Ray Shooting using Longest Common Traversal Sequences
19
ad 6) Application and Results - contd.
Hidden Surface Removal
Vlastimil Havran, Jiri Bittner: LCTS: Ray Shooting using Longest Common Traversal Sequences
20
SLCTS + two dimensions:
SLCTS
SLCTS + scanline:
SLCTS SLCTS
SLCTS
ad 6) Application and Results - contd.
Hidden Surface Removal: four methods - use of SLCTS and HLCTS - using LCTS concept in one or two dimensions
1 3 4 2 6 7 5 1
3 4
26
7
5
8 9
10 11 12
13
14
15 16
17 18 19
20 21 22
Vlastimil Havran, Jiri Bittner: LCTS: Ray Shooting using Longest Common Traversal Sequences
21
ad 6) Application and Results - contd.
- Number of traversal steps decreases typically by more than 60 %.
- Time devoted to ray shooting decreases typically by 20 %.
- Speedup achieved is scene and resolution dependent.
Vlastimil Havran, Jiri Bittner: LCTS: Ray Shooting using Longest Common Traversal Sequences
22
7) Conclusions and Further Work
- New concept of traversal coherence introduced. (not restricted to BSP tree only.)
- SLCTS and HLCTS.
- Hidden Surface Removal tested.
Vlastimil Havran, Jiri Bittner: LCTS: Ray Shooting using Longest Common Traversal Sequences
23
7) Further Work- automatic setting of image resolution for SLCTS.
- application for higher order rays in global illumination algorithms.
- other image sampling patterns for HLCTS in hidden surface removal.
- use of LCTS in rendering animation sequences.
Vlastimil Havran, Jiri Bittner: LCTS: Ray Shooting using Longest Common Traversal Sequences
24
Acknowledgements:
- Eduard Groeller and Jan Prikryl from Vienna University of Technology.
- Czech-Austrian scientific cooperation grant Aktion number 1999/17.
- IGP company for partially sponsoring my visit here.