Changeset 1916 for GTP


Ignore:
Timestamp:
12/20/06 17:20:55 (18 years ago)
Author:
mattausch
Message:
 
Location:
GTP/trunk/Lib/Vis/Preprocessing/src
Files:
4 edited

Legend:

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

    r1914 r1916  
    504504                // decrease the weighted average cost of the subdivisoin 
    505505                mTotalCost -= sc->GetRenderCostDecrease(); 
    506                 cout << "))))))))))))) " << sc->GetRenderCostDecrease() << endl; 
    507506                mPvsEntries += sc->GetPvsEntriesIncr(); 
    508507 
     
    637636        const float avgRayContri = AvgRayContribution((int)pvs, tData.mNumRays); 
    638637 
    639         cout << "bvh avg ray contri: " << avgRayContri << endl; 
    640638        // high avg ray contri, the result is influenced by undersampling 
    641639        splitCandidate.SetAvgRayContribution(avgRayContri); 
     
    650648        const float backVol = EvalViewCellsVolume(splitCandidate.mBackObjects) / GetViewSpaceVolume(); 
    651649 
    652         cout <<"here8 "<< parentVol << " " << " old vol: " << oldVolume << " frontvol: " << frontVol << endl; 
    653650        splitCandidate.mCorrectedFrontVolume =  
    654651                mHierarchyManager->EvalCorrectedPvs(frontVol, parentVol, avgRayContri); 
    655  
    656         cout << "bvh front vol: " << frontVol << " corrected: " << splitCandidate.mCorrectedFrontVolume << endl; 
    657         cout <<"here104 "<< endl; 
    658  
     652         
    659653        splitCandidate.mCorrectedBackVolume =  
    660654                mHierarchyManager->EvalCorrectedPvs(backVol, parentVol, avgRayContri); 
    661655         
    662         cout << "back vol: " << backVol << " corrected: " << splitCandidate.mCorrectedBackVolume << endl; 
    663  
    664656        const float relfrontCost = splitCandidate.mCorrectedFrontVolume *  
    665657                EvalAbsCost(splitCandidate.mFrontObjects); 
    666658        const float relBackCost =  splitCandidate.mCorrectedBackVolume *  
    667659                EvalAbsCost(splitCandidate.mBackObjects); 
    668         const float relParentCost = parentVol *  
    669                 EvalAbsCost(leaf->mObjects); 
     660        const float relParentCost = parentVol * EvalAbsCost(leaf->mObjects); 
    670661 
    671662        // compute global decrease in render cost 
     
    678669        const int pvsEntriesIncr = EvalPvsEntriesIncr(splitCandidate, avgRayContri); 
    679670        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 
    681678#ifdef GTP_DEBUG 
    682679        Debug << "old render cost: " << oldRenderCost << endl; 
     
    705702        const int backViewCells = CountViewCells(splitCandidate.mBackObjects); 
    706703         
    707         cout <<"here105 " << splitCandidate.mParentData.mCorrectedPvs << endl; 
    708         cout <<"here106 " << oldPvsRatio << endl; 
    709  
    710704        splitCandidate.mCorrectedFrontPvs =  
    711705                mHierarchyManager->EvalCorrectedPvs((float)frontViewCells, parentPvs, avgRayContri); 
    712706        splitCandidate.mCorrectedBackPvs = 
    713707                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; 
    714714 
    715715        return (int)(splitCandidate.mCorrectedFrontPvs + splitCandidate.mCorrectedBackPvs - parentPvs); 
     
    22242224        oData.mCorrectedPvs = oData.mPvs = (float)mPvsEntries; 
    22252225        oData.mCorrectedVolume = oData.mVolume = prop; 
    2226         cout << "here52 " << oData.mCorrectedPvs << " " << oData.mVolume << " " << oData.mCorrectedVolume  << " prop: " << prop << endl; 
    2227  
     2226         
    22282227        BvhSubdivisionCandidate *oSubdivisionCandidate =  
    22292228                new BvhSubdivisionCandidate(oData); 
  • GTP/trunk/Lib/Vis/Preprocessing/src/HierarchyManager.cpp

    r1915 r1916  
    744744        if (avgRayContri < mMinAvgRayContri) 
    745745        { 
    746                 cout << "here4 child" << endl; 
    747746                return childPvs; 
    748747        } 
     
    750749        if (avgRayContri > mMaxAvgRayContri) 
    751750        { 
    752                 cout << "here9 parent" << endl; 
    753751                return totalPvs; 
    754752        } 
     
    764762#endif 
    765763 
    766         cout << "alpha " << alpha << " beta: " << beta << " child: " << childPvs << " parent: " << totalPvs << endl; 
     764        //cout << "alpha " << alpha << " beta: " << beta << " child: " << childPvs << " parent: " << totalPvs << endl; 
    767765         
    768766        if ((newPvs < childPvs - Limits::Small) || (newPvs > totalPvs + Limits::Small)) 
  • GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp

    r1910 r1916  
    147147 
    148148        // 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); 
    152154         
    153155        //mStrategies.push_back(SamplingStrategy::SPATIAL_BOX_BASED_DISTRIBUTION); 
     
    60426044 
    60436045        // 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); 
    60476051 
    60486052        //evalStrats.push_back(SamplingStrategy::SPATIAL_BOX_BASED_DISTRIBUTION); 
  • GTP/trunk/Lib/Vis/Preprocessing/src/VspTree.cpp

    r1915 r1916  
    840840 
    841841        splitCandidate.SetAvgRayContribution(avgRayContri); 
    842         cout << "vsp avg ray contri: " << avgRayContri << endl; 
    843  
     842         
    844843        // compute global decrease in render cost 
    845844        float oldRenderCost; 
     
    900899        const float correctedOldPvs = splitCandidate.mParentData.mCorrectedPvs * oldPvsRatio; 
    901900 
    902         cout <<"here102 old pvs ratio: " << oldPvsRatio << " " << splitCandidate.mParentData.mPvs << " " << oldPvsSize << endl; 
    903  
    904901        splitCandidate.mCorrectedFrontPvs =  
    905902                mHierarchyManager->EvalCorrectedPvs(fPvsSize,  
    906903                                                                                        correctedOldPvs,  
    907904                                                                                        splitCandidate.GetAvgRayContribution()); 
    908         cout <<"here103 "<< endl; 
    909905        splitCandidate.mCorrectedBackPvs =  
    910906                mHierarchyManager->EvalCorrectedPvs(bPvsSize,  
     
    912908                                                                                        splitCandidate.GetAvgRayContribution()); 
    913909         
    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 
    916917 
    917918        return (int)(splitCandidate.mCorrectedFrontPvs + splitCandidate.mCorrectedBackPvs - correctedOldPvs); 
     
    16071608        const float penaltyOld = tData.mCorrectedRenderCost * oldRenderCostRatio; 
    16081609 
    1609         cout <<"here107 old render cost ratio " << oldRenderCostRatio << " old cost: " << penaltyOld << endl; 
    16101610        sc.mCorrectedFrontRenderCost = mHierarchyManager->EvalCorrectedPvs(pvsFront, penaltyOld, avgRayContri); 
    1611         cout <<"here108 " << tData.mCorrectedRenderCost << " " << oldRenderCostRatio << endl; 
    16121611        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; 
    16161612 
    16171613        const float oldRenderCost = pOverall * penaltyOld; 
     
    16241620        // the render cost decrase for this split 
    16251621        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; 
    16261628 
    16271629#ifdef GTP_DEBUG 
Note: See TracChangeset for help on using the changeset viewer.