Ignore:
Timestamp:
01/25/06 01:44:46 (18 years ago)
Author:
mattausch
Message:

finished function for view cell construction
removed bsp rays from vspbspmanager

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/VUT/GtpVisibilityPreprocessor/src/RssPreprocessor.cpp

    r572 r574  
    441441 
    442442  } 
     443  else 
     444  { 
     445          // construct view cells using it's own set of samples 
     446          mViewCellsManager->Construct(this); 
     447 
     448          //-- several visualizations and statistics 
     449          Debug << "view cells after construction: " << endl; 
     450          mViewCellsManager->PrintStatistics(Debug); 
     451  } 
    443452   
    444453  int rssPass = 0; 
     
    476485         
    477486  if (mUseViewcells) { 
    478         // construct view cells 
    479         if (!mLoadViewCells) 
    480           mViewCellsManager->Construct(mObjects, mVssRays); 
    481  
    482          
    483487 
    484488        // evaluate contributions of the intitial rays 
    485         mViewCellsManager->ComputeSampleContributions(mVssRays); 
     489        mViewCellsManager->ComputeSampleContributions(mVssRays, true, false); 
    486490         
    487491         
     
    502506        mViewCellsManager->PrintPvsStatistics(mStats); 
    503507           
    504         VssRayContainer selectedRays; 
    505         int desired = Max( 
    506                                           mViewCellsManager->GetPostProcessSamples(), 
    507                                           mViewCellsManager->GetVisualizationSamples()); 
    508          
    509         mVssRays.SelectRays(desired, selectedRays); 
    510            
    511         //-- post process view cells 
    512         mViewCellsManager->PostProcess(mObjects, selectedRays); 
    513            
    514         //-- several visualizations and statistics 
    515         Debug << "view cells after post processing: " << endl; 
    516         mViewCellsManager->PrintStatistics(Debug); 
    517          
    518         if (1)  
    519           mViewCellsManager->Visualize(mObjects, selectedRays); 
    520  
    521508        // viewcells->UpdatePVS(newVssRays); 
    522509        Debug<<"Valid viewcells before set validity: "<<mViewCellsManager->CountValidViewcells()<<endl; 
     
    534521   
    535522  /// compute view cell contribution of rays if view cells manager already constructed 
    536   mViewCellsManager->ComputeSampleContributions(mVssRays); 
     523  mViewCellsManager->ComputeSampleContributions(mVssRays, true, false); 
    537524 
    538525  if (mUseImportanceSampling) { 
     
    571558          CastRays(rays, tmpVssRays); 
    572559          castRays += rays.size(); 
    573           float c1 = mViewCellsManager->ComputeSampleContributions(tmpVssRays, false); 
     560          float c1 = mViewCellsManager->ComputeSampleContributions(tmpVssRays, false, true); 
    574561          mStats<<"#RssRelContrib"<<endl<<c1/rays.size()<<endl; 
    575562 
     
    582569                CastRays(rays, tmpVssRays); 
    583570                castRays += rays.size(); 
    584                 float c2 = mViewCellsManager->ComputeSampleContributions(tmpVssRays, false); 
     571                float c2 = mViewCellsManager->ComputeSampleContributions(tmpVssRays, false, true); 
    585572                mStats<<"#SpatialRelContrib"<<endl<<c2/rays.size()<<endl; 
    586573                 
     
    596583                CastRays(rays, tmpVssRays); 
    597584                castRays += rays.size(); 
    598                 float c3 = mViewCellsManager->ComputeSampleContributions(tmpVssRays, false); 
     585                float c3 = mViewCellsManager->ComputeSampleContributions(tmpVssRays, false, true); 
    599586                mStats<<"#DirectionalRelContrib"<<endl<<c3/rays.size()<<endl; 
    600587                 
     
    622609          if (mUseViewcells) { 
    623610                /// compute view cell contribution of rays 
    624                 mViewCellsManager->ComputeSampleContributions(vssRays); 
     611                mViewCellsManager->ComputeSampleContributions(vssRays, true, false); 
    625612          } 
    626613                 
     
    646633          mViewCellsManager->PrintPvsStatistics(mStats); 
    647634        } 
    648  
    649  
     635         
    650636        ComputeRenderError(); 
    651637         
     
    709695  if (mUseViewcells) { 
    710696 
    711          
    712         //-- render simulation after merge 
    713         cout << "\nevaluating bsp view cells render time after merge ... "; 
    714          
    715         mRenderSimulator->RenderScene(); 
    716         SimulationStatistics ss; 
    717         mRenderSimulator->GetStatistics(ss); 
    718          
    719         cout << " finished" << endl; 
    720         cout << ss << endl; 
    721         Debug << ss << endl; 
     697          if(0) 
     698          { 
     699                  VssRayContainer selectedRays; 
     700                  int desired = mViewCellsManager->GetVisualizationSamples(); 
     701 
     702                  mVssRays.SelectRays(desired, selectedRays); 
     703 
     704                  mViewCellsManager->Visualize(mObjects, selectedRays); 
     705          } 
     706           
     707          // view cells after sampling 
     708          mViewCellsManager->PrintStatistics(Debug); 
     709       
     710          //-- render simulation after merge 
     711          cout << "\nevaluating bsp view cells render time after sampling ... "; 
     712           
     713          mRenderSimulator->RenderScene(); 
     714          SimulationStatistics ss; 
     715          mRenderSimulator->GetStatistics(ss); 
     716           
     717          cout << " finished" << endl; 
     718          cout << ss << endl; 
     719          Debug << ss << endl; 
    722720         
    723721  } 
Note: See TracChangeset for help on using the changeset viewer.