Changeset 552


Ignore:
Timestamp:
01/19/06 02:35:58 (18 years ago)
Author:
mattausch
Message:
 
Location:
trunk/VUT/GtpVisibilityPreprocessor
Files:
3 edited

Legend:

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

    r551 r552  
    3030        samplesPerPass  100000 
    3131        initialSamples 300000 
    32         vssSamples 1500000 
     32        vssSamples 1800000 
    3333        vssSamplesPerPass 100000 
    3434        useImportanceSampling true 
  • trunk/VUT/GtpVisibilityPreprocessor/src/ViewCellsManager.cpp

    r551 r552  
    20712071        Debug << "\nview cell partition after sampling:\n" << mViewCellsStats << endl << endl; 
    20722072 
    2073  
     2073        // should maybe be done here to allow merge working with area or volume 
     2074        // and to correct the rendering statistics 
    20742075        if (1) 
    20752076        { 
  • trunk/VUT/GtpVisibilityPreprocessor/src/VssPreprocessor.cpp

    r551 r552  
    704704        cout<<"Average PVS size = "<<avgPvs<<endl; 
    705705 
     706        const int nSamples = mViewCellsManager->GetConstructionSamples(); 
     707 
    706708        //Debug << "samples: " << samples << " construction samples " << mViewCellsManager->GetConstructionSamples() << endl; 
    707709        // construct view cells after vss 
    708710        if (!mViewCellsManager->ViewCellsConstructed() && 
    709                 (samples + mInitialSamples >  mViewCellsManager->GetConstructionSamples())) 
     711                ((samples + mInitialSamples > nSamples)  || (samples >= mVssSamples))) 
    710712        { 
     713                Debug << "samples " << samples << " initial " << mInitialSamples << " " << samples + mInitialSamples << endl; 
    711714                VssRayContainer constructionRays; 
    712                 vssTree->CollectRays(constructionRays,  
    713                                                          mViewCellsManager->GetConstructionSamples()); 
    714                 mViewCellsManager->Construct(mObjects, constructionRays); 
     715                vssTree->CollectRays(constructionRays, nSamples); 
     716 
     717                Debug << "collected rays: " << constructionRays.size() << endl; 
     718 
     719                // test if we really have enough rays 
     720                if ((samples >= mVssSamples) || (constructionRays.size() >= nSamples)) 
     721                        mViewCellsManager->Construct(mObjects, constructionRays); 
    715722        } 
    716723 
     
    739746  } 
    740747 
     748 
    741749  Debug << vssTree->stat << endl; 
    742750  VssRayContainer viewCellRays; 
Note: See TracChangeset for help on using the changeset viewer.