Changeset 2177 for GTP/trunk


Ignore:
Timestamp:
03/01/07 10:19:55 (18 years ago)
Author:
mattausch
Message:
 
Location:
GTP/trunk/Lib/Vis
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Vis/OnlineCullingCHC/scripts/terrainCulling.cfg

    r2130 r2177  
    2727#Scene=../../../../../resources/media/house_test1.iv 
    2828#Scene=../../../../../resources/media/city1500_flat_1.iv;../../../../../resources/media/roofs_1500.iv;../../../../../resources/media/CityRoads60.iv;../../../../../resources/media/CityPlane60.iv 
    29 #Scene=../../../../../resources/media/city1.iv;../../../../../resources/media/roofs_1500.iv;../../../../../resources/media/CityRoads60.iv 
     29#Scene=../../../../../resources/media/city1.iv;../../../../../resources/media/roofs_1500.iv;../../../../../resources/media/CityRoads60.iv;../../../../../resources/media/CityPlane60.iv 
    3030 
    3131# 
     
    3737 
    3838# 
    39 # should render queue be flushed after each frame? 
     39# render queue is flushed after some frames 
    4040# 
    4141 
    42 #FlushQueue=true 
     42FlushQueue=1 
    4343 
     44# 
     45# depth pass must be used together with illumination model 
     46# 
     47 
     48UseDepthPass=0 
    4449 
    4550 
     
    5560# should render queue be flushed after each frame? 
    5661# 
    57  
    58 FlushQueue=false 
    59  
    60 #UseDepthPass=false 
    6162 
    6263 
  • GTP/trunk/Lib/Vis/Preprocessing/manual/integration.tex

    r2111 r2177  
    11\section{Introduction} 
    22\label{sec:introduction} 
     3 
     4\label{fig:pvs} 
     5\end{figure*} 
     6\begin{figure*} 
     7\centering 
     8\includegraphics[width=0.33\textwidth]{images/pvs} 
     9\caption{The PVS Computation Module integrated in the Ogre3d engine.  
     10A snapshot of Vienna is shown, with the rendered PVS shown in the lower right corner. Note  
     11how the PVS closely fits to the geometry actually seen.} 
    312 
    413This manual provides a guide to apply preprocessed visibility in a particular target engine. It 
     
    8796\end{itemize} 
    8897 
    89 This include directory must be added to your Solution. 
     98The following include directory must be added to your Solution. 
    9099 
    91100\begin{itemize} 
     
    97106For this purpose we associate the entities of the engine with the PVS 
    98107entries from the visibility solution.  
    99 For this purposse the user must implement a small number of interface classes 
     108For this purpose the user must implement a small number of interface classes 
    100109of the preprocessor. 
    101110We demonstrate this on a small example, which shows how to access preprocessed visibility  
     
    118127 
    119128This piece of code is loading the view cells into the engine. 
    120 Let's analyze this code. There are two constructs that need explanation, the 
    121 BoundingBoxConverter and the ObjectContainer, and the view cells manager. 
     129Let's analyze this code. There are three constructs that need explanation, the 
     130BoundingBoxConverter and the ObjectContainer, and the ViewCellsManager. 
    122131 
    123132\paragraph{BoundingBoxConverter} 
     
    139148\label{sec:ObjectContainer} 
    140149 
    141 The object container is basicly a vector of {\em Intersectable *}. It contains all 
     150An object container is a vector of {\em Intersectable *}. It contains all 
    142151static entities of the scene. 
    143152A PVS entry must be derived from this class. To get access to the PVS of a view cell, 
     
    148157\label{sec:Loading} 
    149158 
    150 The loading function returns a view cells. 
     159The loading function returns a view cells manager. 
    151160 
    152161\begin{verbatim} 
    153162static ViewCellsManager *LoadViewCells(const string &filename,  
    154                                                                                    ObjectContainer *objects,  
    155                                                                                    bool finalizeViewCells = false, 
    156                                                                                    BoundingBoxConverter *bconverter = NULL); 
     163                                       ObjectContainer *objects, 
     164                                       bool finalizeViewCells = false, 
     165                                       BoundingBoxConverter *bconverter = NULL); 
    157166\end{verbatim} 
    158167 
     
    167176 
    168177In this section we show an example implementation for the interface classes in Ogre3D. 
    169  
    170 \subsection{Intersectable} 
     178First for the object class of the preprocessor, {\em Intersectable}, then for the converter class  
     179{\em BoundingBoxConverter }. 
     180 
     181\subsection{Class Intersectable} 
    171182\label{sec:intersectable} 
    172183 
     
    204215 
    205216 
    206 \subsection{Bounding Box Converter} 
     217\subsection{Class BoundingBoxConverter} 
    207218\label{sec:Converter} 
    208219 
    209 This is maybe the most tricky part of the integration. The bounding box converter 
    210 is necessary because we have to associate the objects of the visibility solution with 
    211 the objects from the engine without having unique ids. This is the interface 
    212 of the {\em BoundingBoxConverter }. 
     220This is the most involved part of the integration, but it shouldn't be too difficult, either.  
     221A bounding box converter is necessary because we have to associate the objects of the  
     222visibility solution with the objects from the engine without having unique ids. This is the  
     223interface of the class {\em BoundingBoxConverter }. 
    213224 
    214225\begin{verbatim} 
     
    237248\end{verbatim} 
    238249 
    239 We give an example of implementation of a Bounding Box Converter  
    240 for Ogre3D rendering engine. It is templated in order to works with any Ogre SceneManager. 
     250We give an example of implementation of a {\em BoundingBoxConverter }  
     251for the Ogre3D rendering engine. It is templated in order to works with any {\em SceneManager } in Ogre3D 
     252(If you are not familiar with the {\em SceneManager} concept in Ogre3D, it does not matter). 
    241253Again, the implementation of this interface must be adapted for the requirements  
    242254of the particular engine.  
     
    272284 
    273285This class is inherited from {\em BoundingBoxConverter}. 
    274 {\em BoundingBoxConverters} has only one virtual function {\em IdentifyObjects} that must 
     286This class has only one virtual function {\em IdentifyObjects} that must 
    275287be implemented. Additionally we use a helper function {\em FindIntersectingObjects} that  
    276288is responsible for locating the corresponding objects in the scene. Let's now have a look  
     
    306318 
    307319The function just loops over the bounding boxes of the PVS entries and finds the entities that 
    308 are intersected by the bouding boxes. Let's have a look now at the function  
    309 {\em FindIntersectingObjects}, which is searching the intersections for each individual box. 
     320are intersected by the bounding boxes. Additionally we introduce a new class, the { \em OgreTypeConverter }. 
     321This class is just responsible for converting basic classes like {\em Vector3 } or { \em AxisAlignedBox } 
     322betwen Ogre3D types and Preprocessor types. Now we revisit the function  
     323{\em FindIntersectingObjects}, which searches the intersections for each individual box. 
    310324 
    311325\begin{verbatim} 
     
    354368 
    355369Note that the implementation of this function is maybe the one that differs the most 
    356 for another engine, as it is highly depending on the particular engine design.  
     370for other engines, as it is highly depending on the particular engine design.  
    357371For the Ogre3D implementation, we use a two stage approach. First we find the  
    358372intersecting scene nodes. We apply a search function that is optimized for this engine.  
     
    360374The engine is responsible to provide a function for fast geometric search in the scene, 
    361375in order to quickly find the objects intersecting the bounding box of a PVS entry.  
    362 A spatial data structure like Octree or Kd tree is very useful in this regard. 
     376A spatial data structure like octree or kd-tree is very useful in this regard. 
    363377Second we traverse through the list of entities attached to the scene node. The intersection 
    364378test is then applied for each indiviual bounding box.  
     
    367381\label{sec:usage} 
    368382 
    369 By now the view cells should be accessible within the target engine. The  
     383At this point the view cells should be accessible within the target engine. The  
    370384view cells manager provides the necessary functionality to handle the view cells.  
    371385In order to query the current view cell, use the following function of the  
     
    376390\end{verbatim} 
    377391 
    378 In your engine, the function will called like this. 
     392In the target engine, the function is envoked like this. 
    379393 
    380394\begin{verbatim} 
Note: See TracChangeset for help on using the changeset viewer.