Ignore:
Timestamp:
10/19/06 20:30:21 (18 years ago)
Author:
mattausch
Message:
 
Location:
GTP/trunk/Lib/Vis/Preprocessing
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Vis/Preprocessing/scripts/vsposp_typical.env

    r1643 r1654  
    179179} 
    180180 
     181 
    181182################################ 
     183# 
    182184# View space partitioning kd tree 
     185# 
    183186 
    184187VspTree { 
     
    198201} 
    199202 
     203 
    200204########################## 
     205# 
    201206# The bounding volume hierarchy 
     207# 
    202208 
    203209BvHierarchy { 
     
    216222 
    217223 
    218 ########################## 
     224############################################################### 
     225# 
    219226# Manages the construction of view space and object space partition 
     227# 
    220228 
    221229Hierarchy { 
     
    240248 
    241249                # recompute split plane when "repairing" a candidate 
    242                 recomputeSplitPlaneOnRepair false 
     250                recomputeSplitPlaneOnRepair true 
    243251 
    244252                ################################################### 
     
    251259 
    252260                # minimal steps of same type: for interleaved, this is only valid for the first few splits 
    253                 minStepsOfSameType 200 
     261                minStepsOfSameType 100 
    254262        } 
    255263 
    256264        Termination { 
    257265                # maximal number of leaves 
    258                 maxLeaves 1000 
     266                maxLeaves 2000000 
     267                # maximal memory in MB 
     268                maxMemory 1 
    259269                # minimum ratio of global cost decrease 
    260270                minGlobalCostRatio -1 
  • GTP/trunk/Lib/Vis/Preprocessing/scripts/vsposp_typical.sh

    r1643 r1654  
    1111echo "starting $TARGET mode" 
    1212 
    13 SCENE=vsposp_typical 
     13#SCENE=vsposp_typical 
     14#SCENE=soda5_vsposp 
     15SCENE=soda_vsposp 
    1416#SCENE=vsposp_vienna 
    1517#SCENE=soda5 
     
    2224ENVIRONMENT=$SCENE.env 
    2325 
    24  
    2526####################################################### 
    2627 
    2728 
    28 # METHOD=interleaved_full 
    29 # echo "$SCENE $METHOD" 
     29 METHOD=interleaved_full 
     30 echo "$SCENE $METHOD" 
    3031 
    3132# $PROGRAM $ENVIRONMENT \ 
     
    3839# -hierarchy_construction_recompute_split_on_repair=true 
    3940 
    40 # mv debug.log $LOG_PREFIX-$METHOD-debug.log 
    41 # mv view_cells.wrl $LOG_PREFIX-$METHOD-view_cells.wrl 
    42 # mv final_object_partition.wrl $LOG_PREFIX-$METHOD-final_object_partition.wrl 
    43 # mv final_view_cells.wrl $LOG_PREFIX-$METHOD-final_view_cells.wrl 
     41sh movefiles.sh $LOG_PREFIX-$METHOD 
    4442 
     43########################################################################### 
    4544 
    46 # METHOD=interleaved 
    47 # echo "$SCENE $METHOD" 
     45 METHOD=interleaved 
     46 echo "$SCENE $METHOD" 
    4847 
    4948# $PROGRAM $ENVIRONMENT \ 
     
    5655# -hierarchy_construction_recompute_split_on_repair=false 
    5756 
    58 # mv debug.log $LOG_PREFIX-$METHOD-debug.log 
    59 # mv view_cells.wrl $LOG_PREFIX-$METHOD-view_cells.wrl 
    60 # mv final_object_partition.wrl $LOG_PREFIX-$METHOD-final_object_partition.wrl 
    61 # mv final_view_cells.wrl $LOG_PREFIX-$METHOD-final_view_cells.wrl 
     57sh movefiles.sh $LOG_PREFIX-$METHOD 
    6258 
     59################################################################################## 
    6360 
    64 # METHOD=gradient 
    65 # echo "$SCENE $METHOD" 
    66  
    67 # $PROGRAM $ENVIRONMENT \ 
    68 # -view_cells_evaluation_stats_prefix=$LOG_PREFIX-$METHOD \ 
    69 # -view_cells_merge_stats=$LOG_PREFIX-$METHOD-mergeStats.log \ 
    70 # -vsp_subdivision_stats=$LOG_PREFIX-$METHOD-vsp-subdivisionStats.log \ 
    71 # -bvh_subdivision_stats=$LOG_PREFIX-$METHOD-bvh-subdivisionStats.log \ 
    72 # -hierarchy_subdivision_stats=$LOG_PREFIX-$METHOD-hierarchy-subdivisionStats.log \ 
    73 # -hierarchy_construction_type=2 \ 
    74 # -hierarchy_construction_recompute_split_on_repair=true 
    75  
    76 # mv debug.log $LOG_PREFIX-$METHOD-debug.log 
    77 # mv view_cells.wrl $LOG_PREFIX-$METHOD-view_cells.wrl 
    78 # mv final_object_partition.wrl $LOG_PREFIX-$METHOD-final_object_partition.wrl 
    79 # mv final_view_cells.wrl $LOG_PREFIX-$METHOD-final_view_cells.wrl 
    80  
    81 #  METHOD=multilevel 
    82 #  echo "$SCENE $METHOD" 
    83  
    84 #  $PROGRAM $ENVIRONMENT \ 
    85 #  -view_cells_evaluation_stats_prefix=$LOG_PREFIX-$METHOD \ 
    86 #  -view_cells_merge_stats=$LOG_PREFIX-$METHOD-mergeStats.log \ 
    87 #  -vsp_subdivision_stats=$LOG_PREFIX-$METHOD-vsp-subdivisionStats.log \ 
    88 #  -bvh_subdivision_stats=$LOG_PREFIX-$METHOD-bvh-subdivisionStats.log \ 
    89 #  -hierarchy_subdivision_stats=$LOG_PREFIX-$METHOD-hierarchy-subdivisionStats.log \ 
    90 #  -hierarchy_construction_type=2 \ 
    91 #  -hierarchy_construction_multilevel=true \ 
    92 #  -hierarchy_construction_samples=20000 \ 
    93 #  -hierarchy_term_max_leaves=500 \ 
    94 #  -hierarchy_construction_levels=1 \ 
    95 #  -hierarchy_construction_recompute_split_on_repair=true 
    96  
    97 #  mv debug.log $LOG_PREFIX-$METHOD-debug.log 
    98 #  mv view_cells.wrl $LOG_PREFIX-$METHOD-view_cells.wrl 
    99 #  mv final_object_partition.wrl $LOG_PREFIX-$METHOD-final_object_partition.wrl 
    100 #  mv final_view_cells.wrl $LOG_PREFIX-$METHOD-final_view_cells.wrl 
    101  
    102 #  METHOD=sequential 
    103 #  echo "$SCENE $METHOD" 
    104  
    105 #  $PROGRAM $ENVIRONMENT \ 
    106 #  -view_cells_evaluation_stats_prefix=$LOG_PREFIX-$METHOD \ 
    107 #  -view_cells_merge_stats=$LOG_PREFIX-$METHOD-mergeStats.log \ 
    108 #  -vsp_subdivision_stats=$LOG_PREFIX-$METHOD-vsp-subdivisionStats.log \ 
    109 #  -bvh_subdivision_stats=$LOG_PREFIX-$METHOD-bvh-subdivisionStats.log \ 
    110 #  -hierarchy_subdivision_stats=$LOG_PREFIX-$METHOD-hierarchy-subdivisionStats.log \ 
    111 #  -hierarchy_construction_type=0 \ 
    112 #  -bvh_term_max_leaves=500 
    113  
    114 #  mv debug.log $LOG_PREFIX-$METHOD-debug.log 
    115 #  mv view_cells.wrl $LOG_PREFIX-$METHOD-view_cells.wrl 
    116 #  mv final_object_partition.wrl $LOG_PREFIX-$METHOD-final_object_partition.wrl 
    117 #  mv final_view_cells.wrl $LOG_PREFIX-$METHOD-final_view_cells.wrl 
    118  
    119  METHOD=gradient_simplesplit 
     61 METHOD=gradient 
    12062 echo "$SCENE $METHOD" 
    12163 
     
    12567 -vsp_subdivision_stats=$LOG_PREFIX-$METHOD-vsp-subdivisionStats.log \ 
    12668 -bvh_subdivision_stats=$LOG_PREFIX-$METHOD-bvh-subdivisionStats.log \ 
    127  -bvh_use_sah=true \ 
    128  -vsp_use_cost_heuristics=false \ 
    12969 -hierarchy_subdivision_stats=$LOG_PREFIX-$METHOD-hierarchy-subdivisionStats.log \ 
    13070 -hierarchy_construction_type=2 \ 
    13171 -hierarchy_construction_recompute_split_on_repair=true 
    13272 
    133  mv debug.log $LOG_PREFIX-$METHOD-debug.log 
    134  mv view_cells.wrl $LOG_PREFIX-$METHOD-view_cells.wrl 
    135  mv final_object_partition.wrl $LOG_PREFIX-$METHOD-final_object_partition.wrl 
    136  mv final_view_cells.wrl $LOG_PREFIX-$METHOD-final_view_cells.wrl 
     73sh movefiles.sh $LOG_PREFIX-$METHOD 
     74 
     75 
     76############################################################################ 
     77NODES=1000 
     78 
     79  METHOD=sequential-$NODES 
     80  echo "$SCENE $METHOD" 
     81 
     82 $PROGRAM $ENVIRONMENT \ 
     83  -view_cells_evaluation_stats_prefix=$LOG_PREFIX-$METHOD \ 
     84  -view_cells_merge_stats=$LOG_PREFIX-$METHOD-mergeStats.log \ 
     85  -vsp_subdivision_stats=$LOG_PREFIX-$METHOD-vsp-subdivisionStats.log \ 
     86  -bvh_subdivision_stats=$LOG_PREFIX-$METHOD-bvh-subdivisionStats.log \ 
     87  -hierarchy_subdivision_stats=$LOG_PREFIX-$METHOD-hierarchy-subdivisionStats.log \ 
     88  -hierarchy_construction_type=0 \ 
     89  -bvh_term_max_leaves=$NODES 
     90 
     91sh movefiles.sh $LOG_PREFIX-$METHOD 
     92 
     93############################################################################ 
     94 
     95NODES=10000 
     96 
     97  METHOD=sequential-$NODES 
     98  echo "$SCENE $METHOD" 
     99 
     100 $PROGRAM $ENVIRONMENT \ 
     101  -view_cells_evaluation_stats_prefix=$LOG_PREFIX-$METHOD \ 
     102  -view_cells_merge_stats=$LOG_PREFIX-$METHOD-mergeStats.log \ 
     103  -vsp_subdivision_stats=$LOG_PREFIX-$METHOD-vsp-subdivisionStats.log \ 
     104  -bvh_subdivision_stats=$LOG_PREFIX-$METHOD-bvh-subdivisionStats.log \ 
     105  -hierarchy_subdivision_stats=$LOG_PREFIX-$METHOD-hierarchy-subdivisionStats.log \ 
     106  -hierarchy_construction_type=0 \ 
     107  -bvh_term_max_leaves=$NODES 
     108 
     109sh movefiles.sh $LOG_PREFIX-$METHOD 
     110 
     111 
     112######################################################################## 
     113 
     114# METHOD=gradient_simplesplit 
     115# echo "$SCENE $METHOD" 
     116 
     117#$PROGRAM $ENVIRONMENT \ 
     118# -view_cells_evaluation_stats_prefix=$LOG_PREFIX-$METHOD \ 
     119# -view_cells_merge_stats=$LOG_PREFIX-$METHOD-mergeStats.log \ 
     120#  -vsp_subdivision_stats=$LOG_PREFIX-$METHOD-vsp-subdivisionStats.log \ 
     121#  -bvh_subdivision_stats=$LOG_PREFIX-$METHOD-bvh-subdivisionStats.log \ 
     122#  -bvh_use_sah=true \ 
     123#  -vsp_use_cost_heuristics=false \ 
     124#  -hierarchy_subdivision_stats=$LOG_PREFIX-$METHOD-hierarchy-subdivisionStats.log \ 
     125#  -hierarchy_construction_type=2 \ 
     126#  -hierarchy_construction_recompute_split_on_repair=true 
     127 
     128sh movefiles.sh $LOG_PREFIX-$METHOD 
  • GTP/trunk/Lib/Vis/Preprocessing/src/BvHierarchy.cpp

    r1649 r1654  
    10691069        const float ratio = newRenderCost / oldRenderCost; 
    10701070 
    1071 //#ifdef _DEBUG 
     1071#ifdef _DEBUG 
    10721072        Debug << "\n§§§§ bvh eval const decrease §§§§" << endl 
    10731073                  << "back pvs: " << (int)objectsBack.size() << " front pvs: " << (int)objectsFront.size() << " total pvs: " << nTotalObjects << endl  
     
    10751075                  << "old rc: " << oldRenderCost / viewSpaceVol << " new rc: " << newRenderCost / viewSpaceVol << endl 
    10761076                  << "render cost decrease: " << oldRenderCost / viewSpaceVol - newRenderCost / viewSpaceVol << endl; 
    1077 //#endif 
     1077#endif 
    10781078 
    10791079        return ratio; 
  • GTP/trunk/Lib/Vis/Preprocessing/src/HierarchyManager.cpp

    r1653 r1654  
    252252                                                mHierarchyStats.mPvsEntries, 
    253253                                                memoryCost, 
    254                                                 1.0f / (mHierarchyStats.mTotalCost * memoryCost) 
     254                                                1.0f / (mHierarchyStats.mTotalCost * memoryCost), 
     255                                                (float)mVspTree->mVspStats.Leaves() / (float)GetObjectSpaceSubdivisionLeaves() 
    255256                                                ); 
    256257} 
     
    262263                                                                                   const int pvsEntries, 
    263264                                                                                   const float memory, 
    264                                                                                    const float renderCostPerStorage) 
     265                                                                                   const float renderCostPerStorage, 
     266                                                                                   const float vspOspRatio) 
    265267{ 
    266268        mSubdivisionStats 
     
    270272                        << "#TotalRenderCost\n" << totalRenderCost << endl 
    271273                        << "#Memory\n" << memory << endl 
    272                         << "#RcPerMb\n" << renderCostPerStorage << endl; 
     274                        << "#RcPerMb\n" << renderCostPerStorage << endl 
     275                        << "#VspOspRatio\n" << vspOspRatio << endl; 
    273276} 
    274277 
     
    696699        mHierarchyStats.mRenderCostDecrease = sc->GetRenderCostDecrease(); 
    697700 
     701        static float memoryCount = 0; 
     702 
     703        if (mHierarchyStats.mMemory > memoryCount) 
     704        { 
     705                memoryCount += 100000; 
     706                cout << "\nstorage cost: " << mHierarchyStats.mMemory / (1024.0f * 1024.0f) << ", steps: " << mHierarchyStats.Leaves() << endl; 
     707        } 
     708 
    698709        // output stats 
    699710        EvalSubdivisionStats(); 
     
    878889                        !(steps < minSteps)) 
    879890                { 
    880                         cout << "breaking on " << sc->GetRenderCostDecrease() << " smaller than " << minRenderCostDecr << endl; 
     891                        //cout << "breaking on " << sc->GetRenderCostDecrease() << " smaller than " << minRenderCostDecr << endl; 
    881892                        break; 
    882893                } 
  • GTP/trunk/Lib/Vis/Preprocessing/src/HierarchyManager.h

    r1649 r1654  
    315315                                                         const int totalPvsEntries,  
    316316                                                         const float memory, 
    317                                                          const float renderCostPerStorage); 
     317                                                         const float renderCostPerStorage, 
     318                                                         const float vspOspRatio); 
    318319 
    319320        bool AddSampleToPvs(Intersectable *obj,  
     
    376377        /** After the suddivision has ended, do some final tasks. 
    377378        */ 
    378         void FinishObjectSpaceSubdivision(const ObjectContainer &objects, const bool removeRayRefs = true) const; 
     379        void FinishObjectSpaceSubdivision(const ObjectContainer &objects,  
     380                                                                          const bool removeRayRefs = true) const; 
    379381 
    380382        /** Returns depth of object space subdivision. 
  • GTP/trunk/Lib/Vis/Preprocessing/src/OspTree.cpp

    r1633 r1654  
    715715                ratio = minRenderCost / totalRenderCost; 
    716716        } 
    717  
     717#if _DEBUG 
    718718        Debug << "\n§§§§ eval local cost §§§§" << endl 
    719719                  << "old rc: " << totalRenderCost / viewSpaceVol << " new rc: " << minRenderCost / viewSpaceVol << endl 
    720720                  << "render cost decrease: " << (totalRenderCost - minRenderCost) / viewSpaceVol  << endl; 
    721  
     721#endif 
    722722        return ratio; 
    723723} 
Note: See TracChangeset for help on using the changeset viewer.