GIPSA Prospective 2007-2010 Présentation CA-INPG 8-Juin-2006.
1 Preprocessing of Large databasesV for Interactive visualisation Xavier Décoret iMAGIS-GRAVIR /...
Transcript of 1 Preprocessing of Large databasesV for Interactive visualisation Xavier Décoret iMAGIS-GRAVIR /...
1
Preprocessing ofLarge databasesV for
Interactive visualisation
Preprocessing ofLarge databasesV for
Interactive visualisation
Xavier Décoret
iMAGIS-GRAVIR / IMAG
iMAGIS est un projet commun CNRS - INPG - INRIA - UJF
2
SummarySummary
• Context• Visibility computation
– Previous work– Contributions
• Level of details– Previous Work– Billboard clouds
• Conclusion
3
SummarySummary
• Context• Visibility computation
– Previous work– Contributions
• Level of details– Previous Work– Billboard clouds
• Conclusion
4
ContextContext
• Virtual environments– Video game, virual tourism, simulations
• User walk freely through the modl
• The computer is in charge of generating images of what user « sees »
Frequent refresh (25 / sec)
5
Feeling of immersionFeeling of immersion
• Complex environments– Large spatial extent– Highly detailed
• Realistic effects– Shadows– Ligthing effets (reflection)– Appearance
High computation time
6
Useractions
Useractions
ContextContext
RenderingSystem
RenderingSystemDatabaseDatabase imagesimages
Model complexity Bounded computation time
Preprocess to speed-up•Reusing results
•Optimizing representations
7
Hidden Faces RemovalHidden Faces Removal
• Vertex projections• Face rasterisation
View frustum
8Image
• Vertex projections• Face rasterisation
Hidden Faces RemovalHidden Faces Removal
9Image
Pixel
• Vertex projections• Face rasterisation
Hidden Faces RemovalHidden Faces Removal
10Image
• Vertex projections• Face rasterisation
Hidden Faces RemovalHidden Faces Removal
11Image
• Vertex projections• Face rasterisation
Hidden Faces RemovalHidden Faces Removal
12Image
• Vertex projections• Face rasterisation
Hidden Faces RemovalHidden Faces Removal
13Image
• Vertex projections• Face rasterisation
Hidden Faces RemovalHidden Faces Removal
14Image
Pixel =ColorDepth
depth
• Vertex projections• Face rasterisation
Hidden Faces RemovalHidden Faces Removal
15Image
depth > depth
• Vertex projections• Face rasterisation• Z-buffer [Cat74]
Hidden Faces RemovalHidden Faces Removal
16
ConsequencesConsequences
• Complex 3D model ) lot of calculations
• Redundancy in computations
• Unadapted computations
17
ConsequencesConsequences
Image
• Complex 3D model ) lot of calculations
• Redundancy in computations
• Unadapted computations
18
ConsequencesConsequences
Image
• Complex 3D model ) lot of calculations
• Redundancy in computations
• Unadapted computations
19
ConsequencesConsequences
Image
• Complex 3D model ) lot of calculations
• Redundancy in computations
• Unadapted computations
20
ConsequencesConsequences
Image
• Complex 3D model ) lot of calculations
• Redundancy in computations
• Unadapted computations
21
ConsequencesConsequences
Image
• Complex 3D model ) lot of calculations
• Redundancy in computations
• Unadapted computations
22
ConsequencesConsequences
Image
• Complex 3D model ) lot of calculations
• Redundancy in computations
• Unadapted computations
23
ConsequencesConsequences
Image
• Complex 3D model ) lot of calculations
• Redundancy in computations
• Unadapted computations
24
ConsequencesConsequences
Image
• Complex 3D model ) lot of calculations
• Redundancy in computations
• Unadapted computations
25
Possible solutionsPossible solutions
• Visibility computations– Finding what is hidden– Prevent unecessary rasterization
• Level of Details– Several level of modelisation– Using the level fitted to object’s distance
• Alternative rendering
26
SummarySummary
• Context• Visibility computation
– Previous work– Contributions
• Level of details– Previous Work– Billboard clouds
• Conclusion
27
Visibility computationVisibility computation
• Reject as soon as possible what will not
contribute to an image
• Two approaches– Online ) for current view point
– Offline ) for a region of space
• Difficulty: umbrae and penumbrae fusion
28
Umbrae fusionUmbrae fusion
Viewpoint
Shadow volume
Buildings(top view)
29
Shadow volume
Viewpoint
Buildings(top view)
Umbrae fusionUmbrae fusion
30
Shadow volume
Viewpoint
Buildings(top view)
Umbrae fusionUmbrae fusion
31
Viewpoint
Buildings(top view)
Umbrae fusionUmbrae fusion
32
Penumbrae fusionPenumbrae fusion
Viewcell
Buildings(topview)
33
Penumbrae fusionPenumbrae fusion
Viewcell
Buildings(topview)
34
VisibilityVisibility• Lot of previous work [Dur99]• Classification [SPS74]
Image SpaceObject Space
•Hierarchical Frustum Culling [GBW90]
•Shaft culling [HW91]
•Shadow volumes [CT97]
•Bloqueurs convexes [CZ98]
•Convex Vertical Prisms [DM01]
•Volumetric visibility [SDSD00]
•Portals [ST91]
•Hierarchical Z-buffer [GKM93]
•Hierarchical Occlusion Map [ZMH97]
•2D1/2 Occlusion maps [WS99]
•Extended projections [DDTP00]
•Line Space subdivision [BWW01]
•Portals [LG95]
35
Complexe problemComplexe problem
• No exact solution ) being conservative
• Umbrae fusion more or less done
• Object space ) extended visibility
• Image space ) fusion (implicit)
Combining approaches
36
SummarySummary
• Context• Visibility computation
– Previous work– Contributions
• Level of details– Previous Work– Billboard clouds
• Conclusion
37
DifficultyDifficulty
• Visibility from-point easy– Z-buffer
• Visibility from region difficult
Reducing to a from-point problem
38
Blocker shrinkingBlocker shrinking
• Proposed by [WWS00]
Viewcell
Object
Blockers
39
Object
Shrunk blockers
Center of viewcell
• Proposed by [WWS00]
Blocker shrinkingBlocker shrinking
40
O
• Proposed by [WWS00]
Blocker shrinkingBlocker shrinking
41
O { P such as Br(P) O }
r-shrinking
• Proposed by [WWS00]
Blocker shrinkingBlocker shrinking
42
O
V
M
• Generalisation to convex viewcells
• Shrinking of occludees
V’
• Proposed by [WWS00]
Blocker shrinkingBlocker shrinking
43
Occluder/occludees shrinkingOccluder/occludees shrinking
Viwcell
Object
Blockers
44
Shrunk blockers
Center ofviewcell
Shrunk object
Image taken fom viewcell’s center
with shrunk objects
•Same treatment to occluders/occludees•One pass algorithm
Occluder/occludees shrinkingOccluder/occludees shrinking
45
Formalisation (1)Formalisation (1)
• Dilatation (Minkowski sum)
Set of points
O
Set of vectors
XO © X
{P+x, P2 O and x 2 X}
46
Formalisation (2)Formalisation (2)
• Erosion
Set of points
O
Set of vectors
X
O ª X
{P such as 8 x 2 X, P+x 2 O }
47
TheoremTheorem
If a ray (VM) is blocked by
O ª X with X convex, then:
Any ray (V’M’) is blocked
by O with:
V’ 2 {V} © X and
M’2 {M}© X
V
MV’
M’
O ª X
O
48
Approximative erosionApproximative erosion
• Exact erosion is hard to compute
• We can have approximations
49
DifficultyDifficulty
O ª X
Erosion by X
O ª X
Internal erosion
½ O ª X
External erosion
½
• Exact erosion is hard to compute
• We can have approximations
50
Mise en oeuvreMise en oeuvre
• Building an occlusion map with internal erosions
• Testing external erosions against the map
Objects+erosions
51
Mise en oeuvreMise en oeuvre
• Building an occlusion map with internal erosions
• Testing external erosions against the map
52
Modification de l’algorithmeModification de l’algorithme
Carte d’occlusion
• Building an occlusion map with internal erosions
• Testing external erosions against the map
53
Modification de l’algorithmeModification de l’algorithme
Carte d’occlusion
• Building an occlusion map with internal erosions
• Testing external erosions against the map
54
Modification de l’algorithmeModification de l’algorithme
Carte d’occlusion
• Building an occlusion map with internal erosions
• Testing external erosions against the map
55
Modification de l’algorithmeModification de l’algorithme
Carte d’occlusion
• Building an occlusion map with internal erosions
• Testing external erosions against the map
56
Modification de l’algorithmeModification de l’algorithme
Carte d’occlusion
Visibles
• Building an occlusion map with internal erosions
• Testing external erosions against the map
57
Modification de l’algorithmeModification de l’algorithme
Carte d’occlusion
Visibles
• Building an occlusion map with internal erosions
• Testing external erosions against the map
58
Modification de l’algorithmeModification de l’algorithme
Carte d’occlusion
Visibles
• Building an occlusion map with internal erosions
• Testing external erosions against the map
59
Modification de l’algorithmeModification de l’algorithme
Carte d’occlusion
Visibles
• Building an occlusion map with internal erosions
• Testing external erosions against the map
60
Modification de l’algorithmeModification de l’algorithme
Carte d’occlusion
Visibles
Hidden
• Building an occlusion map with internal erosions
• Testing external erosions against the map
61
Pros & consPros & cons
Two pass of rendernig (map + test)
Tests can be done par graphic card
Linear complexity
Linear memory cost
ObjectsObjects
2 pass2 passApproximative erosion
Approximative erosion
Exact erosionExact erosion 1 pass1 passVisibility
pre-computation
Visibility pre-computation
62
Approximative erosionApproximative erosion
• Voxelisation of object– Volumetric information [SDDS00]– Suitable representation [DM01]
• Erosion on voxels– Simple– Robust and fast
63
VoxelisationVoxelisation
64
VoxelisationVoxelisation
65
VoxelisationVoxelisation
66
Erosion of voxels by a cubeErosion of voxels by a cube
= ©
= ©©
67
O ª (X ©Y) = (O ª X) ª Y
=ª
ª ª ª
Erosion of voxels by a cubeErosion of voxels by a cube
68
Erosion 1DErosion 1D
• Of half a voxel
Direction of erosionTopological
change
69
Erosion 1DErosion 1D
• Of half a voxel
Direction of erosion
• Of less than a half
Topological change
Topology preserved
70
=ª
ª ª ª
Aligned axis
Erosion of voxels by a cubeErosion of voxels by a cube
71
Erosion of voxels by X convexErosion of voxels by X convex
Cellule X
voxels
If X ½ Y then O ª Y ½ O ª X
ªInternal erosion
)
ªExternal erosion
)
72
DemoDemo
• Erosion of voxels
• Visibility pre-computation
73
ConclusionConclusion• Formalism and new theorem
– Érosion of occluders and occludees
• Per object voxelisation– Optimized orientation– Do no discretize empty spaces
• Working in image space– Implicit fusion of umbrae– Acceleration
• Hardware : graphic cards• Software : combining with other visibility algorithm
74
Ext step…Ext step…
We know what is visible
How to display it?
75
SummarySummary
• Context• Visibility computation
– Previous work– Contributions
• Level of details– Previous Work– Billboard clouds
• Conclusion
76
Level of detailsLevel of details
• Mesh simplification
•Clusterisation [RB93,LT97]
•Hierarchical Dynamic Simplification [LE97]
•Decimation of Triangle Meshes [SZL92]
•Re-tiling [Tur92]
•Progressive Meshes [Hop96,PH97]
•Quadric Error Metrics [GH97]
•Out of Core Simplification [Lin00]
•Re-tiling [Tur92]
•Voxel based reconstruction [HHK+95]
•Multiresolution analysis [EDD+95]
•Superfaces [KT96], face cluster [WGH00]
77
LimitationsLimitations
• Constraints on models• Erreur contrôle
– Simplification enveloppes [CVM96]– Permission Grids [ZG02]– Image driven [LT00]
• Handling of attributes (textures and colors)– Integration to the metric[GH98][Hop99]– Re-generation [CMRS98,COM98]
• Extreme Simplification– Sillouhette Clipping [SGG+00]
78
Alternative renderingAlternative rendering
• Image based rendering– Lightfield,Lumigraph [LH96,GGRC96]
– Imposteurs [DSSD99]
– Relief Textures [OB00]
• Point based rendering– Surfels [PZBG00]
– Pointshop 3D [ZPKG02]
79
SummarySummary
• Context• Visibility computation
– Previous work– Contributions
• Level of details– Previous Work– Billboard clouds
• Conclusion
80
Billboards cloudBillboards cloud
• New representation
• Used for extreme simplification
81
BillboardBillboard
• Classical solution [RH94]
• Generalising to many planes• Automating synthesis
82
OverviewOverview
• Approaching shape by a set of plane
• Projecting model on those planes) textures
• Textures interleaving replace the object
83
PrinciplePrinciplepolygonal 3D model
84
PrinciplePrinciple
Simplification by planes
85
PrinciplePrinciple• Moving vertices
Maximum allowed displacement for P
P
86
PrinciplePrinciple• Projecting polygons on planes
Polygon
Valide plane
87
PrinciplePrinciple• How many planes? Which planes?
88
OverviewOverview• It is an optimisation problem
• Measuring plane interest
• Traversing the space of planes
• Finding a set of planes
89
OverviewOverview• It is an optimisation problem
– Greedy algorithm
• Measuring plane interest
• Traversing the space of planes
• Finding a set of planes
90
OptimisationOptimisation•We define over the set of Billboards clouds:
– An error function– A cost function
•Two goals– Budget-based
cost fixed minimising error
– Error-based max error fixed minimising cost
91
OptimisationOptimisation•We define over the set of Billboards clouds:
– An error function– A cost function
•Two goals– Budget-based
cost fixed minimising error
– Error-based max error fixed minimising cost
92
OptimisationOptimisation
• Cost function– Number of planes
• Error function– Vertex displacement
• In object space
• In image space
93
OverviewOverview• It is an optimisation problem
– Greedy algorithm
• Measuring plane interest– Defining a density function
• Traversing the space of planes
• Finding a set of planes
94
Replaces a lot of faces
Fonction de densitéFonction de densité• Important plane = low cost
Density function overThe space of planes
• density = measure of the amount of facesthat a plane can replace
95
ValiditéValidité• Faces for which a plane is valid
– Enforces the error bound
• Density = number of valid faces
Allowed displacement
Density de 3
96
ValiditéValidité
Allowed displacement
Density of 3
• Faces for which a plane is valid– Enforces the error bound
• Density = number of valid faces
97
ContributionContribution• Ponderation by projected area
– Favor large faces– Favor planes parallel to faces
98
OverviewOverview• It is an optimisation problem
– Greedy algorithm
• Measuring plane interest– Defining a density function
• Traversing the space of planes– discretisation
• Finding a set of planes
99
DiscretisationDiscretisation• Discretisation of plane space
• Hough transform
ρ
φ
θ(θ,φ)
O
ρ
primal dual
H
100
Dual spaceDual space• planes through a point ) a sheet
φθ
ρ
101
• Plans through a sphere ) a slice
φθ
ρ
Dual spaceDual space
102
• Plans through a sphere ) a slice
• Planes through 3 spheres ) intersection of 3 slices
φθ
ρ• Uniform discretisation
Dual spaceDual space
103
Cumulated densityCumulated density
104
OverviewOverview• It is an optimisation problem
– Greedy algorithm
• Measuring plane interest– Defining a density function
• Traversing the space of planes– discretisation
• Finding a set of planes– Refinement
105
Greedy iterationGreedy iteration
Faces
Plane space
Planes validPlanes validfor the facefor the face
DiscretisationDiscretisation
106
Faces
Plane space
Planes validPlanes validfor the facefor the face
DiscretisationDiscretisation
DensityDensity
+
-
Greedy iterationGreedy iteration
107
Faces
Planes validPlanes validfor the facefor the face
DensityDensity
+
-
Plane space
DiscretisationDiscretisation
Greedy iterationGreedy iteration
108
Faces
Planes validPlanes validfor the facefor the face
DensityDensity
+
-
Plane space
DiscretisationDiscretisation
Greedy iterationGreedy iteration
109
Faces
Planes validPlanes validfor the facefor the face
DensityDensity
+
-
Plane space
DiscretisationDiscretisation
Greedy iterationGreedy iteration
110
Faces
Planes validPlanes validfor the facefor the face
DensityDensity
+
-
Plane space
DiscretisationDiscretisation
Greedy iterationGreedy iteration
111
Faces
Planes validPlanes validfor the facefor the face
DensityDensity
+
-
Plane space
DiscretisationDiscretisation
Greedy iterationGreedy iteration
112
Faces
Planes validPlanes validfor the facefor the face
DensityDensity
+
-
Plane space
DiscretisationDiscretisation
Greedy iterationGreedy iteration
113
Faces
Planes validPlanes validfor the facefor the face
DensityDensity
+
-
Plane space
DiscretisationDiscretisation
Greedy iterationGreedy iteration
114
Faces
Planes validPlanes validfor the facefor the face
DensityDensity
+
-
Plane space
DiscretisationDiscretisation
Greedy iterationGreedy iteration
115
Cell of highestdensity
Faces for which cell is valid
Greedy iterationGreedy iteration
116
High density
There is probably a plan valid for all the faces
How to find such a plane?
Greedy iterationGreedy iteration
117
We test centralplane
We subdivide
Local densityrecomputation
Greedy iterationGreedy iteration
118
Texture synthesisTexture synthesis
• To each plane is associated a set of faces
• Orthogonal projection on plane
• Minimal bounding rectangle (CGAL)
• Orthogonal rendering ) texture
119
ResultsResults
• Movies
Examples Shadows
120
View-dependent extensionView-dependent extension
• Changing the error function– Reprojection error
P-
M P+
viewcell
V
T
θ
121
View-dependent extension View-dependent extension
• Textures rendered from viewcell’s center
• Automatic selection of resolution
• Saving the projection matrix
122
ResultsResults
Close
zoom
View from the cell
Billboards cloud polygonal model
123
MiddleRange
ResultsResults
zoom
View from the cell
Billboards cloud polygonal model
124
Far
ResultsResults
zoom
View from the cell
Billboards cloud polygonal model
125
ConclusionConclusion
• New representation
• Automatic construction
• Arbitrary models
• Simple error criteria / no parameter
• Extreme simplification
126
ExtensionsExtensions
• Optimising texture usage– Integration to the cost function– Texture compression
• Re-lighting– Normal maps– Pixel shading
• Transition• Moving objects
127
SummarySummary
• Context• Visibility computation
– Previous work– Contributions
• Level of details– Previous Work– Billboard clouds
• Conclusion
128
ConclusionConclusion
• New tools for the studied proble,• Visibility computation
– Theoretical results
– Practical algorithm easy to implement
• Level of details– New representation / Algorithm for construction
– Extreme simplification / handling of attributes
• Integration
129
QuestionsQuestions