Index: trunk/VUT/doc/SciReport/introduction.tex
===================================================================
--- trunk/VUT/doc/SciReport/introduction.tex	(revision 266)
+++ trunk/VUT/doc/SciReport/introduction.tex	(revision 273)
@@ -1,3 +1,3 @@
-\chapter{Introduction to visibility problems and algorithms}%\chapter
+\chapter{Introduction}%\chapter
 
 \label{chap:overview}
@@ -6,12 +6,12 @@
  This chapter provides introduction to visibility problems and
 algorithms for computer graphics. In particular it presents a taxonomy
-of visibility problems based on the {\em problem domain} and the {\em
-type of the answer}. The taxonomy helps to understand the nature of a
-particular visibility problem and provides a tool for grouping
-problems of similar complexity independently of their target
-application. We discuss typical visibility problems encountered in
-computer graphics including their relation to the presented
-taxonomy. Finally, we classify the latert described visibility tools
-according to the presented taxonomy.
+of visibility problems and algorithms. We discuss typical visibility
+problems encountered in computer graphics including their relation to
+the presented taxonomy. Finally, we classify the later described
+visibility tools according to the presented taxonomy.
+
+
+\section{Structure of the report}
+
 
 
@@ -24,5 +24,5 @@
 
 
-\subsection{Problem domain}
+\section{Domain of visibility problems}
 \label{sec:prob_domain}
 
Index: trunk/VUT/doc/SciReport/online.tex
===================================================================
--- trunk/VUT/doc/SciReport/online.tex	(revision 266)
+++ trunk/VUT/doc/SciReport/online.tex	(revision 273)
@@ -724,5 +724,5 @@
 \begin{figure}
 \centering 
-\includegraphics[width=0.35\textwidth,draft=\DRAFTIMAGES]{images/chc_shadows}
+\includegraphics[width=0.4\textwidth,draft=\DRAFTIMAGES]{images/chc_shadows}
 \caption{We can correctly handle shadow volumes together with CHC.}
 \label{fig:chc_shadows}
@@ -810,5 +810,5 @@
 
 \begin{figure}
-\centering \includegraphics[width=0.32\textwidth,draft=\DRAFTIMAGES]{images/city_vis}
+\centering \includegraphics[width=0.4\textwidth,draft=\DRAFTIMAGES]{images/city_vis}
 \caption{Visibility classification of the kD-tree nodes in the city scene.
   The orange nodes were found visible, all the other depicted nodes are invisible.
@@ -1075,5 +1075,5 @@
 
 
-\section{Conclusion}
+\section{Summary}
 \label{sec:conclusion}
 
@@ -1106,25 +1106,26 @@
 
 
-  The major potential in improving the method is a better estimation
- of changes in the visibility classification of hierarchy nodes. If
- nodes tend to be mostly visible, we could automatically decrease the
- frequency of occlusion tests and thus better adapt the method to the
- actual occlusion in the scene. Another possibility for improvement is
- better tuning for a particular graphics hardware by means of more
- accurate rendering cost estimation. Skipping occlusion tests for
- simpler geometry  can be faster than issuing comparably expensive
- occlusion queries.
+%   The major potential in improving the method is a better estimation
+%  of changes in the visibility classification of hierarchy nodes. If
+%  nodes tend to be mostly visible, we could automatically decrease the
+%  frequency of occlusion tests and thus better adapt the method to the
+%  actual occlusion in the scene. Another possibility for improvement is
+%  better tuning for a particular graphics hardware by means of more
+%  accurate rendering cost estimation. Skipping occlusion tests for
+%  simpler geometry  can be faster than issuing comparably expensive
+%  occlusion queries.
 
 
 \begin{figure*}[htb]
   \centerline{
-     \hfill
-     \includegraphics[height=0.2\textwidth,draft=\DRAFTFIGS]{images/teapots}
-     \hfill
-     \includegraphics[height=0.2\textwidth,draft=\DRAFTFIGS]{images/city}
-     \hfill
-     \includegraphics[height=0.2\textwidth,draft=\DRAFTFIGS]{images/pplant}
-     \hfill
-   }
+     \includegraphics[width=0.4\textwidth,draft=\DRAFTFIGS]{images/teapots}
+     }
+  \centerline{
+     \includegraphics[width=0.4\textwidth,draft=\DRAFTFIGS]{images/city}
+     }
+  \centerline{
+     \includegraphics[width=0.4\textwidth,draft=\DRAFTFIGS]{images/pplant}
+     }
+   
    \caption{The test scenes: the teapots, the city, and the power plant.}
    \label{fig:scenes}
