Changeset 520


Ignore:
Timestamp:
01/12/06 02:44:17 (18 years ago)
Author:
mattausch
Message:
 
Location:
trunk/VUT/GtpVisibilityPreprocessor
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/VUT/GtpVisibilityPreprocessor/scripts/default.env

    r517 r520  
    99#       filename vienna.x3d 
    1010#       filename ../data/vienna/vienna-simple.x3d 
    11 #       filename ../data/vienna/vienna-buildings.x3d 
     11        filename ../data/vienna/vienna-buildings.x3d 
    1212#filename ../data/vienna/vienna-buildings.x3d;../data/vienna/vienna-roofs.x3d 
    1313#;../data/vienna/vienna-plane.x3d 
     
    1515#       filename ../data/atlanta/atlanta2.x3d 
    1616#       filename ../data/soda/soda.dat 
    17         filename ../data/soda/soda5.dat 
     17#       filename ../data/soda/soda5.dat 
    1818} 
    1919 
     
    3030        samplesPerPass  100000 
    3131        initialSamples 300000 
    32         vssSamples 500000 
     32        vssSamples 1000000 
    3333        vssSamplesPerPass 100000 
    3434        useImportanceSampling true 
     
    169169 
    170170ViewCells { 
    171         loadFromFile true 
     171        loadFromFile false 
    172172        exportToFile false 
    173173        #type kdTree 
     
    246246        PostProcess { 
    247247                maxCostRatio 0.005 
    248                 minViewCells 200 
     248                minViewCells 6000 
    249249                maxPvsSize   50000 
    250250        } 
     
    287287        Termination { 
    288288                # parameters used for autopartition 
    289                 minRays                 900 
     289                minRays                 1500 
    290290                minPolygons             -1 
    291291                maxDepth                30 
     
    293293                minArea                 0.0001 
    294294                #minArea                0.000 
    295                 maxRayContribution      0.4 
    296                 maxCostRatio            0.93 
    297                 missTolerance           3 
     295                maxRayContribution      0.05 
     296                maxCostRatio            0.9 
     297                missTolerance           2 
    298298                #maxAccRayLength        100 
    299299                 
     
    318318        PostProcess { 
    319319                maxCostRatio 0.1 
    320                 minViewCells 100 
     320                minViewCells 150 
    321321                maxPvsSize   1000 
    322322                useRaysForMerge true 
  • trunk/VUT/GtpVisibilityPreprocessor/src/Preprocessor.cpp

    r518 r520  
    249249        //-- parse view cells construction method 
    250250        environment->GetBoolValue("ViewCells.loadFromFile", mLoadViewCells); 
    251  
    252          
     251        char buf[100]; 
     252        if (mLoadViewCells) 
     253        { 
     254                environment->GetStringValue("ViewCells.filename", buf); 
     255                mViewCellsFilename = buf; 
     256        } 
    253257        if (mUseGlRenderer) 
    254258          renderer = new GlRendererBuffer(1024, 768, mSceneGraph, mViewCellsManager); 
  • trunk/VUT/GtpVisibilityPreprocessor/src/Preprocessor.h

    r518 r520  
    128128  bool mLoadViewCells; 
    129129 
     130  string mViewCellsFilename; 
     131 
    130132protected: 
    131133 
  • trunk/VUT/GtpVisibilityPreprocessor/src/ViewCell.cpp

    r503 r520  
    8383} 
    8484 
     85 
    8586float ViewCell::GetArea() const 
    8687{ 
  • trunk/VUT/GtpVisibilityPreprocessor/src/ViewCell.h

    r503 r520  
    157157                if ((int)mLeaves.size() > vcStat.maxLeaves) 
    158158                        vcStat.maxLeaves = (int)mLeaves.size(); 
     159                vcStat.leaves += (int)mLeaves.size(); 
    159160        } 
    160161 
  • trunk/VUT/GtpVisibilityPreprocessor/src/ViewCellsManager.cpp

    r519 r520  
    100100void ViewCellsManager::ComputeSampleContributions(const VssRayContainer &rays) 
    101101{ 
    102         Debug << "here2" << endl; 
    103102        // view cells not yet constructed 
    104103        if (!ViewCellsConstructed()) 
    105104                return; 
    106         Debug << "here " << rays.size() << endl; 
    107105 
    108106        VssRayContainer::const_iterator it, it_end = rays.end(); 
     
    335333        mViewCellsStats.Reset(); 
    336334        EvaluateViewCellsStats(); 
    337  
     335        // has to be recomputed 
    338336        mTotalAreaValid = false; 
    339337} 
     
    361359                                  termination, 
    362360                                  viewcells); 
    363   Debug << "constribution: " << (int)viewcells.size() << endl; 
     361  //Debug << "constribution: " << (int)viewcells.size() << endl; 
    364362  // copy viewcells memory efficiently 
    365363  const bool storeViewcells = false; 
     
    19651963                return 0; 
    19661964        } 
    1967         // view cells already finished 
    1968         else if (mViewCellsFinished) 
     1965 
     1966        EvaluateViewCellsStats(); 
     1967 
     1968        // view cells already finished post processing step 
     1969        if (mViewCellsFinished) 
    19691970                return 0; 
    19701971 
     
    19731974 
    19741975        Debug << "post processing using " << (int)postProcessRays.size() << " samples" << endl; 
    1975         EvaluateViewCellsStats(); 
     1976         
    19761977        Debug << "\nview cell partition after sampling:\n" << mViewCellsStats << endl << endl; 
    19771978 
     
    19831984        // collapse sibling leaves that share the same view cell 
    19841985        mVspBspTree->CollapseTree(); 
     1986 
     1987        ResetViewCells(); 
    19851988 
    19861989        // real meshes are only contructed only at this stage 
     
    23722375         
    23732376        bool success = parser.ParseFile(filename, mVspBspTree, this, objects); 
     2377        mVspBspTree->RepairViewCellsLeafLists(); 
     2378        mVspBspTree->mBox = GetViewSpaceBox(); 
    23742379        ResetViewCells(); 
    23752380        CreateViewCellMeshes(); 
  • trunk/VUT/GtpVisibilityPreprocessor/src/VspBspTree.h

    r517 r520  
    3535{ 
    3636        friend class ViewCellsParseHandlers; 
    37  
     37        friend class VspBspViewCellsManager; 
    3838public: 
    3939         
  • trunk/VUT/GtpVisibilityPreprocessor/src/VssPreprocessor.cpp

    r518 r520  
    403403 
    404404  //-- load view cells from file if requested 
     405  // load now because otherwise bounding box is messed up 
    405406  if (mLoadViewCells) 
    406407  { 
    407           char buff[100]; 
    408           environment->GetStringValue("ViewCells.filename", buff); 
    409           string vcFilename(buff); 
    410           mViewCellsManager->LoadViewCells(vcFilename, &mObjects); 
     408          mViewCellsManager->LoadViewCells(mViewCellsFilename, &mObjects); 
    411409  } 
    412410 
     
    639637  //-- render simulation after merge 
    640638  cout << "\nevaluating bsp view cells render time after merge ... "; 
    641    
    642639  mRenderSimulator->RenderScene(); 
    643    
    644640  SimulationStatistics ss; 
    645641  mRenderSimulator->GetStatistics(ss); 
Note: See TracChangeset for help on using the changeset viewer.