[277] | 1 | \chapter{Mutual Visibility Verification}
|
---|
[249] | 2 |
|
---|
[277] | 3 | \label{chap:mutual}
|
---|
[249] | 4 |
|
---|
[277] | 5 | The aggressive visibility sampling discussed in the previous chapter is
|
---|
| 6 | a good candidate if a fast visibility solution is required (e.g.
|
---|
| 7 | during the development cycle). However for final solution (production)
|
---|
| 8 | we should either be sure that there can be no visible error due to the
|
---|
| 9 | preprocessed visibility or the error is sufficiently small and thus
|
---|
| 10 | not noticeable.
|
---|
[249] | 11 |
|
---|
[277] | 12 | The mutual visibility verification starts with identifying a minimal
|
---|
| 13 | set of object/view cell pairs which are classified as mutually
|
---|
| 14 | invisible. We process the objects sequentially and for every given
|
---|
| 15 | object we determine the view cells which form the boundary of the
|
---|
| 16 | invisible view cell set.
|
---|
[249] | 17 |
|
---|
| 18 | This boundary it is based on the current view cell visibility
|
---|
| 19 | classifications. We assume that there is a defined connectivity
|
---|
[272] | 20 | between the view cells which is the case for both BSP-tree or kD-tree
|
---|
| 21 | based view cells. Then given a PVS consisting of visible view cells
|
---|
[269] | 22 | (with respect to an object) we can find all the neighbors of the
|
---|
[272] | 23 | visible view cells which are invisible. In order words a view cell
|
---|
[269] | 24 | belongs to this boundary if it is classified invisible and has at
|
---|
[249] | 25 | least one visible neighbor. If all view cells from this boundary are
|
---|
[272] | 26 | proven invisible, no other view cell (behind this boundary) can be
|
---|
[249] | 27 | visible. If the verification determines some view cells as visible,
|
---|
| 28 | the current invisible boundary is extended and the verification is
|
---|
| 29 | applied on the new view cells forming the boundary.
|
---|
| 30 |
|
---|
| 31 | The basic operation of the verification is mutual visibility test
|
---|
| 32 | between an object and a view cell. This test works with a bounding
|
---|
| 33 | volume of the object and the boundary of the view cell. In the most
|
---|
| 34 | general case both are defined bound by a convex polyhedron, in a
|
---|
| 35 | simpler case both are defined by an axis aligned bounding box.
|
---|
| 36 |
|
---|
[266] | 37 | Below, we describe three different mutual visibility verification
|
---|
| 38 | algorithms. The first algorithm which is described in most detail
|
---|
[277] | 39 | computes exact visibility. The second one is a conservative algorithm
|
---|
[266] | 40 | and the third one is an approximate algorithm with a guaranteed error
|
---|
| 41 | bound.
|
---|
[249] | 42 |
|
---|
| 43 |
|
---|
[273] | 44 | \section{Exact Verifier}
|
---|
[249] | 45 |
|
---|
[273] | 46 | The exact mutual visibility verifier computes exact visibility between
|
---|
| 47 | two polyhedrons in the scene. This is computed by testing visibility
|
---|
[266] | 48 | between all pairs of potentially visible polygons of these
|
---|
| 49 | polyhedrons. For each pair of tested polygons the computation is
|
---|
| 50 | localized into the shaft defined by their convex hull. This shaft is
|
---|
| 51 | used to determine the set of relevant occluders~\cite{Haines94}.
|
---|
[249] | 52 |
|
---|
[273] | 53 | \subsection{Occlusion tree}
|
---|
[249] | 54 | \label{sec:rot3d_ot}
|
---|
| 55 |
|
---|
| 56 | The occlusion tree for the visibility from region problem is a 5D BSP
|
---|
[277] | 57 | tree maintaining a collection of the 5D blocker
|
---|
| 58 | polyhedra~\cite{bittner:02:phd}. The tree is constructed for each
|
---|
| 59 | source polygon $P_S$ and represents all rays emerging from $P_S$. Each
|
---|
| 60 | node $N$ of the tree represents a subset of line space ${\mathcal
|
---|
| 61 | Q^*_N}$. The root of the tree represents the whole problem-relevant
|
---|
| 62 | line set ${\mathcal L}_R$. If $N$ is an interior node, it is
|
---|
| 63 | associated with a \plucker plane $\pplane_N$. Left child of $N$
|
---|
| 64 | represents ${\mathcal Q^*_N} \cap \pplane^-_N$, right child ${\mathcal
|
---|
| 65 | Q^*_N} \cap \pplane^+_N$, where $\pplane^-_N$ and $\pplane^+_N$ are
|
---|
| 66 | halfspaces induced by $\pplane_N$.
|
---|
[249] | 67 |
|
---|
| 68 | Leaves of the occlusion tree are classified $in$ or $out$. If $N$ is
|
---|
| 69 | an $out$-leaf, ${\mathcal Q^*_N}$ represents unoccluded rays emerging
|
---|
[266] | 70 | from the source polygon $P_S$. If $N$ is an $in$-leaf, it is
|
---|
| 71 | associated with an occluder $O_N$ that blocks the corresponding set of
|
---|
| 72 | rays ${\mathcal Q^*_N}$. Additionally $N$ stores a fragment of the
|
---|
| 73 | blocker polyhedron $B_N$ representing ${\mathcal Q^*_N}$. The
|
---|
| 74 | intersection of $B_N$ and the \plucker quadric corresponds to a set of
|
---|
| 75 | stabbers ${\cal S}_N$ through which $O_N$ is visible from $P_S$. A 2D
|
---|
| 76 | example of an occlusion tree is shown at Figure~\ref{fig:ot}.
|
---|
[249] | 77 |
|
---|
[266] | 78 | \begin{figure}[htb]
|
---|
| 79 | \centerline{
|
---|
| 80 | \includegraphics[width=0.9\textwidth,draft=\DRAFTFIGS]{figs/ot1}}
|
---|
| 81 | \caption{A 2D example of an occlusion tree. Rays intersecting scene polygons
|
---|
| 82 | are represented by polyhedra P1, P2 and P3. The occlusion tree represents a union
|
---|
| 83 | of the polyhedra. Note that P2 has been split during the insertion process.}
|
---|
[277] | 84 | \label{fig:ot}
|
---|
[266] | 85 | \end{figure}
|
---|
| 86 |
|
---|
| 87 |
|
---|
[249] | 88 | %% Consider a source polygon and a single occluder such as in
|
---|
| 89 | %% Figure~\ref{lines3}-(a). The corresponding elementary occlusion tree
|
---|
| 90 | %% has interior nodes associated with \plucker hyperplanes corresponding
|
---|
| 91 | %% to edges of the two polygons.
|
---|
| 92 |
|
---|
| 93 |
|
---|
[273] | 94 | \subsection{Occlusion tree construction}
|
---|
[249] | 95 |
|
---|
| 96 | \label{sec:rot3d_construct}
|
---|
| 97 |
|
---|
| 98 | The occlusion tree is constructed incrementally by inserting blocker
|
---|
[266] | 99 | polyhedra in the order given by the size of the polygons. When
|
---|
| 100 | processing a polygon $P_j$ the algorithm inserts a polyhedron
|
---|
| 101 | $B_{P_SP_j}$ representing the feasible line set between the source
|
---|
| 102 | polygon $P_S$ and the polygon $P_j$. The polyhedron is split into
|
---|
| 103 | fragments that represent either occluded or unoccluded rays.
|
---|
[249] | 104 |
|
---|
| 105 | We describe two methods that can be used to insert a blocker
|
---|
| 106 | polyhedron into the occlusion tree. The first method inserts the
|
---|
| 107 | polyhedron by splitting it using hyperplanes encountered during the
|
---|
| 108 | traversal of the tree. The second method identifies hyperplanes that
|
---|
| 109 | split the polyhedron and uses them later for the construction of
|
---|
| 110 | polyhedron fragments in leaf nodes.
|
---|
| 111 |
|
---|
| 112 |
|
---|
| 113 |
|
---|
[273] | 114 | \subsubsection{Insertion with splitting}
|
---|
[249] | 115 |
|
---|
| 116 | \label{sec:rot3_insertwithsplit}
|
---|
| 117 |
|
---|
| 118 | The polyhedron insertion algorithm maintains two variables --- the
|
---|
| 119 | current node $N_c$ and the current polyhedron fragment
|
---|
| 120 | $B_c$. Initially $N_c$ is set to the root of the tree and $B_c$ equals
|
---|
| 121 | to $B_{P_SP_j}$. The insertion of a polyhedron in the tree proceeds as
|
---|
| 122 | follows: If $N_c$ is an interior node, we determine the position of
|
---|
| 123 | $B_c$ and the hyperplane $\pplane_{N_c}$ associated with $N_c$. If
|
---|
| 124 | $B_c$ lies in the positive halfspace induced by $\pplane_{N_c}$ the
|
---|
| 125 | algorithm continues in the right subtree. Similarly, if $B_c$ lies in
|
---|
| 126 | the negative halfspace induced by $\pplane_{N_c}$, the algorithm
|
---|
| 127 | continues in the left subtree. If $B_c$ intersects both halfspaces, it
|
---|
| 128 | is split by $\pplane_{N_{c}}$ into two parts $B^+_{c}$ and $B^-_{c}$
|
---|
| 129 | and the algorithm proceeds in both subtrees of $N_c$ with relevant
|
---|
| 130 | fragments of $B_{c}$.
|
---|
| 131 |
|
---|
| 132 | If $N_{c}$ is a leaf node then we make a decision depending on its
|
---|
| 133 | classification. If $N_{c}$ is an $out$-leaf then $B_{c}$ is visible
|
---|
| 134 | and $N_c$ is replaced by the elementary occlusion tree of $B_{c}$. If
|
---|
[266] | 135 | $N_{c}$ is an $in$-leaf it corresponds to already occluded rays and no
|
---|
| 136 | modification to the tree necessary. Otherwise we need to {\em merge}
|
---|
| 137 | $B_{c}$ into the tree. The merging replaces $N_{c}$ by the elementary
|
---|
| 138 | occlusion tree of $B_c$ and inserts the old fragment $B_{N_{c}}$ in
|
---|
| 139 | the new subtree.
|
---|
[249] | 140 |
|
---|
[273] | 141 | \subsubsection{Insertion without splitting}
|
---|
[249] | 142 | \label{sec:insertion_nosplit}
|
---|
| 143 |
|
---|
| 144 | The above described polyhedron insertion algorithm requires that the
|
---|
| 145 | polyhedron is split by the hyperplanes encountered during the
|
---|
| 146 | traversal of the occlusion tree. Another possibility is an algorithm
|
---|
| 147 | that only tests the position of the polyhedron with respect to the
|
---|
| 148 | hyperplane and remembers the hyperplanes that split the polyhedron on
|
---|
| 149 | the path from the root to the leaves. Reaching a leaf node these
|
---|
| 150 | hyperplanes are used to construct the corresponding polyhedron
|
---|
| 151 | fragment using a polyhedron enumeration algorithm.
|
---|
| 152 |
|
---|
| 153 | The splitting-free polyhedron insertion algorithm proceeds as
|
---|
| 154 | follows: we determine the position of the blocker polyhedron and the
|
---|
| 155 | hyperplane $\pplane_{N_c}$ associated with the current node $N_c$. If
|
---|
| 156 | $B_c$ lies in the positive halfspace induced by $\pplane_{N_c}$ the
|
---|
| 157 | algorithm continues in the right subtree. Similarly if $B_c$ lies in
|
---|
| 158 | the negative halfspace induced by $\pplane_{N_c}$ the algorithm
|
---|
| 159 | continues in the left subtree. If $B_c$ intersects both halfspaces the
|
---|
| 160 | algorithm proceeds in both subtrees of $N_c$ and $\pplane_{N_c}$ is
|
---|
[266] | 161 | added to the list of splitting hyperplanes with a correct sign for
|
---|
| 162 | each subtree. Reaching an $out$-leaf the list of splitting hyperplanes
|
---|
| 163 | and the associated signs correspond to halfspaces bounding the
|
---|
[249] | 164 | corresponding polyhedron fragment. The polyhedron enumeration
|
---|
| 165 | algorithm is applied using these halfspaces and the original
|
---|
| 166 | halfspaces defining the blocker polyhedron. Note that it is possible
|
---|
| 167 | that no feasible polyhedron exists since the intersection of
|
---|
| 168 | halfspaces is empty. Such a case occurs due to the conservative
|
---|
| 169 | traversal of the tree that only tests the position of the inserted
|
---|
[266] | 170 | polyhedron with respect to the splitting hyperplanes. If the fragment
|
---|
| 171 | is not empty, the tree is extended as described in the previous
|
---|
| 172 | section.
|
---|
[249] | 173 |
|
---|
| 174 | Reaching an $in$-leaf the polygon positional test is applied. If the
|
---|
| 175 | inserted polygon is closer than the polygon associated with the leaf,
|
---|
| 176 | the polyhedron fragment is constructed and it is merged in the tree as
|
---|
| 177 | described in the previous section. The splitting-free polyhedron
|
---|
| 178 | insertion algorithm has the following properties:
|
---|
| 179 |
|
---|
| 180 | \begin{itemize}
|
---|
| 181 | \item If the polyhedron reaches only $in$-leaves the 5D set operations
|
---|
| 182 | on the polyhedron are avoided completely.
|
---|
| 183 | \item If the polyhedron reaches only a few leaves the application of the
|
---|
| 184 | polyhedron enumeration algorithm is potentially more efficient than
|
---|
| 185 | the sequential splitting. On the contrary, when reaching many
|
---|
| 186 | $out$-leaves the splitting-free method makes less use of coherence,
|
---|
| 187 | i.e. the polyhedron enumeration algorithm is applied independently
|
---|
| 188 | in each leaf even if the corresponding polyhedra are bound by
|
---|
| 189 | coherent sets of hyperplanes.
|
---|
| 190 | \item An existing implementation of the polyhedron enumeration
|
---|
| 191 | algorithm can be used~\cite{cdd_site,lrs_site}.
|
---|
| 192 | \end{itemize}
|
---|
| 193 |
|
---|
| 194 |
|
---|
| 195 | The polyhedron enumeration algorithm constructs the polyhedron as an
|
---|
| 196 | intersection of a set of halfspaces. The polyhedron is described as a
|
---|
| 197 | set of {\em vertices} and {\em rays} and their adjacency to the
|
---|
| 198 | hyperplanes bounding the polyhedron~\cite{Fukuda:1996:DDM,avis96}. The
|
---|
| 199 | adjacency information is used to construct a 1D skeleton of the
|
---|
| 200 | polyhedron that is required for computation of the intersection with
|
---|
| 201 | the \plucker quadric.
|
---|
| 202 |
|
---|
| 203 |
|
---|
| 204 |
|
---|
[277] | 205 | \subsection{Visibility test}
|
---|
[249] | 206 |
|
---|
| 207 | \label{sec:rot3d_vistest}
|
---|
| 208 |
|
---|
| 209 | The visibility test classifies visibility of a given polygon with respect
|
---|
| 210 | to the source polygon. The test can be used to classify visibility of
|
---|
| 211 | a polyhedral region by applying it on the boundary faces of the region
|
---|
| 212 | and combining the resulting visibility states.
|
---|
| 213 |
|
---|
[273] | 214 | %\subsection{Exact visibility test}
|
---|
[249] | 215 |
|
---|
[273] | 216 | The exact visibility test for a given polyhedral region proceeds as
|
---|
[249] | 217 | follows: for each face of the region facing the given source polygon
|
---|
| 218 | we construct a blocker polyhedron. The blocker polyhedron is then
|
---|
| 219 | tested for visibility by the traversal of the occlusion tree. The
|
---|
| 220 | visibility test proceeds as the algorithms described in
|
---|
[277] | 221 | Section~\ref{sec:rot3d_construct}, but no modifications to the tree
|
---|
| 222 | are performed. If the polyhedron is classified as visible in all
|
---|
| 223 | reached leaves, the current face is fully visible. If the polyhedron
|
---|
| 224 | is invisible in all reached leaves, the face is invisible. Otherwise
|
---|
| 225 | it is partially visible since some rays connecting the face and the
|
---|
[249] | 226 | source polygon are occluded and some are unoccluded. The visibility of
|
---|
[277] | 227 | the whole region can computed using a combination of visibility states
|
---|
| 228 | of its boundary faces according to
|
---|
| 229 | Table~\ref{table:vis_states}. However, since we are interested only in
|
---|
| 230 | verification of mutual invisibility as soon as we find a first visible
|
---|
| 231 | fragment the test can be terminated.
|
---|
[249] | 232 |
|
---|
[277] | 233 | \begin{table}[htb]
|
---|
| 234 | \begin{center}
|
---|
| 235 | \begin{tabular}{|c|c||c|}
|
---|
| 236 | \hline
|
---|
| 237 | Fragment A & Fragment B & A $\cup$ B \\
|
---|
| 238 | \hline
|
---|
| 239 | \hline
|
---|
| 240 | F & F & F\\
|
---|
| 241 | \hline
|
---|
| 242 | I & I & I\\
|
---|
| 243 | \hline
|
---|
| 244 | I & F & P\\
|
---|
| 245 | \hline
|
---|
| 246 | F & I & P\\
|
---|
| 247 | \hline
|
---|
| 248 | P & $*$ & P\\
|
---|
| 249 | \hline
|
---|
| 250 | $*$ & P & P\\
|
---|
| 251 | \hline
|
---|
| 252 | \end{tabular}
|
---|
| 253 | \begin{tabular}{cl}
|
---|
| 254 | I & -- invisible\\
|
---|
| 255 | P & -- partially visible\\
|
---|
| 256 | F & -- fully visible\\
|
---|
| 257 | $*$ & -- any of the I,P,F states
|
---|
| 258 | \end{tabular}
|
---|
| 259 | \end{center}
|
---|
| 260 | \caption{Combining visibility states of two fragments.}
|
---|
| 261 | \label{table:vis_states}
|
---|
| 262 | \end{table}
|
---|
[249] | 263 |
|
---|
[277] | 264 |
|
---|
[273] | 265 | % \subsection{Conservative visibility test}
|
---|
[249] | 266 |
|
---|
[273] | 267 | % \label{sec:rot3_conserva}
|
---|
[249] | 268 |
|
---|
[273] | 269 | % The conservative visibility test provides a fast estimation of
|
---|
| 270 | % visibility of the given region since it does not require the 5D
|
---|
| 271 | % polyhedra enumeration. Visibility of the given face of the region is
|
---|
| 272 | % determined by a traversal of the occlusion tree and testing the
|
---|
| 273 | % position of the corresponding blocker polyhedron with respect to the
|
---|
| 274 | % encountered hyperplanes as described in
|
---|
| 275 | % Section~\ref{sec:insertion_nosplit}. If the blocker polyhedron
|
---|
| 276 | % reaches only $in$-leaves and the face is behind the polygon(s)
|
---|
| 277 | % associated with the leaves, the face is classified invisible
|
---|
| 278 | % . Otherwise, it is conservatively classified as visible. The
|
---|
| 279 | % visibility of the whole region is determined using a combination of
|
---|
| 280 | % visibility of its faces as mentioned in the previous section.
|
---|
[249] | 281 |
|
---|
[273] | 282 | \subsection{Optimizations}
|
---|
[249] | 283 |
|
---|
| 284 | \label{sec:rot3d_optimizations}
|
---|
| 285 |
|
---|
| 286 | Below we discuss several optimization techniques that can be used to
|
---|
| 287 | improve the performance of the algorithm. The optimizations do not
|
---|
| 288 | alter the accuracy of the visibility algorithm.
|
---|
| 289 |
|
---|
[266] | 290 | % \subsection{Occluder sorting}
|
---|
[249] | 291 |
|
---|
[266] | 292 | % Occluder sorting aims to increase the accuracy of the front-to-back
|
---|
| 293 | % ordering determined by the approximate occlusion sweep. Higher
|
---|
| 294 | % accuracy of the ordering decreases the number of the late merging of
|
---|
| 295 | % blocker polyhedra in the tree. Recall that the merging extends the
|
---|
| 296 | % occlusion tree by a blocker polyhedron corresponding to an occluder
|
---|
| 297 | % that hides an already processed occluder.
|
---|
[249] | 298 |
|
---|
[266] | 299 | % The occluder sorting is applied when reaching a leaf node of the
|
---|
| 300 | % spatial hierarchy during the approximate occlusion sweep. Given a leaf
|
---|
| 301 | % node $N$ the occluder sorting proceeds as follows:
|
---|
[249] | 302 |
|
---|
[266] | 303 | % \begin{enumerate}
|
---|
| 304 | % \item Determine a ray $r$ piercing the center of the source polygon
|
---|
| 305 | % $P_S$ and the node $N$.
|
---|
| 306 | % \item Compute intersections of $r$ and all supporting planes of the
|
---|
| 307 | % polygons associated with $N$.
|
---|
| 308 | % \item Sort the polygons according to the front-to-back order of the
|
---|
| 309 | % corresponding intersection points along $r$.
|
---|
| 310 | % \end{enumerate}
|
---|
[249] | 311 |
|
---|
[266] | 312 | % The occluder sorting provides an exact priority order within the given
|
---|
| 313 | % leaf in the case that the polygons are pierced by the computed ray $r$
|
---|
| 314 | % and they do not intersect.
|
---|
[249] | 315 |
|
---|
| 316 |
|
---|
[273] | 317 | \subsubsection{Visibility estimation}
|
---|
[249] | 318 |
|
---|
| 319 | The visibility estimation aims to eliminate the polyhedron
|
---|
| 320 | enumeration in the leaves of the occlusion tree. If we find out that
|
---|
| 321 | the currently processed polygon is potentially visible in the given
|
---|
| 322 | leaf-node (it is an $out$-leaf or it is an $in$-leaf and the
|
---|
| 323 | positional test reports the polygon as the closest), we estimate its
|
---|
| 324 | visibility by shooting random rays. We can use the current occlusion
|
---|
| 325 | tree to perform ray shooting in line space. We select a random ray
|
---|
| 326 | connecting the source polygon and the currently processed
|
---|
| 327 | polygon. This ray is mapped to a \plucker point and this point is
|
---|
| 328 | tested for inclusion in halfspaces defined by the \plucker planes
|
---|
| 329 | splitting the polyhedron on the path from to root to the given
|
---|
| 330 | leaf. If the point is contained in all tested halfspaces the
|
---|
| 331 | corresponding ray is unoccluded and the algorithm inserts the blocker
|
---|
| 332 | polyhedron into the tree. Otherwise it continues by selecting another
|
---|
| 333 | random ray until a predefined number of rays was tested.
|
---|
| 334 |
|
---|
| 335 | The insertion of the blocker polyhedron devotes further
|
---|
| 336 | discussion. Since the polyhedron was not enumerated we do not know
|
---|
| 337 | which of its bounding hyperplanes really bound the polyhedron fragment
|
---|
| 338 | and which are redundant for the given leaf. Considering all
|
---|
| 339 | hyperplanes defining the blocker polyhedron could lead to inclusion of
|
---|
| 340 | many redundant nodes in the tree. We used a simple conservative
|
---|
| 341 | algorithm that tests if the given hyperplane is bounding the
|
---|
| 342 | (unconstructed) polyhedron fragment. For each hyperplane $H_i$
|
---|
| 343 | bounding the blocker polyhedron the algorithm tests the position of
|
---|
| 344 | extremal lines embedded in this hyperplane with respect to each
|
---|
| 345 | hyperplane splitting the polyhedron. If mappings of all extremal lines
|
---|
| 346 | lay in the same open halfspace defined by a splitting hyperplane,
|
---|
| 347 | hyperplane $H_i$ does not bound the current polyhedron fragment and
|
---|
| 348 | thus it can be culled.
|
---|
| 349 |
|
---|
| 350 |
|
---|
[273] | 351 | \subsubsection{Visibility merging}
|
---|
[249] | 352 |
|
---|
| 353 | Visibility merging aims to propagate visibility classifications from
|
---|
| 354 | the leaves of the occlusion tree up into the interior nodes of the
|
---|
| 355 | hierarchy. Visibility merging is connected with the approximate
|
---|
| 356 | occlusion sweep, which simplifies the treatment of the depth of the
|
---|
| 357 | scene polygons.
|
---|
| 358 |
|
---|
| 359 | The algorithm classifies an interior node of the occlusion tree as
|
---|
| 360 | occluded ($in$) if the following conditions hold:
|
---|
| 361 |
|
---|
| 362 | \begin{itemize}
|
---|
| 363 | \item Both its children are $in$-nodes.
|
---|
| 364 | \item The occluders associated with both children are strictly closer than
|
---|
| 365 | the closest unswept node of the spatial hierarchy.
|
---|
| 366 | \end{itemize}
|
---|
| 367 |
|
---|
| 368 | The first condition ensures that both child nodes correspond to
|
---|
| 369 | occluded nodes. The second condition ensures that any unprocessed
|
---|
| 370 | occluder is behind the occluders associated with the children. Using
|
---|
| 371 | this procedure the effective depth of the occlusion becomes
|
---|
| 372 | progressively smaller if more and more rays become occluded.
|
---|
| 373 |
|
---|
| 374 |
|
---|
| 375 |
|
---|
| 376 | \section{Conservative Verifier}
|
---|
| 377 |
|
---|
[266] | 378 | A conservative verifier is a faster alternative to the exact
|
---|
| 379 | visibility verifier described above. The verifier is an extension of
|
---|
| 380 | the strong occlusion algorithm of Cohen-Or et
|
---|
[277] | 381 | al.~\cite{cohen-egc-98}. In particular our verifier refines the search
|
---|
[269] | 382 | for a strong occluder by using a hierarchical subdivision of space of
|
---|
[266] | 383 | lines connecting the two regions tested for mutual
|
---|
| 384 | visibility. Initially the shaft bounding the the tested regions is
|
---|
| 385 | constructed. Rays bounding the shaft are traced through the scene and
|
---|
| 386 | we compute all intersections with the scene objects between the tested
|
---|
| 387 | regions. The the algorithm proceeds as follows:
|
---|
[249] | 388 |
|
---|
[266] | 389 | \begin{itemize}
|
---|
| 390 | \item In the case that any ray does not intersect any object the
|
---|
| 391 | tested regions are classified as visibility and the algorithm
|
---|
| 392 | terminates.
|
---|
| 393 | \item If the rays intersect the same convex object (at any
|
---|
| 394 | depth) this object is a strong occluder with respect to the shaft and
|
---|
| 395 | thus it also hides all rays in the corresponding shaft.
|
---|
| 396 | \item If the rays do not intersect a single convex object four new
|
---|
| 397 | shafts are constructed by splitting both regions in half and the
|
---|
[277] | 398 | process is repeated recursively.
|
---|
[266] | 399 | \end{itemize}
|
---|
[249] | 400 |
|
---|
[266] | 401 | If the subdivision does not terminate till reaching a predefined
|
---|
[277] | 402 | subdivision depth, we conservatively classify the tested regions as
|
---|
[282] | 403 | mutually visible. The conservative verifier is illustrated at
|
---|
| 404 | Figure~\ref{fig:conservative_sampling}.
|
---|
[266] | 405 |
|
---|
[282] | 406 | \begin{figure}[htb]
|
---|
| 407 | \centerline{
|
---|
| 408 | \includegraphics[width=0.7\textwidth,draft=\DRAFTFIGS]{figs/conservative_sampling}}
|
---|
| 409 | \caption{An example of the conservative visibility verification. The figure shows two
|
---|
| 410 | tested regions (the view cell and the object) and several
|
---|
| 411 | occluders. For sake of clarity we only show samples which are
|
---|
| 412 | boundaries of shafts on one path of the line space subdivision tree.
|
---|
| 413 | The subdivision terminates at the yellow shaft since a single strong
|
---|
| 414 | occluder has been found. }
|
---|
| 415 | \label{fig:conservative_sampling}
|
---|
| 416 | \end{figure}
|
---|
[266] | 417 |
|
---|
[282] | 418 |
|
---|
[266] | 419 | \section{Error Bound Approximate Verifier}
|
---|
| 420 |
|
---|
| 421 | The approximate verifier will be based on the similar idea as the
|
---|
| 422 | conservative one. However it will behave differently in the finer
|
---|
| 423 | subdivision of the ray shafts. The idea is to use the above algorithm
|
---|
[282] | 424 | as far as the shafts get small enough that we can neglect objects
|
---|
| 425 | which can be seen through such a shaft. Even if not all rays inside
|
---|
| 426 | the shaft are not blocked by scene objects, a pixel error induced due
|
---|
| 427 | to omission of objects potential visible behind the shaft will be
|
---|
[283] | 428 | below a given threshold.
|
---|
[266] | 429 |
|
---|
| 430 | For the computation of the maximal error due to the current shaft we
|
---|
[272] | 431 | assume that one tested region is a view cell, whereas the other is an
|
---|
[266] | 432 | object bounding box or cell of the spatial hierarchy. The threshold is
|
---|
[284] | 433 | computed as follows: We first triangulate the farthest intersection
|
---|
| 434 | points in the shaft as seen from the view cell side of the shaft. Then
|
---|
| 435 | for each computed triangle we calculate a point in the view cell which
|
---|
| 436 | maximizes the projected area of the triangle (see
|
---|
| 437 | Figure~\ref{fig:approximate_sampling}). The conservative estimate of
|
---|
| 438 | the maximal error is then given by a sum of the computed projected
|
---|
| 439 | areas. If this error is below a specified threshold we terminate the
|
---|
| 440 | subdivision of the current shaft.
|
---|
[266] | 441 |
|
---|
[284] | 442 | %We calculate a point in the view cell which
|
---|
| 443 | %maximizes the projected area of the object with respect to the shaft
|
---|
| 444 | %. The conservative estimate
|
---|
| 445 | %of the maximal error is then given by the computed projected area.
|
---|
| 446 |
|
---|
[282] | 447 | \begin{figure}[htb]
|
---|
| 448 | \centerline{
|
---|
[284] | 449 | \includegraphics[width=0.7\textwidth,draft=\DRAFTFIGS]{figs/approximate_sampling2}}
|
---|
[282] | 450 | \caption{An example of the approximate error bound visibility verification. The figure shows two
|
---|
| 451 | tested regions (the view cell and the object) and two
|
---|
[284] | 452 | occluders. Due to the 2D nature of the example the triangulation is depicted as
|
---|
| 453 | the red line segment. The maximal error for the possible viewpoints in the shaft
|
---|
| 454 | corresponds to the angle $\alpha$.
|
---|
[282] | 455 | }
|
---|
| 456 | \label{fig:approximate_sampling}
|
---|
| 457 | \end{figure}
|
---|
| 458 |
|
---|
[249] | 459 | %Option: - if there is sufficient number of samples from 1 + 2 and some
|
---|
| 460 | %of their statistic (local spatial and directional density + distances
|
---|
| 461 | %to the visible objects), maybe an error estimate could only be derived
|
---|
| 462 | %from there values.
|
---|
| 463 |
|
---|
[266] | 464 | % a) is perhaps the most interesting since this has not been done so far at all. I though about different methods how to do that (e.g. maintaining a triangulated front visible layer), but I always found some problem. I believe that the method which is almost implemented now is solid and I just wonder what performance it will achieve.
|
---|
[249] | 465 |
|
---|
[266] | 466 | % The basic idea is the following:
|
---|
[249] | 467 |
|
---|
[272] | 468 | % Use 2 plane parametrization for describing all lines intersecting the object and the view cell. The line sets will be described by aligned rectangles on the two planes which allows to construct convex shafts bounded always by only 4 lines. After determing the initial rectangles bounding the whole line set perform recursive subdivsion as follows:
|
---|
[249] | 469 |
|
---|
[266] | 470 | % 1. Cast the 4 corner rays and deterine ALL intersections with the occluding objects
|
---|
[249] | 471 |
|
---|
[272] | 472 | % 2. If any ray is unoccluded termite the whole test with VISIBLE and extend the PVS of the object with the new view cell (and possibly more if the rays goes further). Start the verification for the new view cells in the occluded layer.
|
---|
[249] | 473 |
|
---|
[266] | 474 | % 3. If all 4 rays pierce the same convex mesh, (or mesh triangle for non convex meshes) terminate this branch with INVISIBLE. Note the terminating mesh need not be the front most one.
|
---|
[249] | 475 |
|
---|
[266] | 476 | % 4. Triangulate the depth of the shaft as seen from the viecell side of the shaft and compute the maximal projected area of the 2 computed triangles. This determines the maximal pixel error we can make by terminating this branch as invisible.
|
---|
| 477 | % Note that here it would be the best to selected those intersections for the rays which have the most similar depths to better estimate the maximal error, i.e. the "depth triangles" need not be formed by the first visible layer.
|
---|
[249] | 478 |
|
---|
[272] | 479 | % 5. If 4 does not terminate subdivide either the view cell or the object rectangle depending on the sample depths and error computed.
|
---|
[249] | 480 |
|
---|
[266] | 481 | % It is actually quite simple to create a conservative variant of the algorithm: subdivide only to a given depth and avoid test 4. Then the samples can only be terminated by a "STRONG occluder" which hides the whole shaft. This is similar to Dannys method, but here a hierarchical shaft subdivision is performed which should deliver much more accuracy.
|
---|
[249] | 482 |
|
---|
| 483 |
|
---|
[266] | 484 | % > Partly: area subdivision algorithm does not only cast "corner" rays, but maintains lists of the triangles for the given area. However the basic idea is the same: subdivide the set or rays until there is a trivial decision (a single convex object intersected by all corner rays) or the error is too small. The second criterion is different from the from-poin t setup, since the error cannot be evaluated in a single projection plane.
|
---|
| 485 | % > That is why this triangulation would be done: Imagine that the 4 corner rays of a shaft intersect some object(s) in the scene. Now connect these intersection points by creating two triangles. These triangles do not exist in the scene, but define the largest possible windows through which we can see further in the shaft. Now it is easy to find two points at the origin of the shaft which maximize the projected area of the two triangles. The sum of these areas gives a conservative estimate of the spatial angle error which can be made by not subdividing the shaft any further.
|
---|
| 486 | % > Is this description clearer?
|
---|
[249] | 487 |
|
---|
| 488 |
|
---|
[266] | 489 | % partly - I just don't see it in front of me now. How is the result influenced by which triangles are chosen? Is it so that the nearer the intersections, the bigger the error?
|
---|
[249] | 490 |
|
---|
| 491 |
|
---|
| 492 |
|
---|
| 493 | \section{Summary}
|
---|
| 494 |
|
---|
| 495 | \label{sec:rot3d_summary}
|
---|
| 496 |
|
---|
[277] | 497 | This chapter presented a mutual visibility verification algorithms, which determine
|
---|
[266] | 498 | whether two regions in the scene are visible.
|
---|
[249] | 499 |
|
---|
[277] | 500 | First, we have described an exact visibility algorithm which is a
|
---|
| 501 | simple of modification of an algorithm for computing from-region
|
---|
[266] | 502 | visibility in polygonal scenes. The key idea is a hierarchical
|
---|
| 503 | subdivision of the problem-relevant line set using \plucker
|
---|
| 504 | coordinates and the occlusion tree. \plucker coordinates allow to
|
---|
| 505 | perform operations on sets of lines by means of set theoretical
|
---|
| 506 | operations on the 5D polyhedra. The occlusion tree is used to maintain
|
---|
| 507 | a union of the polyhedra that represent lines occluded from the given
|
---|
| 508 | region (polygon). We described two algorithms for construction of the
|
---|
| 509 | occlusion tree by incremental insertion of blocker polyhedra. The
|
---|
| 510 | occlusion tree was used to test visibility of a given polygon or
|
---|
| 511 | region with respect to the source polygon/region. We proposed several
|
---|
| 512 | optimization of the algorithm that make the approach applicable to
|
---|
| 513 | large scenes. The principal advantage of the exact method over the
|
---|
| 514 | conservative and the approximate ones is that it does not rely on
|
---|
| 515 | various tuning parameters that are characterizing many conservative or
|
---|
| 516 | approximate algorithms. On the other hand the exactness of the method
|
---|
| 517 | requires higher computational demands and implementation effort.
|
---|
[249] | 518 |
|
---|
[266] | 519 | Second, we have described a conservative verifier which is an
|
---|
| 520 | extension of the algorithm based on strong occluders. The conservative
|
---|
[277] | 521 | verifier requires a specification of the shaft size at which the
|
---|
| 522 | tested regions are conservatively classified as visible.
|
---|
[249] | 523 |
|
---|
[277] | 524 | Third, we have described an approximate error bound verifier which
|
---|
| 525 | extends the conservative verifier by using automatic termination
|
---|
| 526 | criteria based on the estimation of maximal error for the given shaft.
|
---|
[266] | 527 |
|
---|