- Timestamp:
- 12/20/06 17:20:55 (18 years ago)
- Location:
- GTP/trunk/Lib/Vis/Preprocessing/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/BvHierarchy.cpp
r1914 r1916 504 504 // decrease the weighted average cost of the subdivisoin 505 505 mTotalCost -= sc->GetRenderCostDecrease(); 506 cout << "))))))))))))) " << sc->GetRenderCostDecrease() << endl;507 506 mPvsEntries += sc->GetPvsEntriesIncr(); 508 507 … … 637 636 const float avgRayContri = AvgRayContribution((int)pvs, tData.mNumRays); 638 637 639 cout << "bvh avg ray contri: " << avgRayContri << endl;640 638 // high avg ray contri, the result is influenced by undersampling 641 639 splitCandidate.SetAvgRayContribution(avgRayContri); … … 650 648 const float backVol = EvalViewCellsVolume(splitCandidate.mBackObjects) / GetViewSpaceVolume(); 651 649 652 cout <<"here8 "<< parentVol << " " << " old vol: " << oldVolume << " frontvol: " << frontVol << endl;653 650 splitCandidate.mCorrectedFrontVolume = 654 651 mHierarchyManager->EvalCorrectedPvs(frontVol, parentVol, avgRayContri); 655 656 cout << "bvh front vol: " << frontVol << " corrected: " << splitCandidate.mCorrectedFrontVolume << endl; 657 cout <<"here104 "<< endl; 658 652 659 653 splitCandidate.mCorrectedBackVolume = 660 654 mHierarchyManager->EvalCorrectedPvs(backVol, parentVol, avgRayContri); 661 655 662 cout << "back vol: " << backVol << " corrected: " << splitCandidate.mCorrectedBackVolume << endl;663 664 656 const float relfrontCost = splitCandidate.mCorrectedFrontVolume * 665 657 EvalAbsCost(splitCandidate.mFrontObjects); 666 658 const float relBackCost = splitCandidate.mCorrectedBackVolume * 667 659 EvalAbsCost(splitCandidate.mBackObjects); 668 const float relParentCost = parentVol * 669 EvalAbsCost(leaf->mObjects); 660 const float relParentCost = parentVol * EvalAbsCost(leaf->mObjects); 670 661 671 662 // compute global decrease in render cost … … 678 669 const int pvsEntriesIncr = EvalPvsEntriesIncr(splitCandidate, avgRayContri); 679 670 splitCandidate.SetPvsEntriesIncr(pvsEntriesIncr); 680 671 672 cout << "bvh volume cost" 673 << " avg ray contri: " << avgRayContri << " ratio: " << oldRatio 674 << " parent: " << parentVol << " " << " old vol: " << oldVolume 675 << " frontvol: " << frontVol << " corr. " << splitCandidate.mCorrectedFrontVolume 676 << " backvol: " << backVol << " corr. " << splitCandidate.mCorrectedBackVolume << endl; 677 681 678 #ifdef GTP_DEBUG 682 679 Debug << "old render cost: " << oldRenderCost << endl; … … 705 702 const int backViewCells = CountViewCells(splitCandidate.mBackObjects); 706 703 707 cout <<"here105 " << splitCandidate.mParentData.mCorrectedPvs << endl;708 cout <<"here106 " << oldPvsRatio << endl;709 710 704 splitCandidate.mCorrectedFrontPvs = 711 705 mHierarchyManager->EvalCorrectedPvs((float)frontViewCells, parentPvs, avgRayContri); 712 706 splitCandidate.mCorrectedBackPvs = 713 707 mHierarchyManager->EvalCorrectedPvs((float)backViewCells, parentPvs, avgRayContri); 708 709 cout << "bvh pvs" 710 << " avg ray contri: " << avgRayContri << " ratio: " << oldPvsRatio 711 << " parent: " << parentPvs << " " << " old vol: " << oldPvsSize 712 << " frontpvs: " << frontViewCells << " corr. " << splitCandidate.mCorrectedFrontPvs 713 << " backpvs: " << frontViewCells << " corr. " << splitCandidate.mCorrectedBackPvs << endl; 714 714 715 715 return (int)(splitCandidate.mCorrectedFrontPvs + splitCandidate.mCorrectedBackPvs - parentPvs); … … 2224 2224 oData.mCorrectedPvs = oData.mPvs = (float)mPvsEntries; 2225 2225 oData.mCorrectedVolume = oData.mVolume = prop; 2226 cout << "here52 " << oData.mCorrectedPvs << " " << oData.mVolume << " " << oData.mCorrectedVolume << " prop: " << prop << endl; 2227 2226 2228 2227 BvhSubdivisionCandidate *oSubdivisionCandidate = 2229 2228 new BvhSubdivisionCandidate(oData); -
GTP/trunk/Lib/Vis/Preprocessing/src/HierarchyManager.cpp
r1915 r1916 744 744 if (avgRayContri < mMinAvgRayContri) 745 745 { 746 cout << "here4 child" << endl;747 746 return childPvs; 748 747 } … … 750 749 if (avgRayContri > mMaxAvgRayContri) 751 750 { 752 cout << "here9 parent" << endl;753 751 return totalPvs; 754 752 } … … 764 762 #endif 765 763 766 cout << "alpha " << alpha << " beta: " << beta << " child: " << childPvs << " parent: " << totalPvs << endl;764 //cout << "alpha " << alpha << " beta: " << beta << " child: " << childPvs << " parent: " << totalPvs << endl; 767 765 768 766 if ((newPvs < childPvs - Limits::Small) || (newPvs > totalPvs + Limits::Small)) -
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp
r1910 r1916 147 147 148 148 // mix of sampling strategies 149 mStrategies.push_back(SamplingStrategy::OBJECT_BASED_DISTRIBUTION); 150 mStrategies.push_back(SamplingStrategy::REVERSE_VIEWSPACE_BORDER_BASED_DISTRIBUTION); 151 mStrategies.push_back(SamplingStrategy::REVERSE_OBJECT_BASED_DISTRIBUTION); 149 mStrategies.push_back(SamplingStrategy::OBJECT_DIRECTION_BASED_DISTRIBUTION); 150 151 //mStrategies.push_back(SamplingStrategy::OBJECT_BASED_DISTRIBUTION); 152 //mStrategies.push_back(SamplingStrategy::REVERSE_VIEWSPACE_BORDER_BASED_DISTRIBUTION); 153 //mStrategies.push_back(SamplingStrategy::REVERSE_OBJECT_BASED_DISTRIBUTION); 152 154 153 155 //mStrategies.push_back(SamplingStrategy::SPATIAL_BOX_BASED_DISTRIBUTION); … … 6042 6044 6043 6045 // mix of sampling strategies 6044 evalStrats.push_back(SamplingStrategy::OBJECT_BASED_DISTRIBUTION); 6045 evalStrats.push_back(SamplingStrategy::REVERSE_VIEWSPACE_BORDER_BASED_DISTRIBUTION); 6046 evalStrats.push_back(SamplingStrategy::REVERSE_OBJECT_BASED_DISTRIBUTION); 6046 mStrategies.push_back(SamplingStrategy::OBJECT_DIRECTION_BASED_DISTRIBUTION); 6047 6048 //evalStrats.push_back(SamplingStrategy::OBJECT_BASED_DISTRIBUTION); 6049 //evalStrats.push_back(SamplingStrategy::REVERSE_VIEWSPACE_BORDER_BASED_DISTRIBUTION); 6050 //evalStrats.push_back(SamplingStrategy::REVERSE_OBJECT_BASED_DISTRIBUTION); 6047 6051 6048 6052 //evalStrats.push_back(SamplingStrategy::SPATIAL_BOX_BASED_DISTRIBUTION); -
GTP/trunk/Lib/Vis/Preprocessing/src/VspTree.cpp
r1915 r1916 840 840 841 841 splitCandidate.SetAvgRayContribution(avgRayContri); 842 cout << "vsp avg ray contri: " << avgRayContri << endl; 843 842 844 843 // compute global decrease in render cost 845 844 float oldRenderCost; … … 900 899 const float correctedOldPvs = splitCandidate.mParentData.mCorrectedPvs * oldPvsRatio; 901 900 902 cout <<"here102 old pvs ratio: " << oldPvsRatio << " " << splitCandidate.mParentData.mPvs << " " << oldPvsSize << endl;903 904 901 splitCandidate.mCorrectedFrontPvs = 905 902 mHierarchyManager->EvalCorrectedPvs(fPvsSize, 906 903 correctedOldPvs, 907 904 splitCandidate.GetAvgRayContribution()); 908 cout <<"here103 "<< endl;909 905 splitCandidate.mCorrectedBackPvs = 910 906 mHierarchyManager->EvalCorrectedPvs(bPvsSize, … … 912 908 splitCandidate.GetAvgRayContribution()); 913 909 914 cout << "vsp front entries " << fPvsSize << " corrected: " << splitCandidate.mCorrectedFrontPvs << endl; 915 cout << "vsp back entries " << bPvsSize << " corrected: " << splitCandidate.mCorrectedBackPvs << endl; 910 911 cout << "vsp pvs" 912 << " avg ray contri: " << splitCandidate.GetAvgRayContribution() << " ratio: " << oldPvsRatio 913 << " parent: " << correctedOldPvs << " " << " old vol: " << oldPvsSize 914 << " frontpvs: " << fPvsSize << " corr. " << splitCandidate.mCorrectedFrontPvs 915 << " backpvs: " << bPvsSize << " corr. " << splitCandidate.mCorrectedBackPvs << endl; 916 916 917 917 918 return (int)(splitCandidate.mCorrectedFrontPvs + splitCandidate.mCorrectedBackPvs - correctedOldPvs); … … 1607 1608 const float penaltyOld = tData.mCorrectedRenderCost * oldRenderCostRatio; 1608 1609 1609 cout <<"here107 old render cost ratio " << oldRenderCostRatio << " old cost: " << penaltyOld << endl;1610 1610 sc.mCorrectedFrontRenderCost = mHierarchyManager->EvalCorrectedPvs(pvsFront, penaltyOld, avgRayContri); 1611 cout <<"here108 " << tData.mCorrectedRenderCost << " " << oldRenderCostRatio << endl;1612 1611 sc.mCorrectedBackRenderCost = mHierarchyManager->EvalCorrectedPvs(pvsBack, penaltyOld, avgRayContri); 1613 1614 cout << "vsp front pvs " << pvsFront << " corrected: " << sc.mCorrectedFrontRenderCost << endl;1615 cout << "vsp back render cost " << pvsBack << " corrected: " << sc.mCorrectedBackRenderCost << endl;1616 1612 1617 1613 const float oldRenderCost = pOverall * penaltyOld; … … 1624 1620 // the render cost decrase for this split 1625 1621 const float renderCostDecrease = (oldRenderCost - newRenderCost) / viewSpaceVol; 1622 1623 cout << "vsp render cost" 1624 << " avg ray contri: " << avgRayContri << " ratio: " << oldRenderCostRatio 1625 << " parent: " << penaltyOld << " " << " old vol: " << totalPvs 1626 << " front cost: " << sc.mCorrectedFrontRenderCost << " corr. " << sc.mCorrectedFrontRenderCost 1627 << " back cost: " << sc.mCorrectedBackRenderCost << " corr. " << sc.mCorrectedBackRenderCost << endl; 1626 1628 1627 1629 #ifdef GTP_DEBUG
Note: See TracChangeset
for help on using the changeset viewer.