Changeset 601


Ignore:
Timestamp:
02/06/06 23:53:19 (18 years ago)
Author:
mattausch
Message:
 
Location:
trunk/VUT/GtpVisibilityPreprocessor
Files:
4 edited

Legend:

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

    r600 r601  
    1313#;../data/vienna/vienna-plane.x3d 
    1414#       filename ../data/vienna/viewcells-25-sel.x3d 
    15         filename ../data/atlanta/atlanta2.x3d 
     15#       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 
     
    2525        type vss 
    2626#       type rss 
    27         detectEmptyViewSpace false 
     27        detectEmptyViewSpace true 
    2828} 
    2929 
     
    3636        loadInitialSamples  false 
    3737        storeInitialSamples false 
    38         useViewSpaceBox false 
     38        useViewSpaceBox true 
    3939#       testBeamSampling true 
    4040} 
     
    176176        # samples used for view cell construction 
    177177        Construction { 
    178                 samples 2000000 
     178                samples 1400000 
    179179                samplesPerPass 500000 
    180180        } 
    181181 
    182182        #number of active view cells 
    183         active 2048 
     183        active 256 
    184184        maxStaticMemory 40 
    185185 
     
    188188 
    189189        #type kdTree 
    190         #type vspKdTree 
     190        type vspKdTree 
    191191        #type bspTree 
    192192        type vspBspTree 
     
    213213                useRaysForMerge false 
    214214                refine false 
    215                 compress false 
     215                compress true 
    216216                merge true 
    217217        } 
     
    288288VspBspTree { 
    289289        Construction { 
    290                 samples 1000000 
     290                samples 800000 
    291291                epsilon 0.005 
    292292                randomize false 
     
    304304         
    305305        # maximal candidates for split planes 
    306         maxPolyCandidates 200 
     306        maxPolyCandidates 250 
    307307 
    308308         
    309309        # maximal tested rays for split cost heuristics 
    310         maxTests 10000 
     310        maxTests 20000 
    311311         
    312312        maxTotalMemory  50 
     
    322322        Termination { 
    323323                # parameters used for autopartition 
    324                 minRays                 500 
     324                minRays                 20 
    325325                minPolygons             -1 
    326                 maxDepth                25 
     326                maxDepth                40 
    327327                minPvs                  -1 
    328                 minProbability          0.0000001 
    329                 maxRayContribution      0.3 
    330                 maxCostRatio            0.9 
     328                minProbability          0.00000001 
     329                maxRayContribution      0.15 
     330                maxCostRatio            0.8 
    331331                missTolerance           3 
    332332                 
    333                 maxViewCells            30000 
     333                maxViewCells            100000 
    334334                 
    335335                # used for pvs criterium 
     
    337337                 
    338338                AxisAligned { 
    339                         minRays                 20000 
     339                        minRays                 50000 
    340340                        maxRayContribution      9.9 
    341341                } 
  • trunk/VUT/GtpVisibilityPreprocessor/src/ViewCell.cpp

    r600 r601  
    4444{ 
    4545        // clamp to minmax values 
    46         if (pvs < lower) 
     46        /*if (pvs < lower) 
    4747                return (float)lower; 
    4848        if (pvs > upper) 
    4949                return (float)upper; 
    50  
     50*/ 
    5151        return (float)pvs; 
    5252} 
     
    623623                                ++ mergeStats.siblings; 
    624624#endif 
    625                         if (((mergeStats.merged % statsOut) == 0) ||  
    626                                 (realNumActiveViewCells == mMergeMinViewCells)) 
    627                         { 
     625                //      if (((mergeStats.merged % statsOut) == 0) ||  
     626                //              (realNumActiveViewCells == mMergeMinViewCells)) 
     627                //      { 
    628628                                cout << "merged " << mergeStats.merged << " view cells" << endl; 
    629629 
     
    635635                                        << "#TotalRenderCost\n" << totalRenderCost << endl 
    636636                                        << "#CurrentPvs\n" << mergedVc->GetPvs().GetSize() << endl 
    637                                         << "#ExpectedCost\n" << realExpectedCost << endl 
     637                                        << "#ExpectedCost\n" << realExpectedCost / (float) realNumActiveViewCells << endl 
    638638                                        << "#AvgRenderCost\n" << realAvgRenderCost << endl 
    639639                                        << "#Deviation\n" << mDeviation << endl 
    640640                                        << "#TotalPvs\n" << totalPvs << endl 
    641                                         << "#PvsSizeDecrease\n" << -pvsDiff << endl; 
    642                         } 
     641                                        << "#PvsSizeDecrease\n" << -pvsDiff << endl 
     642                                        <<  "#Volume\n" << mergedVc->GetVolume() << endl 
     643                                        << "#Dummy\n" << (float)mergedVc->GetPvs().GetSize() * mergedVc->GetVolume() / mViewCellsManager->GetViewSpaceBox().GetVolume() << endl; 
     644                //      } 
    643645                } 
    644646                else 
  • trunk/VUT/GtpVisibilityPreprocessor/src/ViewCellsManager.cpp

    r600 r601  
    189189 
    190190                // TODO: leak? 
    191                 ComputeSampleContributions(constructionSamples, true, false); 
     191                if(0)ComputeSampleContributions(constructionSamples, true, false); 
    192192                cout << "finished" << endl; 
    193193 
     
    211211        // store viewCells for postprocessing 
    212212        const bool storeViewCells = true; 
    213         ComputeSampleContributions(postProcessSamples, true, storeViewCells); 
     213        if(0)ComputeSampleContributions(postProcessSamples, true, storeViewCells); 
    214214        // merge the view cells 
    215215        PostProcess(preprocessor->mObjects, postProcessSamples); 
     
    224224                                        visualizationSamples); 
    225225 
    226         ComputeSampleContributions(visualizationSamples, true, storeViewCells); 
     226        if(0)ComputeSampleContributions(visualizationSamples, true, storeViewCells); 
    227227 
    228228        //Debug << "visualizationsamples: " << mVisualizationSamples << " " << visualizationSamples.size() << endl; 
     
    25162516        cout << "Computing remaining ray contributions ... "; 
    25172517        // recast rest of rays 
     2518        if (0) 
    25182519        ComputeSampleContributions(savedRays, true, false); 
    25192520        cout << "finished" << endl; 
     
    26962697 
    26972698        VssRayContainer postProcessRays; 
    2698         GetRaySets(rays, mPostProcessSamples, postProcessRays); 
     2699        if(0)GetRaySets(rays, mPostProcessSamples, postProcessRays); 
    26992700 
    27002701        Debug << "post processing using " << (int)postProcessRays.size() << " samples" << endl; 
  • trunk/VUT/GtpVisibilityPreprocessor/src/VspBspTree.cpp

    r600 r601  
    5555 
    5656 
    57 /**********************************************************************/ 
    58 /*                  class VspBspTree implementation                   */ 
    59 /**********************************************************************/ 
     57/******************************************************************************/ 
     58/*                       class VspBspTree implementation                      */ 
     59/******************************************************************************/ 
    6060 
    6161 
     
    413413        const float prop = mUseAreaForPvs ? geom->GetArea() : geom->GetVolume(); 
    414414 
     415        Debug << "herevol: " << geom->GetVolume() << endl; 
     416        Debug << "herevol:: " << mBox.GetVolume() << endl; 
     417 
    415418        VspBspTraversalData tData(mRoot, 
    416419                                                          new PolygonContainer(polys), 
     
    431434        mTotalCost = tData.GetCost() / mBox.GetVolume(); 
    432435 
     436        Debug << "**volume** " << mBox.GetVolume() << endl; 
     437 
     438        mSplits = 0; 
     439        mSubdivisionStats  
     440                        << "#Nodes\n" << ++ mSplits << endl 
     441                        << "#RenderCostDecrease\n0\n" << endl  
     442                        << "#TotalRenderCost\n" << mTotalCost << endl; 
     443 
    433444        Debug << "total cost: " << mTotalCost << endl; 
    434         mSplits = 0; 
     445         
    435446         
    436447        mBspStats.Start(); 
     
    664675         
    665676        // if geometry was not already computed 
    666         if (!frontData.mGeometry && !backData.mGeometry) 
     677        if (1)//!frontData.mGeometry && !backData.mGeometry) 
    667678        { 
    668679                frontData.mGeometry = new BspNodeGeometry(); 
     
    682693                else 
    683694                { 
     695                        //Debug << "here2" << endl; 
    684696                        frontData.mProbability = frontData.mGeometry->GetVolume(); 
    685                         backData.mProbability = backData.mGeometry->GetVolume(); 
     697                        backData.mProbability = tData.mProbability - frontData.mProbability; 
     698                        //backData.mProbability = backData.mGeometry->GetVolume(); 
    686699                } 
    687700        } 
     
    13281341                { 
    13291342                        pFront = geomFront.GetVolume(); 
    1330                         pBack = pOverall - geomFront.GetVolume(); 
     1343                        //pBack = pOverall - geomFront.GetVolume(); 
     1344                        pBack = geomBack.GetVolume(); 
     1345 
     1346                        /*Debug << "volume: " << data.mGeometry->GetVolume() << endl; 
     1347                        Debug << "volum1: " << geomFront.GetVolume() << endl; 
     1348                        Debug << "volum2: " << geomBack.GetVolume() << endl; 
     1349                        Debug << "sum_: " << geomFront.GetVolume() + geomBack.GetVolume() << endl;*/ 
    13311350                } 
    13321351                else 
Note: See TracChangeset for help on using the changeset viewer.