Ray Space Factorization for From-Region VisibilityRay Space Factorization for From-Region Visibility
Tommer LeyvandOlga SorkineDaniel Cohen-Or
Tel-Aviv University, Israel
From-Region VisibilityFrom-Region VisibilityFrom-Region VisibilityFrom-Region Visibility
Problem of identifying which parts are visible from a region (viewcell)
Problem of identifying which parts are visible from a region (viewcell)
Entire Model Visibility SetValid from within the viewcell
From-Region visibility is 4D• A ray exists the viewcell through a 2D surface
and enters the target region through a 2D surface
From-Region visibility is 4D• A ray exists the viewcell through a 2D surface
and enters the target region through a 2D surface
Dimensionality ofDimensionality ofFrom-Region VisibilityFrom-Region VisibilityDimensionality ofDimensionality ofFrom-Region VisibilityFrom-Region Visibility
viewcell
From-Region Occluder From-Region Occluder FusionFusionFrom-Region Occluder From-Region Occluder FusionFusion
• Wonka et.al. EGRW 2000
• Koltun et.al. EGRW 2000
• Schaufler et.al. SIGGRAPH 2000
• Durand et.al. SIGGRAPH 2000
• Wonka et.al. EGRW 2000
• Koltun et.al. EGRW 2000
• Schaufler et.al. SIGGRAPH 2000
• Durand et.al. SIGGRAPH 2000
A Ray Space TechniqueA Ray Space TechniqueA Ray Space TechniqueA Ray Space Technique
s=0
t=0
1/4
1/2
1/23/4
1/4
3/4
1/4 1/2 3/4 10s
t
Primary Space Ray Parameter Space
A Ray Space TechniqueA Ray Space Technique(Cont.)(Cont.)A Ray Space TechniqueA Ray Space Technique(Cont.)(Cont.)
Appropriate for 2D from-region visibility
• Exact (up to discretization)
• Can be realized with common graphics hardware
Can be used to accelerate 2.5D from-region visibility
• Koltun et.al. EGRW’ 2001• Bittner et.al. PG2001
Appropriate for 2D from-region visibility
• Exact (up to discretization)
• Can be realized with common graphics hardware
Can be used to accelerate 2.5D from-region visibility
• Koltun et.al. EGRW’ 2001• Bittner et.al. PG2001
Our FactorizationOur FactorizationOur FactorizationOur Factorization
We factor the 4D visibility problem into horizontal and vertical components
We factor the 4D visibility problem into horizontal and vertical components
Horizontal direction Vertical direction
Ray Space ApproachRay Space Approach Umbra Merging ApproachUmbra Merging Approach
Lumigraph/Light FieldLumigraph/Light FieldLumigraph/Light FieldLumigraph/Light Field
A 2D grid of 2D imagesA 2D grid of 2D images
v
u
Light field
Vertical SliceVertical SliceVertical SliceVertical Slice
The visibility is solved within each vertical slice
The visibility is solved within each vertical slice
Horizontal direction Vertical direction
A vertical sliceA vertical slice Within a vertical sliceWithin a vertical slice
Our Main ContributionOur Main ContributionOur Main ContributionOur Main Contribution
A factorization that
•Exploits vertical coherence
•Maps to the graphics card
A factorization that
•Exploits vertical coherence
•Maps to the graphics card
Algorithm OverviewAlgorithm OverviewAlgorithm OverviewAlgorithm Overview
s t
R
R ‘
Horizontal direction
Vertical slice
Per object:• Parameterization of vertical slices
• Umbra encoding
Per object:• Parameterization of vertical slices
• Umbra encoding
v
s
t
Parameter Space
footprint
Vertical umbra
Algorithm OverviewAlgorithm Overview(Cont.)(Cont.)Algorithm OverviewAlgorithm Overview(Cont.)(Cont.)
• Parameterization of vertical slices
• Umbra encoding and visibility test
• Merging umbrae
• Parameterization of vertical slices
• Umbra encoding and visibility test
• Merging umbrae
s t
R
R ‘
Horizontal direction
Vertical directionv
s
t
Parameter Space
footprint
Vertical umbra
Horizontal Horizontal ParameterizationParameterizationHorizontal Horizontal ParameterizationParameterization
Produces a 2D polygonal footprint of scene objects
• Project scene objects onto the ground plane
• Maps planes slicing both the viewcell and some object into points in parameter space
Produces a 2D polygonal footprint of scene objects
• Project scene objects onto the ground plane
• Maps planes slicing both the viewcell and some object into points in parameter space
s
ts=0
t=0
1/4
1/2
1/23/4
1/4
3/4
Building the footprintBuilding the footprintBuilding the footprintBuilding the footprint
Our parameterization maps a 3D triangle into several 2D polygons
• Each point in the resulting footprint represents a plane that slices both the viewcell and the segment
Our parameterization maps a 3D triangle into several 2D polygons
• Each point in the resulting footprint represents a plane that slices both the viewcell and the segment
s=0
1/4
1/4 q
1/23/4
1/4 1/2 3/4 1
)4/1(qt
)2/1(qt
)4/1(qt
)2/1(qt
0s
t
t=0
1/23/4
Umbra EncodingUmbra EncodingUmbra EncodingUmbra Encoding
v
s
t
Encode directional umbra usingsupporting and separating linesEncode directional umbra usingsupporting and separating lines
Parameter Space
viewcell
directi
onal
umbra
Intersection ofsome scene objectwith slice
Vertical slice P(s,t)
(s,t)
top
bottom
top
bottom
topbottom
top bottom
Global Occlusion MapGlobal Occlusion MapGlobal Occlusion MapGlobal Occlusion Map
Stores the directional accumulated umbra for all directions
• Encoded by sets of supporting and separating angles
– Each set encodes a single umbra
• Traverse the scene top-down front-to-back, and
– Bounding boxes are tested for visibility
– Objects in visible leafs augment the map
Stores the directional accumulated umbra for all directions
• Encoded by sets of supporting and separating angles
– Each set encodes a single umbra
• Traverse the scene top-down front-to-back, and
– Bounding boxes are tested for visibility
– Objects in visible leafs augment the map
Testing VisibilityTesting VisibilityTesting VisibilityTesting Visibility
Within a slice:• Test occlusion by
comparing supporting angles
Performed in parallel on all (s,t) slices
Within a slice:• Test occlusion by
comparing supporting angles
Performed in parallel on all (s,t) slices
viewcell
Directionalaccumulatedumbra
Vertical slice P(s,t)
t
b
t
b
Merging UmbraeMerging UmbraeMerging UmbraeMerging Umbrae
Increase the current accumulated umbra in the occlusion map
• Augment if directional umbra intersects
Increase the current accumulated umbra in the occlusion map
• Augment if directional umbra intersects
viewcell
Merging UmbraeMerging UmbraeMerging UmbraeMerging Umbrae
Increase the current accumulated umbra in the occlusion map
• Augment if directional umbra intersects
• Otherwise: create another umbra entry
– In case there are too many entries, discard
Increase the current accumulated umbra in the occlusion map
• Augment if directional umbra intersects
• Otherwise: create another umbra entry
– In case there are too many entries, discard
viewcell
ImplementationImplementationImplementationImplementation
Cg implementation:• 4x32bit floating point PBuffers
– Used to store a single set global occlusion map
• Fragment programs for testing occlusion and merging umbra
– Calculates less conservative values
Previous generation hardware implementation:
• Using occlusion query and OpenGL
Cg implementation:• 4x32bit floating point PBuffers
– Used to store a single set global occlusion map
• Fragment programs for testing occlusion and merging umbra
– Calculates less conservative values
Previous generation hardware implementation:
• Using occlusion query and OpenGL
ResultsResultsResultsResultsProcedural Urban Model Box Field Model Vienna 2000 Model
2.5D+ε 3D-ε 2.5D
VideoVideoVideoVideo
ThanksThanksThanksThanks
• Israel Science Foundation
• Israeli Ministry of Science
•Reviewers
• Israel Science Foundation
• Israeli Ministry of Science
•Reviewers
The EndThe EndThe EndThe End
Before After
Procedural CityProcedural CityProcedural CityProcedural City
XML configured city generation engine• Simple building blocks
– 3D boxes and pyramids
– Rotation and scaling operators
– Texture groups
– Instantiation parameters within user defined random limits
• Exports city to VRML 2.0
XML configured city generation engine• Simple building blocks
– 3D boxes and pyramids
– Rotation and scaling operators
– Texture groups
– Instantiation parameters within user defined random limits
• Exports city to VRML 2.0
ConservativenessConservativenessConservativenessConservativeness
viewcell
outersquare
Piecewise constant approximationof the rational umbra function at each slice
Each vertical plane is not infinitesimal - it has some width