Ignore:
Timestamp:
04/20/06 13:25:41 (18 years ago)
Author:
mattausch
Message:

after rendering workshop submissioin
x3dparser can use def - use constructs
implemented improved evaluation (samples are only stored in leaves, only propagate pvs size)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Vis/Preprocessing/src/RssPreprocessor.cpp

    r746 r752  
    6767        } 
    6868        break; 
     69         
    6970  default: 
    7071        result = Preprocessor::GenerateRays(number, sampleType, rays); 
     
    8081                                                  ) 
    8182{ 
    82   for (int i=0; i < rays.size(); i++) 
     83  for (int i=0; i < rays.size(); i++) { 
    8384        CastRay(rays[i].mOrigin, rays[i].mDirection, rays[i].mPdf, vssRays); 
     85        if (i % 10000 == 0) 
     86          cout<<"."; 
     87  } 
     88  cout<<endl; 
    8489} 
    8590 
     
    298303  exporter->SetFilled(); 
    299304  // $$JB temporarily do not export the scene 
    300   if (1) 
     305  if (0) 
    301306        exporter->ExportScene(mSceneGraph->mRoot); 
    302307  exporter->SetWireframe(); 
     
    435440{ 
    436441  // compute rendering error 
    437   if (renderer) { 
     442  if (renderer && renderer->mPvsStatFrames) { 
    438443        //      emit EvalPvsStat(); 
    439444        //      QMutex mutex; 
     
    504509        SimpleRayContainer rays; 
    505510 
     511        cout<<"Generating initial rays..."<<endl; 
    506512        GenerateRays(mInitialSamples/4, SPATIAL_BOX_BASED_DISTRIBUTION, rays); 
    507513        GenerateRays(mInitialSamples/4, OBJECT_BASED_DISTRIBUTION, rays); 
     
    509515        GenerateRays(mInitialSamples/4, OBJECT_DIRECTION_BASED_DISTRIBUTION, rays); 
    510516         
     517        cout<<"Casting initial rays..."<<endl; 
    511518        CastRays(rays, mVssRays); 
    512519 
     
    536543  if (mUseViewcells) { 
    537544 
     545        cout<<"Computing sample contributions..."<<endl; 
    538546        // evaluate contributions of the intitial rays 
    539547        mViewCellsManager->ComputeSampleContributions(mVssRays, true, false); 
    540          
     548        cout<<"done.\n"; 
    541549         
    542550        mStats << 
     
    559567        Debug<<"Valid viewcells before set validity: "<<mViewCellsManager->CountValidViewcells()<<endl; 
    560568        // cull viewcells with PVS > median (0.5f) 
    561         mViewCellsManager->SetValidityPercentage(0, 0.5f);  
     569        //mViewCellsManager->SetValidityPercentage(0, 0.5f);  
     570        mViewCellsManager->SetValidityPercentage(0, 1.0f);  
    562571        Debug<<"Valid viewcells after set validity: "<<mViewCellsManager->CountValidViewcells()<<endl; 
    563572         
     
    571580   
    572581  /// compute view cell contribution of rays if view cells manager already constructed 
    573   mViewCellsManager->ComputeSampleContributions(mVssRays, true, false); 
     582  //  mViewCellsManager->ComputeSampleContributions(mVssRays, true, false); 
    574583 
    575584  if (mUseImportanceSampling) { 
     
    651660                if (mDirectionalSampling) 
    652661                  rayType = DIRECTION_BASED_DISTRIBUTION; 
    653            
     662 
     663          cout<<"Generating rays..."<<endl; 
     664 
    654665          GenerateRays(mRssSamplesPerPass, rayType, rays); 
     666          cout<<"done."<<endl; 
     667 
     668          cout<<"Casting rays..."<<endl; 
    655669          CastRays(rays, vssRays); 
     670          cout<<"done."<<endl; 
    656671          castRays += rays.size(); 
    657672          if (mUseViewcells) { 
    658673                /// compute view cell contribution of rays 
     674                cout<<"Computing sample contributions..."<<endl; 
    659675                mViewCellsManager->ComputeSampleContributions(vssRays, true, false); 
     676                cout<<"done."<<endl; 
    660677          } 
    661678                 
Note: See TracChangeset for help on using the changeset viewer.