- Timestamp:
- 10/19/06 20:30:21 (18 years ago)
- Location:
- GTP/trunk/Lib/Vis/Preprocessing
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/scripts/vsposp_typical.env
r1643 r1654 179 179 } 180 180 181 181 182 ################################ 183 # 182 184 # View space partitioning kd tree 185 # 183 186 184 187 VspTree { … … 198 201 } 199 202 203 200 204 ########################## 205 # 201 206 # The bounding volume hierarchy 207 # 202 208 203 209 BvHierarchy { … … 216 222 217 223 218 ########################## 224 ############################################################### 225 # 219 226 # Manages the construction of view space and object space partition 227 # 220 228 221 229 Hierarchy { … … 240 248 241 249 # recompute split plane when "repairing" a candidate 242 recomputeSplitPlaneOnRepair false250 recomputeSplitPlaneOnRepair true 243 251 244 252 ################################################### … … 251 259 252 260 # minimal steps of same type: for interleaved, this is only valid for the first few splits 253 minStepsOfSameType 200261 minStepsOfSameType 100 254 262 } 255 263 256 264 Termination { 257 265 # maximal number of leaves 258 maxLeaves 1000 266 maxLeaves 2000000 267 # maximal memory in MB 268 maxMemory 1 259 269 # minimum ratio of global cost decrease 260 270 minGlobalCostRatio -1 -
GTP/trunk/Lib/Vis/Preprocessing/scripts/vsposp_typical.sh
r1643 r1654 11 11 echo "starting $TARGET mode" 12 12 13 SCENE=vsposp_typical 13 #SCENE=vsposp_typical 14 #SCENE=soda5_vsposp 15 SCENE=soda_vsposp 14 16 #SCENE=vsposp_vienna 15 17 #SCENE=soda5 … … 22 24 ENVIRONMENT=$SCENE.env 23 25 24 25 26 ####################################################### 26 27 27 28 28 #METHOD=interleaved_full29 #echo "$SCENE $METHOD"29 METHOD=interleaved_full 30 echo "$SCENE $METHOD" 30 31 31 32 # $PROGRAM $ENVIRONMENT \ … … 38 39 # -hierarchy_construction_recompute_split_on_repair=true 39 40 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 41 sh movefiles.sh $LOG_PREFIX-$METHOD 44 42 43 ########################################################################### 45 44 46 #METHOD=interleaved47 #echo "$SCENE $METHOD"45 METHOD=interleaved 46 echo "$SCENE $METHOD" 48 47 49 48 # $PROGRAM $ENVIRONMENT \ … … 56 55 # -hierarchy_construction_recompute_split_on_repair=false 57 56 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 57 sh movefiles.sh $LOG_PREFIX-$METHOD 62 58 59 ################################################################################## 63 60 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 120 62 echo "$SCENE $METHOD" 121 63 … … 125 67 -vsp_subdivision_stats=$LOG_PREFIX-$METHOD-vsp-subdivisionStats.log \ 126 68 -bvh_subdivision_stats=$LOG_PREFIX-$METHOD-bvh-subdivisionStats.log \ 127 -bvh_use_sah=true \128 -vsp_use_cost_heuristics=false \129 69 -hierarchy_subdivision_stats=$LOG_PREFIX-$METHOD-hierarchy-subdivisionStats.log \ 130 70 -hierarchy_construction_type=2 \ 131 71 -hierarchy_construction_recompute_split_on_repair=true 132 72 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 73 sh movefiles.sh $LOG_PREFIX-$METHOD 74 75 76 ############################################################################ 77 NODES=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 91 sh movefiles.sh $LOG_PREFIX-$METHOD 92 93 ############################################################################ 94 95 NODES=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 109 sh 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 128 sh movefiles.sh $LOG_PREFIX-$METHOD -
GTP/trunk/Lib/Vis/Preprocessing/src/BvHierarchy.cpp
r1649 r1654 1069 1069 const float ratio = newRenderCost / oldRenderCost; 1070 1070 1071 //#ifdef _DEBUG1071 #ifdef _DEBUG 1072 1072 Debug << "\n§§§§ bvh eval const decrease §§§§" << endl 1073 1073 << "back pvs: " << (int)objectsBack.size() << " front pvs: " << (int)objectsFront.size() << " total pvs: " << nTotalObjects << endl … … 1075 1075 << "old rc: " << oldRenderCost / viewSpaceVol << " new rc: " << newRenderCost / viewSpaceVol << endl 1076 1076 << "render cost decrease: " << oldRenderCost / viewSpaceVol - newRenderCost / viewSpaceVol << endl; 1077 //#endif1077 #endif 1078 1078 1079 1079 return ratio; -
GTP/trunk/Lib/Vis/Preprocessing/src/HierarchyManager.cpp
r1653 r1654 252 252 mHierarchyStats.mPvsEntries, 253 253 memoryCost, 254 1.0f / (mHierarchyStats.mTotalCost * memoryCost) 254 1.0f / (mHierarchyStats.mTotalCost * memoryCost), 255 (float)mVspTree->mVspStats.Leaves() / (float)GetObjectSpaceSubdivisionLeaves() 255 256 ); 256 257 } … … 262 263 const int pvsEntries, 263 264 const float memory, 264 const float renderCostPerStorage) 265 const float renderCostPerStorage, 266 const float vspOspRatio) 265 267 { 266 268 mSubdivisionStats … … 270 272 << "#TotalRenderCost\n" << totalRenderCost << endl 271 273 << "#Memory\n" << memory << endl 272 << "#RcPerMb\n" << renderCostPerStorage << endl; 274 << "#RcPerMb\n" << renderCostPerStorage << endl 275 << "#VspOspRatio\n" << vspOspRatio << endl; 273 276 } 274 277 … … 696 699 mHierarchyStats.mRenderCostDecrease = sc->GetRenderCostDecrease(); 697 700 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 698 709 // output stats 699 710 EvalSubdivisionStats(); … … 878 889 !(steps < minSteps)) 879 890 { 880 cout << "breaking on " << sc->GetRenderCostDecrease() << " smaller than " << minRenderCostDecr << endl;891 //cout << "breaking on " << sc->GetRenderCostDecrease() << " smaller than " << minRenderCostDecr << endl; 881 892 break; 882 893 } -
GTP/trunk/Lib/Vis/Preprocessing/src/HierarchyManager.h
r1649 r1654 315 315 const int totalPvsEntries, 316 316 const float memory, 317 const float renderCostPerStorage); 317 const float renderCostPerStorage, 318 const float vspOspRatio); 318 319 319 320 bool AddSampleToPvs(Intersectable *obj, … … 376 377 /** After the suddivision has ended, do some final tasks. 377 378 */ 378 void FinishObjectSpaceSubdivision(const ObjectContainer &objects, const bool removeRayRefs = true) const; 379 void FinishObjectSpaceSubdivision(const ObjectContainer &objects, 380 const bool removeRayRefs = true) const; 379 381 380 382 /** Returns depth of object space subdivision. -
GTP/trunk/Lib/Vis/Preprocessing/src/OspTree.cpp
r1633 r1654 715 715 ratio = minRenderCost / totalRenderCost; 716 716 } 717 717 #if _DEBUG 718 718 Debug << "\n§§§§ eval local cost §§§§" << endl 719 719 << "old rc: " << totalRenderCost / viewSpaceVol << " new rc: " << minRenderCost / viewSpaceVol << endl 720 720 << "render cost decrease: " << (totalRenderCost - minRenderCost) / viewSpaceVol << endl; 721 721 #endif 722 722 return ratio; 723 723 }
Note: See TracChangeset
for help on using the changeset viewer.