Index: trunk/VUT/doc/SciReport/mutual.tex
===================================================================
--- trunk/VUT/doc/SciReport/mutual.tex	(revision 272)
+++ trunk/VUT/doc/SciReport/mutual.tex	(revision 273)
@@ -40,8 +40,8 @@
 
 
-\section{Exact Mutual Visibility Test}
-
-The exact mutual visibility test computes exact visibility between two
-polyhedrons in the scene. This is computed by testing visibility
+\section{Exact Verifier}
+
+The exact mutual visibility verifier computes exact visibility between
+two polyhedrons in the scene. This is computed by testing visibility
 between all pairs of potentially visible polygons of these
 polyhedrons.  For each pair of tested polygons the computation is
@@ -49,5 +49,5 @@
 used to determine the set of relevant occluders~\cite{Haines94}.
 
-\section{Occlusion tree}
+\subsection{Occlusion tree}
 \label{sec:rot3d_ot}
 
@@ -89,5 +89,5 @@
 
 
-\section{Occlusion tree construction}
+\subsection{Occlusion tree construction}
 
 \label{sec:rot3d_construct}
@@ -109,5 +109,5 @@
 
 
-\subsection{Insertion with splitting}
+\subsubsection{Insertion with splitting}
 
 \label{sec:rot3_insertwithsplit}
@@ -136,5 +136,5 @@
 the new subtree.
 
-\subsection{Insertion without splitting}
+\subsubsection{Insertion without splitting}
 \label{sec:insertion_nosplit}
 
@@ -209,7 +209,7 @@
 and combining the resulting visibility states.
 
-\subsection{Exact visibility test}
-
- The exact visibility for a given polyhedral region proceeds as
+%\subsection{Exact visibility test}
+
+ The exact visibility test for a given polyhedral region proceeds as
 follows: for each face of the region facing the given source polygon
 we construct a blocker polyhedron. The blocker polyhedron is then
@@ -226,22 +226,22 @@
 
 
-\subsection{Conservative visibility test}
-
-\label{sec:rot3_conserva}
-
- The conservative visibility test provides a fast estimation of
-visibility of the given region since it does not require the 5D
-polyhedra enumeration. Visibility of the given face of the region is
-determined by a traversal of the occlusion tree and testing the
-position of the corresponding blocker polyhedron with respect to the
-encountered hyperplanes as described in
-Section~\ref{sec:insertion_nosplit}.  If the blocker polyhedron
-reaches only $in$-leaves and the face is behind the polygon(s)
-associated with the leaves, the face is classified invisible
-. Otherwise, it is conservatively classified as visible.  The
-visibility of the whole region is determined using a combination of
-visibility of its faces as mentioned in the previous section.
-
-\section{Optimizations}
+% \subsection{Conservative visibility test}
+
+% \label{sec:rot3_conserva}
+
+%  The conservative visibility test provides a fast estimation of
+% visibility of the given region since it does not require the 5D
+% polyhedra enumeration. Visibility of the given face of the region is
+% determined by a traversal of the occlusion tree and testing the
+% position of the corresponding blocker polyhedron with respect to the
+% encountered hyperplanes as described in
+% Section~\ref{sec:insertion_nosplit}.  If the blocker polyhedron
+% reaches only $in$-leaves and the face is behind the polygon(s)
+% associated with the leaves, the face is classified invisible
+% . Otherwise, it is conservatively classified as visible.  The
+% visibility of the whole region is determined using a combination of
+% visibility of its faces as mentioned in the previous section.
+
+\subsection{Optimizations}
 
 \label{sec:rot3d_optimizations}
@@ -278,5 +278,5 @@
 
 
-\subsection{Visibility estimation}
+\subsubsection{Visibility estimation}
 
  The visibility estimation aims to eliminate the polyhedron
@@ -312,5 +312,5 @@
 
 
-\subsection{Visibility merging}
+\subsubsection{Visibility merging}
 
  Visibility merging aims to propagate visibility classifications from
