RIT Scholar Works
Theses
Thesis/Dissertation Collections
1998
Evaluation of subdivision methods used in octree
ray tracing algorithms
Scott Brown
Follow this and additional works at:
http://scholarworks.rit.edu/theses
This Thesis is brought to you for free and open access by the Thesis/Dissertation Collections at RIT Scholar Works. It has been accepted for inclusion
in Theses by an authorized administrator of RIT Scholar Works. For more information, please contact
Recommended Citation
Computer Science Department
Evaluation of Subdivision Methods
used in Octree Ray Tracing Algorithms
by
Scott D. Brown
A thesis, submitted to
The Faculty of the Computer Science Department
in partial fulfillment of the requirements for the degree of
Master of Science in Computer Science
Approved by:
Professor Nan Schaller
Professor John Schott
Professor Stanislaw Radziszowski
used
in
Octree
Ray Tracing
Algorithms
Scott
D. Brown
ABSTRACT
Key
words:ray
tracing
optimization,
non-uniform spatialsubdivision, octree, octtree,
octree subdivision methods.The
non-uniformspatial subdivisiontechnique
refinedby
Andrew Glassner
[Glassner
1984]
minimizesfacet
intersection
tests
(i)
by
automatically generating
adensity
dependent
spatialhierarchy
offacet
regions(called
anoctree)
and(ii)
by
only
testing
facets
in
regionsalong
the
path ofthe
ray.Past
researchhas
addressed optimization of
the
octreeray
tracing
processby
separately
improving
both
the
octreetraversal
method andfacet
intersection
algorithms.This
author attemptedto
further
improve
the
overall approachby
attempting to
identify
new octree construction methodsthat
woulddecrease
the
number oftraversals
requiredto
renderthe
scene.This
researchfocused
onthe
subdivisiontechnique
usedin constructing
the
octree.The
conventionalGlassner
algorithm utilizes cubic octantsthat
can resultin
alarge
population ofempty
octants whenrendering
scenescontaining
localized
regions withhigh
facet
density.
Sparse
octrees(containing
significant numbers ofempty
octants)
werebelieved
to
hinder
performance ofthe
facet
traversal
algorithm.As
an alternativeto the
conventional cubicalgorithm,
the
performancebenefits
of non-cubic octants wereinvestigated.
Octrees
constructed with "rectangular" octants which moreclosely
bound
the
scene weretested
as one alternativeto
the
cubic octants method.As
a secondalternative, this
author proposed andimplemented
an "ideal-cut" subdivision algorithmthat
subdividesthe
parentoctantthrough
the
meanlocation
ofthe
facets
containedin the
octant.For
the
scenestested,
the
"conventional" cubic algorithm was shownto
performbetter
than
either alternativemethod,
although, it
was also shownto
sufferfrom
memory
and run-time explosions on some scenes.The
"rectangular"
octant algorithm
consistently
approachedthe
run-times producedby
the
"cubic"method.
Since,
the
"rectangular" methoddefaults
to
the
"cubic" methodfor
scenes with1:1:1
aspectratios, the
"rectangular"
method must
be
considered as a reasonable alternativein rendering
applications.The
"ideal-cut"
subdivision algorithm was shown
to
minimizethe
empty
octants and overall octreedepth,
however,
anincreased
numberoffacet
intersection
tests
were required.In
an attemptto
identify
the
algorithm or scenecharacteristics
that
gave riseto the
variationin
algorithmperformance,
anextensivecorrelation analysis was performed.However,
an a-priori scene characteristicto
automatically
selectthe
most efficient algorithmused in Octree Ray Tracing Algorithms
I, Scott D. Brown, hereby grant permission to the Wallace Library of the Rochester
Institute of Technology to reproduce my thesis in whole or in part. Any reproduction will
not be for commercial use or profit.
I
wishto thank
Nan
Schaller for
being
my
advisorduring
the
course ofthis
Thesis
andthe Independent
Study
that
startedthis
wholeproject,
but
mostly
for her
patienceto
comment onthe
many
revisions ofthis
document.
I
also wishto thank
Stanislaw Radziszowski for
bringing
his
knowledge
of computationalcomplexity
to
a computer graphics relatedthesis.
My
thanks
also goto
Pat Fleckenstein for
helping
medebug
my
original code.Finally,
my
sincerestthanks to
John
Schott for
supporting my
effortsto
completethis
degree
andfor his
Contents
1
Introduction
andBackground
1
1.1
Ray Tracing
Optimizations
1
1.2
Octree Creation
andRay Tracing
3
1.3
Preliminary
Observations
7
1.4
Statement
ofHypothesis
9
1.5
Summary
ofOctant Subdivision Methods
9
1.5.1
The Conventional Algorithm
10
1.5.2
The Rectangular
Octant Algorithm
10
1.5.3
The
Ideal
Octant Algorithm
11
1.6
Statement
ofWork
12
1.6.1
Implementation
12
1.6.2
Data Creation
12
1.6.3
Data Analysis
12
2
Implementation
13
2.1
Conventional Subdivision Algorithm
13
2.2
Ideal
Cut Subdivision Algorithm
14
3
Results
andAnalysis
1'
3.1
Test Results
17
3.1.1
Statistical Scene #1
18
3.1.2
Statistical Scene #2
21
3.1.3
Statistical Scene #3
23
3.1.4
Geometric Scene
26
3.1.5
Bomber Scene
28
3.1.6
Forest
Scene
30
3.1.7
Terrain
Scene
32
3.1.8
Fighter
Scene
34
3.1.9
Urban
Scene
36
3.2
General Analysis
38
3.2.1
Run-Time Performance
38
3.2.2
Octree Build Time
andMemory
Usage
38
3.3
Correlation Analysis
40
3.3.1
Octree Size
versusRun-Time
43
3.3.2
Octree Size
versusOctant Traversal
45
3.3.3
Octree Size
versusFacet Intersection Tests
49
3.3.4
Empty
Octant Population
versusRun-Time
51
3.4
Predicting
the
Best
Algorithm
54
3.4.1
Using
scene size54
4
Conclusions
andRecommendations
57
4.1
Algorithm
Summary
57
4.2
Automatic Algorithm Selection
58
4.3
Future Work
58
A
libRT Design Document
59
A.l
Abstract
59
A.2
Introduction
60
A.2.1
Project Justification
60
A.2.2
Ray Tracing
Basics
61
A. 3
Implementation Description
64
A.3.1
Supporting
Data Types
64
A.3.2
Object Storage
66
A.
3.3
Octree Creation
66
A.3.4
Ray Tracing
69
A.3. 5
Round-off
andPrecision
Strategy
73
B
Source Code
75
B.l
CreateJDctree
75
B.2
RT_0ptimize_0ctant
79
B.3
RT_Sort_Facet
83
B.4
RT_Find_0ctant
86
B.5
RT.Add_Facet_To_Octant
87
B.6
RT_Create_Sub_Octants89
95
C
make_sceneDesign
Document
95
C.l
Introduction
95
C.2
Program Definition
Qfi
C.2.1
Include Files
C.2.2
Constant
Definitions
C.2.3
Type
Definitions
97
C.2.4
Internal Function Prototypes
98
C.3
Main
Routine
"
C.3.1
Declarations
"
C.3.2
Reading
the
Input
File
"
C.3.3
Generating
the
Scene
10
C.3.4
Outputting
the
sceneto
afile
100
C.4
Constructing
aFacet
Distribution
101
C.4.1
Computing
the
Facet Vertices
102
C.4.2
Rotating
the
Facet
102
C.4.3
Translating
the
Facet
103
C.4.4
Computing
the
Facet Normal
103
C.4.5
Adding
the
Facet
Attributes
103
C.5
Support
Routines
103
C.5.1
Random Number Generation Routine
104
C.5. 2
Facet Rotation Routine
105
C.5.3
Facet Translation Routine
107
C.5.4
Facet Normal
Computation Routine
108
C.6
Input File
112
C.6.1
Example Input File
112
C.6.2
TAG Definitions
113
C.6.3
Input File
Reading
Routine
114
D
User's Guide
121
D.l
Introduction
121
D.2
Basic Data Types
121
D.3
Object Storage
122
D.4
Octree Creation
122
D.5
Ray Tracing
123
D.6
Prototypes for
User
Accessible Functions
124
D.7
Basic
Code Example
126
List
Figures
1.1
A 2-dimensional
example of a userdefined
bounding
box
hierarchy
and aray
being
traced
through the
scene2
1.2
A
2-dimensional
example of spatialsubdivisionbased
onfacet
density
and aray
being
traced
through the
scene3
1.3
Creating
an octreefor
efficientray
tracing
4
1.4
Utilizing
an octreeto
performray
tracing
6
1.5
Case A
requirestwo
octantsto
be
traversed
andfive facets
to
be
checked as opposedto
oneoctant and
three
facets
in
Case B
8
1.6
Additional facet
intersection
tests
are performedin
Case
B
that
are avoidedin
Case A
. . . .9
1.7
A 2-dimensional
example ofthe
conventional spatial subdivisionutilizing
cubic octants. ...10
1.8
A 2-dimensional
example ofthe
spatial subdivisionutilizing
non-cubic octants11
1.9
A
2-dimensional
example ofthe
spatial subdivisionutilizing
"ideal-cut" octants11
3.1
Image
ofthe
"Stat
#1"scene
18
3.2
Image
ofthe
"Stat
#2"scene
21
3.3
Image
ofthe
"Stat
#3"scene
23
3.4
Image
ofthe
"Geometric" scene26
3.5
Image
ofthe
"Bomber" scene28
3.6
Image
ofthe
"Forest" scene30
3.7
Image
ofthe
"Terrain" scene32
3.8
Image
ofthe
"Fighter"scene
34
3.9
Image
ofthe
"Urban" scene36
A.l
Sources
ofinvocation
for
the ray
tracer
library
60
A.2
A
2D
example of a userdefine
bounding
box
hierarchy
and aray
being
traced through the
scene.
62
A. 3
A
2D
example of spatial subdivisionbased
onfacet
density
and aray
being
traced through
the
scene63
A.4
The
coredata
structures usedin libRT.
65
A.
5
Creating
an octreeusing
aSpatial
Sorting
Algorithm
67
A. 6
A
2D
representation ofthe
four
tests
scenarios usedin the
facet-box
intersection
algorithm. .69
A.
7
Ray
tracing
withthe
use of anoctree70
A.8
The
ray
tracing
interface
to
libRT
71
A. 9
A
2D
representation of a"false
termination"List
Tables
3.1
Summary
of profiler outputfor
the
"Stat
#1"scene
19
3.2
Summary
of profiler outputfor
the
"Stat
#2"scene
22
3.3
Summary
of profiler outputfor
the
"Stat
#3"scene
24
3.4
Summary
of profiler outputfor
the
"Geometric" scene27
3.5
Summary
of profiler outputfor
the
"Bomber" scene29
3.6
Summary
of profiler outputfor
the
"Forest" scene31
3.7
Summary
of profiler outputfor
the
"Terrain" scene33
3.8
Summary
of profiler outputfor
the
"Fighter"scene
35
3.9
Summary
of profiler outputfor
the
"Urban" scene37
3.10
Average
time
and rankingstaken
to
renderthe
test
scenes38
3.11
Average
time
and rankingstaken to
constructthe
octree39
3.12
Average
rankingsbased
on size ofthe
octree40
3.13
An
example correlation computation41
3.14
Analysis
of correlationbetween
total
octree size and run-time performance44
3.15
Analysis
of correlationbetween
the total
octree size andthe
number of octanttraversals
performed
46
3.16
Analysis
of correlationbetween
the
number of octanttraversals
andthe
total
run-time ....48
3.17
Analysis
of correlationbetween
total
octree size andthe
number offacet
intersection tests
performed
50
3.18 Analysis
ofcorrelationbetween
octanttraversals
andempty
octant population52
3.19 Analysis
of correlationbetween
empty
octant population and run-time performance53
3.20
Correlation
between
scenesize andthe
fastest
algorithm54
Introduction
and
Background
1.1
Ray Tracing
Optimizations
Ray
tracing
is
a popularrendering
methodbecause
it
simulatesthe
physics ofimage formation:
rays castfrom
the
simulated camerafind
the
sources of photonsthat
wouldenter a real camera.Using
simple vectormathematics,
sources of reflections and shadows can alsobe
identified
andincorporated.
In
a minimalalgorithm,
facet
intersection
tests
mustbe
performed onevery
objectin
the
sceneto
correctly
identify
the
closest surfacealong
the the
ray.For large
scenes,
this
linear
searchbecomes
computationally
significant.As
aresult,
muchofthe
researchin
the
ray
tracing
community is
focused
on strategiesto
minimizethe
number ofintersection
tests
required perray
trace.
A
multi-levelbounding
box
algorithmis commonly
utilizedto
minimizethe
number offacet intersection
tests
(see Figure
1.1)
[Clark
1976,
Rubin
andWhitted
1980,
Weghorst
et al.1984].
The
ray
being
traced
is
tested
for
intersection
withall ofthe
bounding
volumes atthe
top
ofthe
hierarchy.
If
the
ray intersects
avolume,
then
further
intersection
tests
mustbe
performed onthe
sub-volumes orfacets
containedby
the
volume.If
the ray
does
notintersect
the volume, then
it
canbe
assumedthat
intersection
withany
facets
withinthe
volumeis
impossible,
andthose tests
canbe
avoided.The
burden
ofconstructing
the
bounding
box
hierarchy
is usually
placed onthe
user, requiring
additionalplanning
and effortto
create scenes.Although
this
strategy
does
minimizeintersection
tests
whencomparedto the
global searchapproach, it
has
severallimitations:
The
usermay
define
"poor"Figure
1.1:
A
2-dimensional
example ofa userdefined
bounding
box
hierarchy
andaray
being
traced through
the
scene.The
orderthat
bounding
box intersection
tests
are performedis
not optimal.Because
there
is
not aspatial
ranking
based
ondistance from
the
ray origin,
allboxes
mustbe
checkedat a givenlevel in
the
hierarchy.
To
avoidthese
limitations,
a non-uniform spatial subdivision[Glassner
1984]
algorithm canbe
used.This
algorithm
systematically
subdividesthe
sceneinto
axis alignedboxes
or octantsbased
onfacet
density
-regionscontaining
morefacets
are subdividedinto
smalleroctantsto
minimizethe
number ofintersection
tests
required per octant(see
Figure
1.2).
The
resulting
data
structureis
a spatialhierarchy
ofbounding
boxes,
called an octree.The
depth
ofthe
octreeis
limited
only
by
the
amount of physical memory.However,
asit
willbe described
later,
the
depth
ofthe
octreedoes
effectthe
computationalefficiency
ofthe
algorithm.In general,
the
octree algorithmis
more efficientthan the
userdefined
hierarchy
algorithm asit
addressesmany
limitations
ofthe
later:
The
construction ofthe
octreeis automated,
and requires minimaloverhead at run-time ratherthan
during
the
scene construction process.The
number offacets
containedin
each octantis
bounded
by
a userdefined
threshold
and octantsneveroverlap.
Octants
areprogressively
examinedbased
ondistance from
the
origin ofthe
ray.Once
anintersection
[image:17.551.181.373.79.230.2]1=
I
*<-*S
/~
"^
\
)
\
T^
-s \ x^r
W
JN.
4
Figure
1.2:
A 2-dimensional
example of spatial subdivisionbased
onfacet
density
and aray
being
traced
through the
scene.1.2
Octree Creation
and
Ray Tracing
The
spatial subdivision ofthe
sceneinto
an octreeis
the
requiredpreprocessing
stagethat
makesthe
runtime
tracing
ofthe
scene more efficientthan
many
conventionalray
tracing
techniques.
Upon
completion ofthe
scene subdivisionphase,
eachleaf
node orleaf
octantin the
octree will contain alist
of allfacets
that
intersect the
spacedefined
by
that
octant.The
algorithmfor
building
the
octreeis
outlinedbelow
andis
illustrated in
Figure
1.3:
The base
ofthe
octree,
orthe
worldoctant,
is
constructedto
bound
all ofthe
objectsin
the
scene.The
octreeis
createdby
adding
eachfacet
in
the
sceneto the
octree.Starting
withthe
worldoctant,
eachfacet is
tested
against each sub-octantfor
intersection.
Each intersected
sub-octantthen
repeatsthis
intersection
test
for its
sub-octantsin
a recursivefashion. The
recursionterminates
when aleaf
octantis
found,
at which point a referenceto the
facet
is
addedto
that
octant'sfacet list.
All
sub-octants of an octant
intersected
by
the
facet
mustbe
examined sincethe
facet
may
extend over severalbranches
ofthe
octree.If
the
addition of afacet
to
aleaf
octant exceedsthe
userdefined
subdivisionthreshold then that
octant
is
split.To
split anoctant,
eight new sub-octants are allocated andthe
facets
containedby
the
original octant are sortedinto
eachofthe
newsub-octants.The splitting
ofleaf
octantscontinuesuntilall octants are
below
the
subdivisionthreshold.
[image:18.551.180.372.78.226.2]New
Facet
World
Octant
Spatial
Sorting
Algorithm
Current Octant
for
eachoctantYES
YES
Add facet
to list
O
0) >
3 O a rx
NO
Subdivision
Threshold
\
YES
[image:19.551.73.495.180.490.2]Reached
?
Split Octant
Once
the
octreehas been
constructedfor
a particularscene,
the
procedurefor
tracing
aray
proceeds asfollows
(see Figure
1.4):
Ifa
starting
leaf
octantis
notprovided,
then the
first leaf
octantalong
the
path ofthe
ray is
used asthe
starting
octant.The
ray is
tested
for
intersection
(a
hit)
with allthe
facets
within anoctant.To
identify
the
closesthit
to
the
ray origin,
allhits
are storedin
alist
sortedby
distance
from
the ray
origin.In
the
eventthat
nointersections
arefound
withinthe
currentoctant, the
next octantalong
the
path mustbe determined.
To
find
the
next octantalong
the
ray,
a search pointis
computedin
the
neighboring
octantalong
the
pathofthe
ray.First,
aray
/box
intersection
test
is
performedto
find
the
exit pointfrom
the
current octant[Haines
1991,
Kay
1986].
The
search pointis
half
the
size ofthe
smallestoctant perpendicularto
the
exitedface
ofthe
current octant.This
pointis
guaranteedto
be
withinthe
nextoctantwithoutskipping
the
smallest octant.The
search pointis
suppliedto
the
octree searchfunction
andthe
octantcontaining
the
pointis
identified
asthe
next octantalong
the
ray.The
process repeatsitself
untilafacet is
intersected
orthe ray
leaves
the
world octant.Input
Ray
Starting
Octant
Hit
List
[image:21.551.58.496.181.487.2]Return
closesthit
in List
1.3
Preliminary
Observations
The
performance ofthe
octreeray
tracing
methodis
dependent
upontwo
primary
operations:(i)
octreetraversal
(moving
from
the
current octantto the
nextalong
the
path ofthe
ray)
and(ii)
facet
intersection
tests.
Since facet
intersection
algorithmshave been
heavily
investigated [Badouel
1990,
Haines
1991],
this
research
focuses
onimproving
the
octreetraversal
aspect ofthe
algorithm.Specifically,
this
author attemptedto
identify
new octree construction methodsthat
woulddecrease
the
number oftraversals
requiredto
renderthe
scene.The
conventional octree subdivision method splitsthe
octantinto
eight(8)
sub-octants of equal size.If
the
facets
within an octant areextremely
localized,
one or more ofthe
sub-octants willbe
over populated and mustbe
splitagain,
further
increasing
the
octreedepth.
Since
the
octanttraversal
algorithm must navigate ahierarchical
tree,
deeper
octrees resultin
longer
traversal times.
When
over populated octants aregenerated,
the
remaining
sub-octants areusually sparsely
populated orpossibly
empty.This
resultsin
anincreased
probability
ofthe
searchfinding
anempty
octant(containing
nofacets
to
intersect
the
ray)
andrequiring
another searchto
be
started.Figure 1.5
illustrates
each ofthese
observations.Case A
illustrates
a scenario wherethe
conventional cubicoctant method cuts
the
parent octantthrough the
center.The
ray
tracing
algorithm searchesandidentifies
octant#1
asthe
next octantalong
the
path ofthe
ray,
finds
it empty,
performs another searchto
find
octant#2,
andthen
performsfive facet intersection
tests to
isolate
the
closestfacet. In Case
B,
the
parent octanthas been
cutin
aslightly
different
manner.In
this
case, only
one octant searchis
requiredandonly
three
facets
aretested
for
intersection
before
the
hit facet
is isolated.
These
additional computations wereavoided
because
the
parent octantin
Case B
was subdividedthrough the
averagefacet
location
ratherthan
through the
middle ofthe
octant.If
the
sub-octants usedin
this
example were constructedusing
the
Case
B methodology,
fewer
total
facets
wouldbe
examined(since
the
first
octantin
Case
B
containsfewer facets
Intersected
Facet
Intersected Facet
Ray
Octant #1
Octant
#2
Octant
#3
-5f-i
i
I
ID
Octant
#4
Parent Octant
A
Ray
Octant #1
Octant #3
Octant #2
D
Octant #4
D
Parent Octant
B
Figure
1.5:
Case A
requirestwo
octantsto
be
traversed
andfive facets
to
be
checked as opposedto
oneoctant and
three
facets
in
Case
B.
This
proposed subdivision methoddoes
notcomefree
of cost.The
samefacet
populationis
illustrated
againin
Figure
1.6,
however,
the
ray
to
be
traced
comesfrom
adifferent
direction.
In
this
scenario,
somefacets
are
tested
in
Case B
that
would otherwisebe
avoidedin
Case A.
However,
a changein
performanceis only
noticed whenstarting in
octants#1
and#3
with raysfrom
these
verticaldirections.
This
does
not affectthe
efficiency
whenstarting
witheither octant#2
or#4 from
any
direction.
Preliminary
data
showedthat
facet
intersection
tests
canbe 3
to
10
times
faster
than
octanttraversal
(depending
onthe
depth
ofthe
[image:23.551.77.470.80.312.2]Ray
Octant #1
Octant #2
!
D
D
1
?
1
?
D
Octant
#3
in
Octant
#4
V1?
Intersected Facet
Octant
#1
Octant
#3
Intersected Facet
Ray
D
Q
Octant #2
D
D
Octant
#4
D
?
Parent Octant
Parent Octant
A
B
Figure
1.6:
Additional facet intersection
tests
are performedin
Case B
that
are avoidedin
Case A
Since
the total
number offacets
is
constantfor
a givenscene,
octreesusing
fewer
octants willhave
ahigher
number of
facets
per octant.Although
the
average number offacet
intersections
per octantmay increase
slightly, it is
possibleto
save enoughtime
by
performing
fewer
andfaster
octanttraversals that the
resulting
overall run-timeimproves.
1.4
Statement
of
Hypothesis
This
authorhypothesized
that
a subdivision methodthat
attemptsto
distribute
the
facets
containedin
anoctant
equally
to
the
child octantsmay
be
more efficient.By
doing
so, it
wasbelieved
that
shalloweroctreeswould
be
produced,
decreasing
the
amount oftime
spenttraversing
the
octree.1.5
Summary
of
Octant Subdivision Methods
To
test this
hypothesis,
two
variations ofthe
cubic octant style wereimplemented
andtested.
The
example2-dimensional
facet distribution featured
in
Figure 1.7
-1.9
is
usedto
illustrate
the
[image:24.551.76.470.77.337.2]traversal
efficiency
ofthe
conventional algorithm and eachsubdivision variant.1.5.1
The Conventional Algorithm
Figure 1.7 depicts the
octree generated whenusing
the
conventional subdivision methoddescribed
by
Glass
ner
in
his
original paper.The
spatial subdivision ofthe
scenebegins
by
establishing
a cube shaped octantthat
bounds
the
entire scene.Since
this
subdivision methodbisects
filled
octants,
allsub-octantsderived
from
the
bounding
octant will alsohave
a1:1:1
aspect ratio.For the
facet
distribution in
Figure
1.7,
atotal
of10
octants(two
of which areempty)
are requiredusing
this
subdivision method and a subdivisionthreshold
of8
facets.
D D
D
0
n
DD
3 D 3 U 1
D
D D D D
DD
D
D
[image:25.551.185.364.250.430.2]s
s
Figure 1.7:
A
2-dimensional
example ofthe
conventional spatialsubdivisionutilizing
cubic octants.1.5.2
The Rectangular
Octant
Algorithm
The
first
variant usesnon-cubic,
or rectangular octants.In this
implementation,
the
worldoctantis
createdto
enclosethe
maximum extents ofthe
scene.All derived
sub-octants willfeature
the
same aspect ratio asthe
bounding
octant.Since
the
worldoctanttightly
wrapsthe
scene, the
authorhypothesized
that any
subsequent subdivisions will
have
ahigher
probability
ofseparating
localized
concentrations offacets
and wouldpossibly
avoidboth
overfilled andempty
octants(see Figure
1.8).
For
the
facet
distribution in
Figure
1.8,
atotal
of of7
octants(one
of whichis empty)
are requiredusing
IT ?
n
D^o
a?? a a
n n
a a ,? DUC
Figure
1.8:
A
2-dimensional
example ofthe
spatial subdivisionutilizing
non-cubic octants.1.5.3
The
Ideal Octant
Algorithm
The
third
variation splitsthe
octantthrough the
meanlocation
ofthe
facets
containedby
the octant,
andis
referredto
asthe
ideal-cut
algorithm.This
algorithm requiresmaintaining
the
meanlocation
offacets
contained
by
a given octant asthe
octantis
filled. To balance
the
population offacets
in
the sub-octants, the
parent octant
is
divided
through the
averagelocation
of allthe
facets
containedby
the
octant.Therefore,
every
facet
mustbe
sortedinto
the
octants at a givenlevel before
subdivision cantake
place(see
Figure
1.9).
The
sorting
approach usedby
the
ideal-cut
algorithm changedthe
design
ofthe
facet
sorting
aspect of octree construction sincethe
octant cannotbe
properly
cut untilthe
meanof allthe
facets
intersecting
the
octantis determined. In contrast,
the
previoustwo
algorithms can splitthe
octant oncethe
octanthas
reachedthe
subdivision
threshold.
The details
ofthe
octreecreationusing
the
ideal-cut
algorithmis
described
in detail
in
Chapter
2.
For
the
facet distribution
in
Figure
1.9,
atotal
of of4
octants(none
of which areempty)
are requiredusing
this
subdivision methodand a subdivisionthreshold
of8
facets.
'e
D
D
Figure
1.9:
A
2-dimensional
example ofthe
spatial subdivisionutilizing
"ideal-cut"
[image:26.551.186.368.80.149.2] [image:26.551.184.369.433.502.2]1.6
Statement
of
Work
1.6.1
Implementation
Although
the
octreeray
tracing
library
had
already
been
completed as part of anothereffort,
additionalmodificationswere made
during
the
course ofthis
research.Specifically,
these
modificationsincluded:
The
addition of countersto
keep
track
of(%)
the total
number ofoctants,
(ii)
the
number ofempty
octants and
(Hi)
the
average number offacets
per octant.Implementation
ofthe
"ideal-cut" subdivisionmethod.This
requiredkeeping
track
ofthe
dimensional
means offacets
intersecting
each octantfor
useduring
octantsubdivision,
andimplementing
the
newoctree creation algorithm which utilizes a
different
sorting
approach.Implementation
ofthe
pseudo-random scene generationtool to
createtest
scenes(see Appendix C).
The
details
ofthe
modifications requiredfor
this
researcharedescribed
in
Chapter
2.
1.6.2
Data Creation
The
modified subdivision methods were addedto the
libRT
ray
tracing
library. The
authorcurrently
has
this
library
installed
in the
DIRSIG
syntheticimage
generation model.DIRSIG
is
ahigh
radiometricfidelity
multi-spectral
rendering
environmentthat
can require100
-150
raysto
be
traced
for
each rendered pixel[Schott
et al.].The
three
different
octree algorithms(cubic
octants,
non-cubicoctants,
andideal-cut octants)
were eachtested
on nine(9)
test
scenes.Three
(3)
ofthe
test
scenes werestatistically
generatedto test the
variousstrengths ofeach subdivision algorithm.
The
remaining
six(6)
scenes werereadily
availableDIRSIG
scenes.A description
andrendering
of each sceneis
presented withthe
sceneby
scene analysisin
Chapter
3.
1.6.3
Data Analysis
All
ofthe
collecteddata
andresulting
analysis are presentedin
Chapter
3.
Important
run-time valuesfor
Implementation
The
researchin
this
effort addressedthe
performance ofthree
octant subdivisionmethods.This
chapterdescribes
the
implementation
differences between
the
creation of an octreeusing
eitherthe
"cubic" or"rect
angular"subdivision method and
the
"ideal-cut" subdivision method.It
shouldbe
pointedoutthat there
are nodifferences between
the
various algorithms with respectto the
ray
tracing
process.2.1
The Conventional Subdivision Algorithm
At
the
core ofthe
conventional "cubic"octree creation algorithm
is
a"spatial
sorting"algorithm
that
addsareference
to
any
leaf
octantthat
intersects
a givenfacet.
Pseudo-code for
this
recursivefacet
sorting
routineis
outlinedbelow:
RT.Sort
.Facet(
RT.OCTANT *octant, RT_FACET
*facet)
-C
if
(
Octant_Is_A_Leaf
(
octant)) {
RT_Add_Facet_To_Octant(
octant,
facet
)
}
else -[
foreach(
suboctant) {
if(
RT_Facet_Box_Intersect
(
suboctant,facet
)) {
RT.Sort
.Facet(
suboctant,facet
)
>
}
The
routineRT_Add_Facet_To_Octant
addsthe
facet
referenceto the
currentleaf
octant and checksif the
facet
countfor
that
octant exceedsthe
subdivisionthreshold.If
it
does,
the
octantis
splitinto
8
sub-octantsand all
the
facets
in
the
original octant are re-sortedinto
the
new sub-octants.The
additionoffacets
to
the
octreethen
continues.2.2
The Ideal
Cut
Subdivision Algorithm
The "ideal
cut"subdivision method must utilize a
slightly different
approachto
constructing
the
octree.To
ideally
cutthe
octant,
the
meanfacet
location
all ofthe
facets
intersecting
the
octantbe determined.
Therefore,
all ofthe
facets
intersecting
an octant mustbe
sortedinto
that
octantbefore
the
octant canbe
split.
In
contrast, the
"cubic"
and "rectangular"subdivision methods can split an octant once
the
threshold
is
reached,(a detailed
description
ofthe
conventional octree creation algorithm was presentedin
Section
1.2).
An
important
modificationto
the
spatialsorting
routine wasto maintaining
the
meanlocation
of allthe
facets
containedin
the
octant.The
computationofthe
meanlocation
does
notinclude
facets
that
extend pastthe
extents ofthe
octant.This is
because
this
algorithmattemptsto
splitup localized
facet
concentrationswithin
the
octant.The
algorithmfor
the
"ideal
cut"subdivision method can
be described
by
a simple recursive process.The
processis
seededby
adding
all ofthe
facets
in the
sceneto
the
world octant.If the
numberoffacets
in
the
current octant exceedsthe
subdivisionthreshold,
sub-octants are createdthat
cutthrough the
averagelocation
ofthe
facets
withinthe
octant.The facet
storage areain
the
sub-octants must
be
madelarge
enoughto
hold
all ofthe
facets
that
intersected
the
parent octant(a
worst case scenario).All
ofthe
facets
arethen
sortedinto
the
childoctants,
andthe
oldfacet list
is
de-allocated.
This
processis
repeatedfor
each sub-octant ofthe
octant.If
the
number offacets
in the
current octantdoes
not exceedthe
subdivisionthreshold,
then the
sizeThe
following
section contains pseudo-codefor
the
"ideal
cut"subdivision algorithm
previously described:
RT_0ptimize_0ctant(
RT.OCTANT
*octant)
{
if(
Octant.Is.OverfilledC
octant)) {
RT_Create_Sub_Octants(
octant,
octant->mean,
octant->sub_octants)
foreach(
facet
in
octant->facet_list) {
RT.Sort
.Facet( facet,
octant);
>
Free_Facet_List(
octant->facet_list);
foreach(
sub.octantin
octant->sub_octants) {
RT_0ptimize_0ctant(
sub.octant);
}
}
else
{
New_Facet_List(
octant->facet.count,
new.facet.list)
foreach(
facet
in
octant->facet_list){
Add.FacetC facet,
new.facet.list)
}
Free_Facet_List(
octant->facet_list);
octant->f acet.list =
new.facet.list;
}
}
Results
and
Analysis
3.1
Test Results
The
octreeray
tracer
was run on nine(9)
test
scenesto
compilethe
results presentedin
this
document.
The first
three
(3)
scenes consist of simple statisticaldistributions
offacets
generatedby
the
make_sceneutility
(see Appendix C). These
scenes werespecifically
constructedto
isolate
the
differences
in
the three
(3)
octant subdivision methodsbeing
studied.These
statisticalscenes present a significant challengeto
any
ray
tracing
algorithmbecause
they
consist ofextremely
dense
and uncorrectedfields
offacets.
The
remaining
scenes werereadily available,
"real-world" scenesthat this
authorfeels
representthe
size andcomplexity
offacetized
scenesthat
may
be
ofinterest to
peoplein
the
graphicsfield
today.
The
following
sub-sections summarizethe
data
collectedfor
each scene.Each
scene was run with each ofthe three
(3)
octant subdivisionvariants.Each
sectionincludes
abrief
description
ofthe scene,
an exampleimage
ofthe scene,
andthe
resultstabulated
from
the
profiler output.3.1.1
Statistical Scene
#1
Description
The
scene renderedin
Figure
3.1
wasspecifically designed
sothat
allthree
subdivision algorithms would perform similarly.The
sceneis
a cubeuniformly
filled
with5,000 facets
of various sizes and orientations.Figure
3.1:
Image
ofthe
"Stat
#1" scene.This statistically
generated scene was createdusing
the
following
parameters extracteddirectly
from
the
make_scene
input file:
DIST.ENTRY.BEGIN
TYPE
=UNIFORM
COUNT
=5000
AVERAGE.SIZE
=500.0
DELTA.SIZE
=250.0
AVERAGE.X
=0.0DELTA.X
=10000.0
AVERAGE.Y
=0.0DELTA.Y
=10000.0
AVERAGE.Z
=0.0DELTA.Z
=10000.0
[image:33.551.176.374.177.375.2]Total
number offacets
10,000
Performance
Metric
Octant Styles
Best
Performance
CUBE
RECT
IDEAL
Octree
build
time
5.51
5.51
4.83
IDEAL
Total
numberof octantsNumber
ofempty
octants2079
2
1855
0
1401
2
IDEAL
RECT
Fraction
ofempty
octants0.001
0.000
0.002
RECT
Number
of octant searchesOctant
searchtime
19,060,515
247.65
19,035,334
244.43
17,445,697
311.26
IDEAL
RECT
Number
offacets
tested
Facet
test time
217,494,289
885.97
217,412,595
894.25
252,524,941
1043.80
RECT
CUBE
Total
runtime
1860.11
1860.14
2104.24
CUBE
Table
3.1:
Summary
of profiler outputfor
the
"Stat
#1" scene.Observations
Table
3.1
summarizesthe
performance of each algorithmfor
this
scene.Since
the
scene consists of a squarecube
filled
withfacets,
the
worldoctantfor
allthree
algorithmsshouldbe
the
samesize,
thereby
minimizing
the
differences
between
the
CUBE
andRECT
algorithms.However,
the
size ofthe
octreesfor
these two
algorithms
is surprisingly
different. The
worldoctant size was verifiedto
be
only slightly
different
because
the
extents ofthe
randomly
generatedfacet
population was notexactly
a cube.This
smalldifference
wasfound
to
be
responsiblefor
this
ratherlarge difference
in
octree size.Although
the
octree sizes werevery
different,
the total time
spenton octreetraversal
only
changedby
approximately 1%. For
this
scene,
the CUBE
algorithm
had
the
best
run-time,
however,
the
run-timedifference between
the
CUBE
andRECT
algorithmsis
negligible.The
octree createdby
the
IDEAL
algorithm wasalsobound
by
a worldoctant of similar size.Since
the
facets
are
uniformly distributed
withinthe
worldoctant,
the IDEAL
should cutthe
octantsthrough the
middlein
the
same manner asthe CUBE
andRECT
algorithms.Instead,
the IDEAL
algorithm wasfound
to take
advantageof
localized
density
variations,
and most octants were not cutthrough the
middle.As
aresult,
this
method minimizedthe
number of octants requiredto
storethe
scene(using
significantly
less
octantsthan the
othertwo
methods).However,
the
overall performance ofthis
algorithm suffersbecause
the
lower
Summary
The
observations
for
this
scene canbe
summarized as:The
CUBE
andRECT
methods produced comparable results.The
IDEAL
method producedthe
smallest octreebut
tested
morefacets
than the
othertwo
algorithms.A
smalldifference
in the
extents ofthe
world octantfor
the CUBE
andRECT
methods resultedin
dramatically
different
octree sizes.This large difference
madeonly
a slight changein
the
efficiency
of3.1.2
Statistical Scene #2
Description
The
scene renderedin
Figure
3.2 is approximately
4,000
units per side and contains5,000
facets
ofvarioussizes and orientations.
The
density
offacets decreases
withdistance from
the
center ofthe
scenefollowing
a
Gaussian distribution.
Figure
3.2:
Image
ofthe
"Stat
#2" scene.This
scene was generatedusing
the
following
parameters extracteddirectly
from
the
make_sceneinput
file:
DIST.ENTRY.BEGIN
TYPE
=GAUSSIAN
COUNT
=5000
AVERAGE.SIZE
=500.0
DELTA.SIZE
=250.0
AVERAGE.X
=0.0DELTA.X
=4000.0
AVERAGE.Y
=0.0DELTA.Y
=4000.0
AVERAGE.Z
=0.0DELTA.Z
=4000.0
[image:36.551.175.378.186.391.2]Total
number offacets
10,000
Performance
Metric
Octant Styles
Best
Performance
CUBE
RECT
IDEAL
Octree
build
time
9.24
9.29
8.60
IDEAL
Total
number of octantsNumber
ofempty
octants2121
30
2142
26
2248
0
CUBE
IDEAL
Fraction
ofempty
octants0.014
0.012
0.000
IDEAL
Number
of octant searchesOctant
searchtime
17,683,759
258.43
17,549,407
255.60
17,206,180
345.21
IDEAL
RECT
Number
offacets
tested
Facet
test time
177,663,948
757.66
174,518,591
746.85
226,710,241
986.01
RECT
RECT
Total
runtime
1636.26
1617.21
2023.31
RECT
Table
3.2:
Summary
of profiler outputfor
the
"Stat
#2" scene.Observations
Table
3.2
summarizesthe
performance of each algorithmfor
this
scene.Because
ofthe
extents andthe
distribution
offacets,
the CUBE
andRECT
algorithms subdividedthis
scene almostidentically,
resulting in
similar counts andtimes
for
almostevery
parameter profiled.The
IDEAL
algorithm wasdesigned
to
minimize octree sizein
this
very case,
however,
this
algorithm created alarger
octreethan
the
othertwo
methods.This
author suspectsthat
the
unforeseen weaknessin
this
algorithmis
that the
splitting
through
the
mean point "cuts"through
alarge
number offacets.
All
cutfacets
mustbe
assignedto
allthe
octantsthat
they
overlap, resulting in the
higher
average number offacets
peroctantto test
andincreased
octree subdivision(since
the
subdivisionthreshold
will reached more often).Summary
The
observationsfor
this
scene canbe
summarized as:The CUBE
andRECT
methods produced comparable results.3.1.3
Statistical Scene
#3
Description
The
scene renderedin
Figure 3.3
is
a cubeapproximately
10,000
units per sidecontaining
uniformly
dis
tributed
facets
of various sizes and orientations.There is
a region ofhigher
density
in
the
upper-right ofthe image
wherethe
density
offacets decreases
withdistance
from
a center pointfollowing
aGaussian
distribution.
Figure
3.3:
Image
ofthe
"Stat
#3" scene.This
statistically
generated scene was createdusing
the
following
parameters extracteddirectly
from
the
make_scene
input
file:
DIST.ENTRY.BEGIN
TYPE
=UNIFORM
COUNT
=7500
AVERAGE.SIZE
=200.0
DELTA.SIZE
=100.0
AVERAGE.X
=0.0DELTA.X
=10000.0
AVERAGE.Y
=0.0 [image:38.551.173.380.199.412.2]AVERAGE.Z
=0.0DELTA.Z
=10000.0
DIST.ENTRY.END
DIST.ENTRY.BEGIN
TYPE
=GAUSSIAN
COUNT
=2500
AVERAGE.SIZE
=200.
DELTA.SIZE
=100.0
AVERAGE.X
=1000.0
DELTA.X
=2000.0
AVERAGE.Y
=1500.0
DELTA.Y
=2000.0
AVERAGE.Z
=2800.0
DELTA.Z
=2000.0
DIST.ENTRY.END
Total
number offacets
10,000
Performance
Metric
Octant Styles
Best
Performance
CUBE
RECT
IDEAL
Octree build
time
7.82
7.35
7.33
IDEAL
Total
numberof octantsNumber
ofempty
octants2338
9
1918
1
1758
0
IDEAL
IDEAL
Fraction
ofempty
octants0.0004
0.0005
0.0000
IDEAL
Number
of octant searchesOctant
searchtime
23,906,057
339.21
21,328,349
298.58
19,848,130
399.06
IDEAL
RECT
Number
offacets
tested
Facet
test time
214,702,670
942.95
246,469,375
1074.57
298,193,826
1301.30
CUBE
CUBE
Total
runtime
2087.26
2178.83
2576.34
CUBE
Table
3.3:
Summary
of profiler outputfor
the
"Stat
#3" scene.Observations
The summary
of resultsin
Table 3.3 indicates
that the
CUBE
algorithm performedthe
best.
The
CUBE
algorithm created
the
largest
octree and performedthe
largest
number of octanttraversals,
but
performedrun-time.
The
resultsfrom
this
sceneamplify
the
balance
requiredbetween
octant traversaltime
andfacet
intersection
time to
achievethe
fastest
run-time.Summary
The
observationsfor
this
scene canbe
summarized as:The
CUBE
andRECT
methods produced comparable results.The
CUBE
method producedthe
largest
octree,
performedthe
largest
numberof octanttraversals, but
tested
the
fewest
number offacets.
The
IDEAL
method producedthe
smallestoctree,
but
performedthe
largest
numberof octanttraversals
3.1.4
Geometric Scene
Description
The
scene picturedin
Figure 3.4
consists of six geometric objectscreating localized
areas ofhigh facet density.
Mill
pKilliMiill'''''''""'"
Bill
SS?w;:%#;"
:iSss '/?.. .
';
...'.'.[: :;.;
s'
Figure
3.4:
Image
ofthe
"Geometric" scene.Using
the
conventionaloctree algorithmto
renderthis
scene wasfound
to
be
extremely inefficient in
com parison witha"hierarchical
bounding
box" algorithm.Preliminary
tests
onthis
scenelead
to
the philosophy
behind
the IDEAL
subdivisionmethod.Specifically,
this
author sought an approachto
decrease
the
octant [image:41.551.151.401.169.420.2]Total
number offacets
162
Performance
Metric
Octant Styles
Best
Performance
CUBE
RECT
IDEAL
Octree build
time
0.29
2.41
0.09
IDEAL
Total
numberofoctantsNumber
ofempty
octants133
71
861
465
43
8
IDEAL
IDEAL
Fraction
ofempty
octants0.53
0.54
0.18
IDEAL
Number
of octant searchesOctant
searchtime
29,483,382
271.04
147,387,325
4512.89
22,231,009
160.89
IDEAL
IDEAL
Number
offacets
tested
Facet
test time
98,442,709
326.16
195,962,867
604.99
351,080,934
1350.73
CUBE
CUBE
Total
runtime
1272.17
8678.84
2411.37
CUBE
Table
3.4:
Summary
of profiler outputfor
the
"Geometric" scene.Observations
Table
3.4
summarizesthe
performance of each algorithmfor
this
scene.The
CUBE
algorithm producedthe
best
time
by
achieving
the
best balance
between
octanttraversals
andfacet
intersection
tests.
The
IDEAL
algorithm succeeded atminimizing
the
size ofthe
octree andthe time
spent on octanttraversals.
Unfortunately,
the
smallertotal
octree sizegreatly increased
the
average number offacets
per octant.As
aresult,
significantly
morefacet
intersection
tests
are performed andits
overallrun-time
does
notsurpassthe
CUBE
algorithm.The
RECT
method createdthe
largest
octreeresulting in
asignificantly
higher
number ofoctant
traversals,
whichdominated
the
overall run-time.Summary
The
observationsfor
this
scene canbe
summarized as:The
CUBE
method producedthe
best
overallrun-time.The
IDEAL
method producedthe
smallestoctree,
performedthe
fewest
number of octanttraversals,
but
tested
the
largest
number offacets.
The
RECT
method createdthe
largest
octree andthe
resulting
time
spent on octanttraversal
was over3.1.5
Bomber Scene
Description
The
scene renderedin
Figure 3.5 includes
several aircraft constructed with moderatedetail.
The bomber
accounts
for
approximately
1800
facets,
and eachfighter
accountsfor
approximately
800 facets.
Although
this
scene contains almost8000
facets,
the
author considersthis
scene"small" whencomparedto the
majority
of scenesconstructed
for
use withDIRSIG.
[image:43.551.149.399.202.456.2]Total
numberoffacets
7870
Performance
Metric
Octant Styles
Best
Performance
CUBE
RECT
IDEAL
Octree build
time
17.65
43.43
21.77
CUBE
Total
number of octantsNumber
ofempty
octants3822
1094
14539
6607
7848
3760
CUBE
CUBE
Fraction
ofempty
octants0.28
0.45
0.47
CUBE
Number
ofoctant searchesOctant
searchtime
77,373,878
1361.35
216,137,691
4694.43
139,305,642
3666.99
CUBE
CUBE
Number
offacets
tested
Facet
test time
207,638,721
800.01
630,578,534
2503.31
761,160,694
3581.59
CUBE
CUBE
Total
runtime
3817.23
12768.34
11522.73
CUBE
Table
3.5:
Summary
of profiler outputfor
the
"Bomber" scene.Observations
Table 3.5
summarizesthe
performance of each algorithmfor
this
scene.The
CUBE
algorithm performedbest
for
every
profiled parameter.This
is the
one oftwo
scenesin the
test
set where a particular algorithm createsthe
smallestoctree,
spendsthe
least
amount oftime
traversing,
and examinesthe
fewest
facets.
Summary
The
observationsfor
this
scene canbe
summarized as:The
CUBE
method created smallestoctree,
tested the
fewest
number offacets
and producedthe
best
run-time.
The
RECT
andIDEAL
algorithms requiredsignificantly
more octanttraversals
andfacet
intersection
3.1.6
Forest Scene
Description
The
scene renderedin
Figure 3.6
wasincluded
in
the test
setbecause
the
leaf facets
onthe
trees
aretransmissive
asthey
arein the
real world.Transmissive facets
cannotbe
rejectedbased
ontheir
orientationwith respect
to the
incoming
ray.Instead,
they
mustbe
rejectedbased
onthe
slowerintersection
point/vertex
inside-outside
test.
Therefore,
an algorithmthat
can minimizethe
number offacets
that
mustbe
tested
willlikely
have
the
best
overalltime.
This
sceneis
configured withtextures,
however,
the
overhead ofmodeling texture
can assumedto
be
constantfor
allthe
algorithms. [image:45.551.149.398.253.504.2]Total
numberoffacets
7276
Performance
Metric
Octant Styles
Best
Performance
CUBE
RECT
IDEAL
Octree build
time
22.31
100.91
57.39
CUBE
Total
numberof octantsNumber
ofempty
octants5775
1744
25039
7785
15114
5480
CUBE
CUBE
Fraction
ofempty
octants0.30
0.31
0.36
CUBE
Number
of octant searchesOctant
searchtime
79,956,770
1402.32
141,624,413
2754.45
105,740,271
2798.52
CUBE
CUBE
Number
offacets
tested
Facet test time
276,077,732
2080.59
493,019,557
3890.37
655,108,561
4870.64
CUBE
CUBE
Total
runtime
5388.22
10411.57
10808.33
CUBE
Table
3.6:
Summary
of profiler outputfor
the
"Forest" scene.Observations
Table 3.6
summarizesthe
performanceof each algorithmfor
this
scene.Again,
the
CUBE
algorithm performedbest
for
every
profiled parameter.This is
the
otherscene wherethe
CUBE
algorithm createsthe
smallestoctree,
spendsthe
least
amount oftime
traversing,
and examinesthe
fewest
facets.
Summary
The
observationsfor
this
scene canbe
summarized as:The
CUBE
method producedthe
best
overall run-time.The
RECT
andIDEAL
algorithms requiredsignificantly
more octanttraversals
andfacet
intersection
tests.
The
IDEAL
method created a smaller octreethan the RECT
method.However,
the
averagetime
for
each3.1.7
Terrain Scene
Description
The
scene renderedin Figure 3.7 is
afacetized
terrain
producedby
anautomatedtool
using
ground elevationdata from
an actuallocation in
Yuma,
Arizona.
To
provide a perspective onscale, the
rendered areais
approximately 1 km.
acrossin
eachdirection.
The darker
stripes aredried
riverbed
areas andthe
small objectsappearing in
the
lower
left
are30
m. x30
m. reflectance panels usedto
calibrateimagery
collectedby
aircraftflown
overthe
actual scene.This
sceneis
configured withtextures,
however,
the
overhead ofmodeling
texture
can assumedto
be
constantfor
allthe
algorithms.Figure
3.7:
Image
ofthe
"Terrain" scene.