Changeset 497


Ignore:
Timestamp:
01/04/06 18:39:24 (18 years ago)
Author:
mattausch
Message:

beware: bug in view cells merging

Location:
trunk/VUT/GtpVisibilityPreprocessor
Files:
11 added
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/VUT/GtpVisibilityPreprocessor/scripts/Preprocessor.vcproj

    r487 r497  
    2020                                Name="VCCLCompilerTool" 
    2121                                Optimization="0" 
    22                                 AdditionalIncludeDirectories="..\support;..\support\devil\include;..\support\zlib\include;..\include" 
     22                                AdditionalIncludeDirectories="..\support;..\support\devil\include;..\support\zlib\include;..\include;"$(QTDIR)"" 
    2323                                PreprocessorDefinitions="WIN32;_DEBUG;_LIB" 
    2424                                MinimalRebuild="TRUE" 
     
    6262                        <Tool 
    6363                                Name="VCCLCompilerTool" 
    64                                 AdditionalIncludeDirectories="..\support;..\support\devil\include;..\support\zlib\include;..\include" 
     64                                AdditionalIncludeDirectories="..\support;..\support\devil\include;..\support\zlib\include;..\include;&quot;$(QTDIR)\include\QtCore&quot;;&quot;$(QTDIR)\include\QtGui&quot;;&quot;$(QTDIR)\include&quot;;&quot;$(QTDIR)\include\QtOpenGl&quot;;include" 
    6565                                PreprocessorDefinitions="WIN32;NDEBUG;_LIB;" 
    6666                                RuntimeLibrary="2" 
     
    7676                        <Tool 
    7777                                Name="VCLinkerTool" 
    78                                 AdditionalDependencies="xerces-c_2.lib zdll.lib zziplib.lib devil.lib" 
    79                                 AdditionalLibraryDirectories="..\support\xercesc\lib\;..\support\zlib\lib\;..\support\devil\lib;&quot;$(QTDIR)\lib&quot;"/> 
     78                                AdditionalDependencies="xerces-c_2.lib zdll.lib zziplib.lib devil.lib qtmain.lib QtOpenGL4.lib QtUiTools.lib QtCore4.lib QtDesigner4.lib QtGui4.lib QtAssistantClient.lib QtTest4.lib Qt3Supportd4.lib QAxContainer.lib QAxServerd.lib QtXml4.lib glut32.lib OpenGL32.Lib glu32.lib QAxServer.lib QtDesignerComponents4.lib" 
     79                                AdditionalLibraryDirectories="..\support\xercesc\lib\;..\support\zlib\lib\;..\support\devil\lib;&quot;$(QTDIR)\lib&quot;;..\include\GL"/> 
    8080                        <Tool 
    8181                                Name="VCMIDLTool"/> 
     
    147147                        </File> 
    148148                        <File 
     149                                RelativePath="..\src\GlRenderer.cpp"> 
     150                        </File> 
     151                        <File 
     152                                RelativePath="..\src\GlRenderer.h"> 
     153                                <FileConfiguration 
     154                                        Name="Release|Win32"> 
     155                                        <Tool 
     156                                                Name="VCCustomBuildTool" 
     157                                                Description="Performing moc on $(InputName).h" 
     158                                                CommandLine="%qtdir%\bin\moc.exe $(InputDir)$(InputName).h -o $(InputDir)moc_$(InputName).cpp" 
     159                                                Outputs="$(InputDir)moc_$(InputName).cpp"/> 
     160                                </FileConfiguration> 
     161                        </File> 
     162                        <File 
    149163                                RelativePath="..\src\gzstream.cpp"> 
    150164                        </File> 
     
    195209                        </File> 
    196210                        <File 
     211                                RelativePath="..\src\moc_GlRenderer.cpp"> 
     212                        </File> 
     213                        <File 
     214                                RelativePath="..\src\moc_Preprocessor.cpp"> 
     215                        </File> 
     216                        <File 
     217                                RelativePath="..\src\moc_PreprocessorThread.cpp"> 
     218                        </File> 
     219                        <File 
    197220                                RelativePath="..\src\MutualVisibility.cpp"> 
    198221                        </File> 
     
    223246                        <File 
    224247                                RelativePath="..\src\Preprocessor.h"> 
     248                                <FileConfiguration 
     249                                        Name="Release|Win32"> 
     250                                        <Tool 
     251                                                Name="VCCustomBuildTool" 
     252                                                Description="Performing moc on $(InputName).h" 
     253                                                CommandLine="%qtdir%\bin\moc.exe $(InputDir)$(InputName).h -o $(InputDir)moc_$(InputName).cpp" 
     254                                                Outputs="$(InputDir)moc_$(InputName).cpp"/> 
     255                                </FileConfiguration> 
     256                        </File> 
     257                        <File 
     258                                RelativePath="..\src\PreprocessorThread.cpp"> 
     259                        </File> 
     260                        <File 
     261                                RelativePath="..\src\PreprocessorThread.h"> 
     262                                <FileConfiguration 
     263                                        Name="Release|Win32"> 
     264                                        <Tool 
     265                                                Name="VCCustomBuildTool" 
     266                                                Description="Performing moc on $(InputName).h" 
     267                                                CommandLine="%qtdir%\bin\moc.exe $(InputDir)$(InputName).h -o $(InputDir)moc_$(InputName).cpp" 
     268                                                Outputs="$(InputDir)moc_$(InputName).cpp"/> 
     269                                </FileConfiguration> 
    225270                        </File> 
    226271                        <File 
  • trunk/VUT/GtpVisibilityPreprocessor/scripts/default.env

    r495 r497  
    2121        # stored sample rays 
    2222        samplesFilename rays.out 
     23        useGlRenderer false 
    2324#       type sampling 
    2425        type vss 
     
    6869RssPreprocessor { 
    6970        samplesPerPass  100000 
    70         initialSamples 400000 
    71         vssSamples 1000000 
    72         vssSamplesPerPass 100000 
     71        initialSamples 500000 
     72        vssSamples 10000000 
     73        vssSamplesPerPass 500000 
    7374        useImportanceSampling true 
    74         loadInitialSamples true 
     75 
     76        directionalSampling true 
     77        objectBasedSampling false 
     78 
     79        Export { 
     80                pvs false 
     81                rssTree false 
     82                rays true 
     83                numRays 5000 
     84        } 
     85 
     86        useViewcells true 
     87        updateSubdivision true 
     88loadInitialSamples true 
    7589        storeInitialSamples false 
    7690} 
    7791 
     92 
    7893RssTree { 
    79         #useRss    false 
     94 
    8095        epsilon         1e-6 
    8196 
    8297        maxDepth        40 
    83         minPvs          5 
     98        minPvs          3 
    8499        minRays         30 
    85100        minSize         0.001 
    86         maxCostRatio    0.9 
    87         maxRayContribution 0.1 
    88          
     101        maxCostRatio 1.0 
     102        maxRayContribution 0.5 
     103        maxRays         1000000 
    89104        maxTotalMemory  200 
    90105        maxStaticMemory 100 
     
    93108#       splitType heuristic 
    94109        splitType hybrid 
    95         splitUseOnlyDrivingAxis false 
     110        splitUseOnlyDrivingAxis true 
     111        importanceBasedCost false 
    96112 
    97113        interleaveDirSplits     true 
    98     dirSplitDepth 9 
     114    dirSplitDepth 0 
    99115 
    100116        numberOfEndPointDomains 10000 
     
    152168        loadFromFile false 
    153169        #type kdTree 
    154         type vspKdTree 
     170        #type vspKdTree 
    155171        #type bspTree 
    156172        type vspBspTree 
     
    179195                colorCode Random 
    180196                exportRays false 
    181                 exportGeometry true 
     197                exportGeometry false 
    182198        } 
    183199         
     
    294310                minViewCells 500 
    295311                maxPvsSize   1000 
    296                 useRaysForMerge true 
     312                useRaysForMerge false 
    297313        } 
    298314} 
  • trunk/VUT/GtpVisibilityPreprocessor/src/GlRenderer.cpp

    r496 r497  
    1919GlRenderer::GlRenderer(SceneGraph *sceneGraph, 
    2020                                           ViewCellsManager *viewCellsManager): 
    21   mSceneGraph(sceneGraph), 
    22   mViewCellsManager(viewCellsManager) 
     21  Renderer(sceneGraph, viewCellsManager) 
    2322{ 
    2423  mSceneGraph->CollectObjects(&mObjects); 
     
    355354 
    356355 
    357 void 
     356bool 
    358357GlRenderer::RenderScene() 
    359358{ 
     
    369368        glEndList(); 
    370369  } 
     370  return true; 
    371371} 
    372372 
  • trunk/VUT/GtpVisibilityPreprocessor/src/GlRenderer.h

    r496 r497  
    88#include "Containers.h" 
    99#include "Halton.h" 
     10#include "Renderer.h" 
    1011 
    1112class SceneGraph; 
     
    4445*/ 
    4546 
    46 class GlRenderer 
     47class GlRenderer: public Renderer 
    4748{ 
    4849 
     
    7980  void RandomViewPoint(); 
    8081   
    81   void 
     82  bool 
    8283  RenderScene(); 
    8384 
  • trunk/VUT/GtpVisibilityPreprocessor/src/Halton.h

    r492 r497  
    1010   
    1111  float halton(float baseRec, float prev) const { 
    12         float r = 1 - prev - 1e-10; 
     12        float r = 1 - prev - 1e-10f; 
    1313        if (baseRec < r) 
    1414          return prev + baseRec; 
     
    2929   
    3030  Halton2() { 
    31         _invBases[0] = 1./2; 
    32         _invBases[1] = 1./3; 
     31        _invBases[0] = 1.0f/2; 
     32        _invBases[1] = 1.0f/3; 
    3333        Reset(); 
    3434  } 
     
    112112        int N1 = 0; 
    113113        int copyOfIndex = index; 
    114         if(base >= 2 & index >= 1) { 
     114        if((base >= 2) && (index >= 1)) { 
     115        // changed by matt 
     116        //if(base >= 2 & index >= 1) { 
    115117          while(copyOfIndex > 0) { 
    116118                N1 = (copyOfIndex / base); 
  • trunk/VUT/GtpVisibilityPreprocessor/src/Intersectable.h

    r492 r497  
    55#include "Pvs.h" 
    66 
    7 class VssRayContainer; 
     7struct VssRayContainer; 
    88 
    99class Intersectable { 
  • trunk/VUT/GtpVisibilityPreprocessor/src/RenderSimulator.cpp

    r482 r497  
    2828 
    2929RenderSimulator::RenderSimulator(ViewCellsManager *viewCellsManager): 
    30 Renderer(viewCellsManager) 
     30Renderer(NULL, viewCellsManager) 
    3131{} 
    3232 
     
    3535                                                                 float vcOverhead,  
    3636                                                                 float moveSpeed): 
    37 Renderer(viewCellsManager), 
     37Renderer(NULL, viewCellsManager), 
    3838mObjRenderCost(objRenderCost),  
    3939mVcOverhead(vcOverhead),  
  • trunk/VUT/GtpVisibilityPreprocessor/src/Renderer.cpp

    r468 r497  
    66{ 
    77} 
    8 Renderer::Renderer(ViewCellsManager *vcm): 
    9 mViewCellsManager(vcm) 
     8 
     9Renderer::Renderer(SceneGraph *sceneGraph, ViewCellsManager *vcm): 
     10mSceneGraph(sceneGraph), mViewCellsManager(vcm) 
    1011{ 
    1112} 
  • trunk/VUT/GtpVisibilityPreprocessor/src/Renderer.h

    r468 r497  
    55 
    66class ViewCellsManager; 
    7  
     7class SceneGraph; 
    88/** Abstract class used to render the scene. 
    99*/ 
     
    1414 
    1515        Renderer(); 
    16         Renderer(ViewCellsManager *vcm); 
    17  
     16        Renderer(SceneGraph *sceneGraph, ViewCellsManager *vcm); 
     17         
    1818        ~Renderer(); 
    1919 
     
    2626protected: 
    2727        ViewCellsManager *mViewCellsManager; 
     28        SceneGraph *mSceneGraph; 
    2829}; 
    2930 
  • trunk/VUT/GtpVisibilityPreprocessor/src/VspBspTree.cpp

    r495 r497  
    4545mViewCellsManager(NULL), 
    4646mStoreRays(false), 
    47 mOutOfBoundsCell(NULL) 
     47mOutOfBoundsCell(NULL), 
     48mShowInvalidSpace(false) 
    4849{ 
    4950        bool randomize = false; 
     
    15151516   
    15161517  ViewCell::NewMail(); 
    1517    
     1518 
    15181519  while (!nodeStack.empty())  
    1519         { 
     1520  { 
    15201521          BspNode *node = nodeStack.top(); 
    15211522          nodeStack.pop(); 
    15221523           
    1523           if (node->IsLeaf())  
    1524                 { 
     1524          if (node->IsLeaf() && !mShowInvalidSpace && node->TreeValid()) 
     1525          { 
    15251526                  ViewCell *viewCell = dynamic_cast<BspLeaf *>(node)->GetViewCell(); 
    15261527                   
    15271528                  if (!viewCell->Mailed())  
    1528                         { 
     1529                  { 
    15291530                          viewCell->Mail(); 
    15301531                          viewCells.push_back(viewCell); 
    1531                         } 
    1532                 } 
    1533                 else 
    1534                 { 
     1532                  } 
     1533          } 
     1534          else 
     1535          { 
    15351536                  BspInterior *interior = dynamic_cast<BspInterior *>(node); 
    15361537                   
    15371538                  nodeStack.push(interior->GetFront()); 
    15381539                  nodeStack.push(interior->GetBack()); 
    1539                 } 
    1540         } 
     1540          } 
     1541  } 
    15411542} 
    15421543 
  • trunk/VUT/GtpVisibilityPreprocessor/src/VspBspTree.h

    r495 r497  
    680680        BspViewCell *mOutOfBoundsCell; 
    681681 
     682        /// if invalid space should be shown 
     683        bool mShowInvalidSpace; 
     684 
    682685private: 
    683686         
  • trunk/VUT/GtpVisibilityPreprocessor/src/default.env

    r496 r497  
    1919 
    2020Preprocessor { 
     21        # stored sample rays 
     22        samplesFilename rays.out 
     23        useGlRenderer true 
    2124#       type sampling 
    22 #       type vss 
    23         type rss 
    24         useGlRenderer true 
     25        type vss 
     26#       type rss 
    2527} 
    2628 
     
    2830        samplesPerPass  100000 
    2931        initialSamples 500000 
    30         vssSamples 1000000 
    31         vssSamplesPerPass 50000 
     32        vssSamples 200000 
     33        vssSamplesPerPass 100000 
    3234        useImportanceSampling true 
     35        loadInitialSamples  false 
     36        storeInitialSamples false 
    3337} 
    3438 
     
    3943 
    4044        maxDepth        40 
    41         minPvs          3 
    42         minRays         200 
     45        minPvs          30 
     46        minRays         1000 
    4347        minSize         0.001 
    44         maxCostRatio    2.0 
     48        maxCostRatio    0.9 
    4549        maxRayContribution 0.05 
    4650         
    4751        maxTotalMemory  200 
    48         maxStaticMemory 100 
    49  
    50 #       splitType regular 
     52        maxStaticMemory 20 
     53 
     54        splitType regular 
    5155#       splitType heuristic 
    52         splitType hybrid 
     56#       splitType hybrid 
    5357        splitUseOnlyDrivingAxis true 
    5458 
     
    8286        useViewcells true 
    8387        updateSubdivision true 
    84 } 
     88loadInitialSamples true 
     89        storeInitialSamples false 
     90} 
     91 
    8592 
    8693RssTree { 
     
    168175         
    169176        height 5.0 
    170         maxViewCells 0 
    171          
    172         PostProcessing { 
    173         minPvsDif 100 
     177        maxViewCells 500 
     178        maxPvs 200 
     179         
     180         
     181PostProcess { 
     182                minPvsDif 100 
    174183                minPvs 10 
    175184                maxPvs 150 
    176185                # how much samples are used for post processing 
    177                 samples 10 
    178         } 
    179  
    180         Visualization { 
    181                 # how much samples are be used for visualization 
    182                 samples 90000 
     186                samples 100000 
     187        } 
     188 
     189                Visualization { 
     190                # how much samples we use for visualization 
     191                samples 5000 
     192                #colorCode PVS 
     193                #colorCode MergedLeaves 
     194                #colorCode MergedTreeDiff 
     195                colorCode Random 
     196                exportRays false 
     197                exportGeometry true 
    183198        } 
    184199         
    185200#       filename ../data/atlanta/atlanta_viewcells_large.x3d 
    186         filename ../data/vienna/viewcells-25-sel.x3d 
     201#       filename ../data/vienna/viewcells-25-sel.x3d 
    187202#       filename ../data/vienna/viewcells-25.x3d 
    188203#       filename ../data/vienna/viewcells-large-sel.x3d 
     
    192207Simulation { 
    193208        objRenderCost 1.0 
    194         vcOverhead 7.0 
    195         moveSpeed 3.0 
     209        vcOverhead 1.0 
     210        # always between 0 and 1 
     211        moveSpeed 0.0001 
    196212} 
    197213 
     
    201217 
    202218        Construction { 
    203                 samples 100000 
     219                samples 300000 
    204220        } 
    205221         
     
    207223                maxDepth                40 
    208224                minPvs                  50 
    209                 minRays         1 
    210                 minSize         0.1 
    211                 maxCostRatio    999.0 
    212                 maxRayContribution 0.2 
    213         } 
    214          
    215         maxTotalMemory  400 
    216         maxStaticMemory 200 
    217  
    218         splitType regular 
    219 #       splitType heuristics 
     225                minRays                 300 
     226                minSize                 0.001 
     227                maxCostRatio            0.9 
     228                missTolerance           4 
     229                maxRayContribution      0.5 
     230        } 
     231         
     232        maxTotalMemory  100 
     233        maxStaticMemory 50 
     234 
     235        splitType       regular 
     236        #splitType      heuristics 
     237        splitUseOnlyDrivingAxis true 
    220238        ct_div_ci       0.0 
     239         
     240        # maximal cost for merging a view cell 
     241        PostProcess { 
     242                maxCostRatio 0.005 
     243                minViewCells 200 
     244                maxPvsSize   50000 
     245        } 
     246         
     247         
     248        Visualization { 
     249        } 
    221250} 
    222251 
    223252VspBspTree { 
    224253        Construction { 
    225                 samples 100000 
     254                samples 500000 
    226255                epsilon 0.005 
     256                randomize false 
    227257        } 
    228258 
     
    237267         
    238268        # maximal candidates for split planes 
    239         maxPolyCandidates 50 
    240         maxRayCandidates 50 
     269        maxPolyCandidates 100 
     270        maxRayCandidates 100 
    241271         
    242272        # maximal tested rays for split cost heuristics 
    243         maxTests 10000 
     273        maxTests 2000 
    244274         
    245275        # factors for evaluating split plane costs 
     
    252282        Termination { 
    253283                # parameters used for autopartition 
    254                 minRays 1000 
    255                 minPolygons -1 
    256                 maxDepth 40 
    257                 minPvs 20 
    258                 minArea 200000 
    259                 maxRayContribution 0.005 
    260                 #maxAccRayLength 100 
     284                minRays                 100 
     285                minPolygons             -1 
     286                maxDepth                30 
     287                minPvs                  20 
     288                #minArea                0.0001 
     289                minArea                 0.000 
     290                maxRayContribution      0.005 
     291                maxCostRatio            0.9 
     292                missTolerance           4 
     293                #maxAccRayLength        100 
     294                 
     295                maxViewCells            20000 
    261296                 
    262297                # used for pvs criterium 
    263298                ct_div_ci 0.0 
    264          
    265                 # axis aligned splits 
    266                 AxisAligned { 
    267                         minPolys 5000 
    268                         minRays 500 
    269                         minObjects 10 
    270 #                       maxCostRatio 0.9 
    271 #                       ct_div_ci 0.5 
    272                 } 
    273         } 
    274          
    275 #       AxisAligned { 
    276 #               splitBorder 0.01 
    277 #       } 
    278          
     299        } 
     300         
     301        splitUseOnlyDrivingAxis false 
    279302         
    280303        Visualization { 
     
    282305                exportSplits true 
    283306        } 
    284 } 
     307         
     308        PostProcess { 
     309                maxCostRatio 0.1 
     310                minViewCells 500 
     311                maxPvsSize   1000 
     312                useRaysForMerge true 
     313        } 
     314} 
Note: See TracChangeset for help on using the changeset viewer.