Index: trunk/VUT/doc/SciReport/sampling.tex
===================================================================
--- trunk/VUT/doc/SciReport/sampling.tex	(revision 272)
+++ trunk/VUT/doc/SciReport/sampling.tex	(revision 273)
@@ -8,9 +8,10 @@
 \item The first step is an aggresive visibility sampling which gives
 initial estimate about global visibility in the scene. The sampling
-itself involves several strategies which will be described in
-section~\ref{sec:sampling}. The imporant property of the aggresive
-sampling step is that it provides a fast progressive solution to
-global visibility and thus it can be easily integrated into the game
-development cycle.
+itself involves several strategies which will be described bellow.
+The imporant property of the aggresive sampling step is that it
+provides a fast progressive solution to global visibility and thus it
+can be easily integrated into the game development cycle. The
+aggresive sampling will terminate when the average contribution of new
+ray samples falls bellow a predefined threshold.
 
 \item The second step is mutual visibility verification. This step
@@ -28,5 +29,4 @@
 \end{itemize}
 
-
 In traditional visibility preprocessing the view space is
 subdivided into view cells and for each view cell the set of visible
@@ -43,6 +43,4 @@
 
 Both these points will be addressed in this chapter in more detail.
-
-
 
 \section{Related work}
@@ -241,5 +239,6 @@
 strategies.
 
-\subsection{View Cell Representation}
+\subsection{View Space Partitioning}
+
 
 \begin{figure}[htb]
@@ -254,10 +253,16 @@
 
 
-A good partition of the scene into view cells is an essential part of every visibility
-system. If they are chosen too large, the PVS (Potentially Visibible Set) 
-of a view cells is too large for efficient culling. If they are chosen too small or
-without consideration, then neighbouring view cells contain redundant PVS information,
-hence boosting the PVS computation and storage costs for the scene. In the left image of figure~\ref{fig:vienna_viewcells} we see view cells of the Vienna model, generated by triangulation of the streets. 
-In the closeup (right image) we can see that each triangle is extruded to a given height to form a view cell prism.
+Before the visibility computation itself, we subdivide the space of
+all possible viewpoints and viewing directions into view cells. A good
+partition of the scene into view cells is an essential part of every
+visibility system. If they are chosen too large, the PVS (Potentially
+Visibible Set)  of a view cells is too large for efficient culling. If
+they are chosen too small or without consideration, then neighbouring
+view cells contain redundant PVS information, hence boosting the PVS
+computation and storage costs for the scene. In the left image of
+figure~\ref{fig:vienna_viewcells} we see view cells of the Vienna
+model, generated by triangulation of the streets.  In the closeup
+(right image) we can see that each triangle is extruded to a given
+height to form a view cell prism.
 
 In order to efficiently use view cells with our sampling method, we
@@ -294,10 +299,10 @@
   view cell insertion time & 0.016s & 7.984s \\\hline\hline
   \#nodes & 1137 & 597933 \\\hline\hline
-	\#interior nodes & 568 & 298966\\\hline\hline
-	\#leaf nodes  & 569 & 298967\\\hline\hline
-	\#splits & 25 & 188936\\\hline\hline
-	max tree depth & 13 & 27\\\hline\hline
-	avg tree depth & 9.747 & 21.11\\\hline\hlien
-	
+  \#interior nodes & 568 & 298966\\\hline\hline
+  \#leaf nodes  & 569 & 298967\\\hline\hline
+  \#splits & 25 & 188936\\\hline\hline
+  max tree depth & 13 & 27\\\hline\hline
+  avg tree depth & 9.747 & 21.11\\\hline\hlien
+  
  \end{tabular}
  \caption{Statistics for view cell BSP tree on the Vienna view cells and a selection of the Vienna view cells.}\label{tab:viewcell_bsp}
@@ -351,4 +356,13 @@
 \end{itemize}
 
+In the future we aim to extend the view cell construction by using
+feedback from the PVS computation: the view cells which contain many
+visibility changes will be subdivided further and neighboring view
+cells with similar PVSs will be merged. We want to gain a more precise
+information about visibility by selectivly storing rays with the
+viewcells and computing visibility statistics for subsets of rays
+which intersect subregions of the given view cell.
+
+
 \subsection{From-object based visibility}
 
