- Timestamp:
- 01/25/06 01:44:46 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/GtpVisibilityPreprocessor/src/RssPreprocessor.cpp
r572 r574 441 441 442 442 } 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 } 443 452 444 453 int rssPass = 0; … … 476 485 477 486 if (mUseViewcells) { 478 // construct view cells479 if (!mLoadViewCells)480 mViewCellsManager->Construct(mObjects, mVssRays);481 482 483 487 484 488 // evaluate contributions of the intitial rays 485 mViewCellsManager->ComputeSampleContributions(mVssRays );489 mViewCellsManager->ComputeSampleContributions(mVssRays, true, false); 486 490 487 491 … … 502 506 mViewCellsManager->PrintPvsStatistics(mStats); 503 507 504 VssRayContainer selectedRays;505 int desired = Max(506 mViewCellsManager->GetPostProcessSamples(),507 mViewCellsManager->GetVisualizationSamples());508 509 mVssRays.SelectRays(desired, selectedRays);510 511 //-- post process view cells512 mViewCellsManager->PostProcess(mObjects, selectedRays);513 514 //-- several visualizations and statistics515 Debug << "view cells after post processing: " << endl;516 mViewCellsManager->PrintStatistics(Debug);517 518 if (1)519 mViewCellsManager->Visualize(mObjects, selectedRays);520 521 508 // viewcells->UpdatePVS(newVssRays); 522 509 Debug<<"Valid viewcells before set validity: "<<mViewCellsManager->CountValidViewcells()<<endl; … … 534 521 535 522 /// compute view cell contribution of rays if view cells manager already constructed 536 mViewCellsManager->ComputeSampleContributions(mVssRays );523 mViewCellsManager->ComputeSampleContributions(mVssRays, true, false); 537 524 538 525 if (mUseImportanceSampling) { … … 571 558 CastRays(rays, tmpVssRays); 572 559 castRays += rays.size(); 573 float c1 = mViewCellsManager->ComputeSampleContributions(tmpVssRays, false );560 float c1 = mViewCellsManager->ComputeSampleContributions(tmpVssRays, false, true); 574 561 mStats<<"#RssRelContrib"<<endl<<c1/rays.size()<<endl; 575 562 … … 582 569 CastRays(rays, tmpVssRays); 583 570 castRays += rays.size(); 584 float c2 = mViewCellsManager->ComputeSampleContributions(tmpVssRays, false );571 float c2 = mViewCellsManager->ComputeSampleContributions(tmpVssRays, false, true); 585 572 mStats<<"#SpatialRelContrib"<<endl<<c2/rays.size()<<endl; 586 573 … … 596 583 CastRays(rays, tmpVssRays); 597 584 castRays += rays.size(); 598 float c3 = mViewCellsManager->ComputeSampleContributions(tmpVssRays, false );585 float c3 = mViewCellsManager->ComputeSampleContributions(tmpVssRays, false, true); 599 586 mStats<<"#DirectionalRelContrib"<<endl<<c3/rays.size()<<endl; 600 587 … … 622 609 if (mUseViewcells) { 623 610 /// compute view cell contribution of rays 624 mViewCellsManager->ComputeSampleContributions(vssRays );611 mViewCellsManager->ComputeSampleContributions(vssRays, true, false); 625 612 } 626 613 … … 646 633 mViewCellsManager->PrintPvsStatistics(mStats); 647 634 } 648 649 635 650 636 ComputeRenderError(); 651 637 … … 709 695 if (mUseViewcells) { 710 696 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; 722 720 723 721 }
Note: See TracChangeset
for help on using the changeset viewer.