@@ -380,12 +394,11 @@
 
 
-\subsection{Basic Randomized Sampling}
-
-
-The first phase of the sampling works as follows: At every pass of the
-algorithm visits scene objects sequentially. For every scene object we
-randomly choose a point on its surface. Then a ray is cast from the
-selected point according to the randomly chosen direction. We use a
-uniform distribution of the ray directions with respect to the
+\subsection{Naive Randomized Sampling}
+
+The naive global visibility sampling works as follows: At every pass
+of the algorithm visits scene objects sequentially. For every scene
+object we randomly choose a point on its surface. Then a ray is cast
+from the selected point according to the randomly chosen direction. We
+use a uniform distribution of the ray directions with respect to the
 halfspace given by the surface normal. Using this strategy the samples
 at deterministicaly placed at every object, with a randomization of
@@ -394,6 +407,15 @@
 information.
 
-
- The described algorithm accounts for the irregular distribution of the
+\begin{figure}%[htb]
+  \includegraphics[width=0.6\textwidth, draft=\DRAFTFIGS]{figs/sampling} \\
+%\label{tab:online_culling_example}
+  \caption{Three objects and a set of view cells corresponding to leaves
+    of an axis aligned BSP tree. The figure depicts several random
+    samples cast from a selected object (shown in red). Note that most
+    samples contribute to more view cells.  }
+  \label{fig:online_culling_example}
+\end{figure}
+
+The described algorithm accounts for the irregular distribution of the
 objects: more samples are placed at locations containing more
 objects. Additionally every object is sampled many times depending on
@@ -402,4 +424,13 @@
 of the view cells from which it is visible.
 
+Each ray sample can contribute by a associating a number of view cells
+with the object from which the sample was cast. If the ray does not
+leave the scene it also contributes by associating the pierced view
+cells to the terminating object. Thus as the ray samples are cast we
+can measure the average contribution of a certain number of most
+recent samples.  If this contribution falls bellow a predefined
+constant we move on to the next sampling strategy, which aim to
+discover more complicated visibility relations.
+ 
 
 \subsection{Accounting for View Cell Distribution}
@@ -421,5 +452,5 @@
 
  Visibility events correspond to appearance and disapearance of
- objects with respect to a moving view point. In polygonal scenes the
+objects with respect to a moving view point. In polygonal scenes the
 events defined by event surfaces defined by three distinct scene
 edges. Depending on the edge configuration we distinguish between
@@ -431,3 +462,39 @@
 objects.
 
-
+The first strategy starts similarly to the above described sampling
+methods: we randomly select an object and a point on its surface. Then
+we randomly pickup an object from its PVS. If we have mesh
+connectivity information we select a random silhouette edge from this
+object and cast a sample which is tangent to that object at the
+selectededge .
+
+The second strategy works as follows: we randomly pickup two objects
+which are likely to see each other. Then we determine a ray which is
+tangent to both objects. For simple meshes the determination of such
+rays can be computed geometrically, for more complicated ones it is
+based again on random sampling. The selection of the two objects works
+as follows: first we randomly select the first object and a random
+non-empty view cell for which we know that it can see the object. Then
+we randomly select an object associated with that view cell as the
+second object.
+
+
+ 
+\section{Summary}
+
+This chapter described a global visibility sampling tool which forms a
+core of the visibility preprocessing framework. The global visibility
+sampling computes aggresive visibility, i.e. it computes a subset of
+the exact PVS for each view cell. The aggresive sampling provides a
+fast progressive solution and thus it can be easily integrated into
+the game development cycle. The sampling itself involves several
+strategies which aim to pregressively discover more visibility
+relationships in the scene.
+
+The methods presented in this chapter give a good initial estimate
+about visibility in the scene, which can be verified by the mutual
+visibility tool described in the next chapter.
+
+
+
+
Index: trunk/VUT/doc/SciReport/report.tex
===================================================================
--- trunk/VUT/doc/SciReport/report.tex	(revision 250)
+++ trunk/VUT/doc/SciReport/report.tex	(revision 273)
@@ -132,4 +132,5 @@
 \begin{document}
 
+\tableofcontents
 
 % ---------------------------------------------------------------------
