- Timestamp:
- 01/29/07 15:44:50 (18 years ago)
- Location:
- GTP/trunk/Lib/Vis/Preprocessing
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/scripts/generate_viewcells.env
r1969 r2064 5 5 6 6 Scene { 7 8 # filename glasgow1.x3d 9 # filename vienna.x3d 10 # filename ../data/vienna/vienna-simple.x3d 11 # filename ../data/vienna/vienna-buildings.x3d 12 # filename ../data/vienna/vienna-roofs.x3d 13 # filename ../data/vienna/vienna-buildings.x3d;../data/vienna/vienna-roofs.x3d;../data/vienna/vienna-roads.x3d 14 # filename ../data/vienna/vienna-buildings_vienna-roofs_vienna-roads_vienna-plane_cropped.obj 15 filename ../data/vienna/vienna_cropped.obj 16 #;../data/vienna/vienna-plane.x3d 17 # filename ../data/vienna/vienna-buildings.x3d;../data/vienna/vienna-roofs.x3d;../data/vienna/vienna-roads.x3d;../data/vienna/vienna-plane.x3d 18 # filename ../data/vienna/viewcells-25-sel.x3d 19 # filename ../data/atlanta/atlanta2.x3d 20 # filename ../data/soda/soda.dat 21 # filename ../data/soda/soda5.dat 22 # filename ../data/artificial/cube_test.x3d 23 # filename ../data/grandcanyon1_RotXmin90.obj 24 # filename ../data/CityModel.obj 25 # filename ../data/arena/arena-low-lods.obj 7 # filename ../data/vienna/vienna_cropped.obj 8 filename ../data/soda/soda5.dat 26 9 } 27 10 … … 143 126 144 127 # type of view cells 145 type vsp OspTree128 type vspBspTree 146 129 147 130 #percentage of total visible objects where pvs is considered invalid … … 168 151 Visualization { 169 152 # how much samples we use for visualization 170 samples 200153 samples 0 171 154 exportRays true 172 155 exportGeometry true … … 199 182 200 183 201 ################################ 202 # 203 # View space partitioning kd tree 204 # 205 206 VspTree { 184 VspBspTree { 207 185 Construction { 208 renderCostDecreaseWeight 1.0 209 } 210 186 samples 500000 187 epsilon 0.0000001 188 randomize false 189 renderCostWeight 1.0 190 } 191 192 193 # random polygon = 1 194 # axis aligned = 2 195 # least ray splits = 256 196 # balanced rays = 512 197 # pvs = 1024 198 199 splitPlaneStrategy 1026 200 201 # maximal candidates for split planes 202 maxPolyCandidates 0 203 204 usePolygonSplitIfAvailable false 205 206 # maximal tested rays for split cost heuristics 207 maxTests 10000 208 209 maxTotalMemory 50 210 maxStaticMemory 50 211 212 subdivisionStats ../subdivisionStats.log 213 214 # factors for evaluating split plane costs 215 Factor { 216 leastRaySplits 1.0 217 balancedRays 1.0 218 pvs 1.0 219 } 220 211 221 Termination { 212 minPvs 0 213 maxViewCells 500000 214 } 222 # parameters used for autopartition 223 minRays -1 224 minPolygons -1 225 maxDepth 25 226 minPvs 0 227 minProbability 0.000001 228 maxRayContribution 1 229 maxCostRatio 0.9 230 missTolerance 6 231 globalCostMissTolerance 4 232 minGlobalCostRatio 0.0001 233 234 maxViewCells 200 235 236 237 # used for pvs criterium 238 ct_div_ci 0.0 239 240 AxisAligned { 241 minRays 50000 242 maxRayContribution 9.9 243 } 244 } 245 246 useSplitCostQueue true 247 248 splitUseOnlyDrivingAxis false 249 simulateOctree false 250 useRandomAxis false 251 usePolygonSplitIfAvailable false 252 nodePriorityQueueType 0 215 253 216 254 useCostHeuristics true 217 splitUseOnlyDrivingAxis false 218 219 # maximum number of tests per node 220 maxTests 50000 221 } 222 223 224 ########################## 225 # 226 # The bounding volume hierarchy 227 # 228 229 BvHierarchy { 230 231 Construction { 232 renderCostDecreaseWeight 1.0 233 } 234 235 Termination { 236 maxLeaves 50000000 237 } 238 239 minRaysForVisibility 15 240 241 # use only surface area heuristic 242 useCostHeuristics true 243 useSah false 244 245 splitUseOnlyDrivingAxis false 246 247 maxTests 50000 248 } 249 250 251 ############################################################### 252 # 253 # Manages the construction of view space and object space partition 254 # 255 256 Hierarchy { 257 # the type of object space partition: view space is always vsp (=kd) partition 258 type bvh 259 260 Construction { 261 262 samples 3000000 263 264 # type 0 = sequential computation, 1 = interleaved, 2 = gradient 265 type 2 266 267 ############################### 268 # only for interleaved method 269 270 # minimal steps of same type for gradient method 271 minStepsOfSameType 100 272 # maximum steps of same type for gradient method 273 maxStepsOfSameType 900 274 275 # maximum number of repair steps per gradient step 276 maxRepairs 1000 277 } 278 279 Termination { 280 # maximal number of leaves 281 maxLeaves 100000 282 # maximal memory in MB 283 maxMemory 18 284 # minimum ratio of global cost decrease 285 minGlobalCostRatio -1 286 } 287 } 255 256 Visualization { 257 # x3d visualization of the split planes 258 exportSplits false 259 } 260 } -
GTP/trunk/Lib/Vis/Preprocessing/scripts/generate_viewcells.sh
r1982 r2064 9 9 PROGRAM=../bin/$TARGET/Preprocessor.exe 10 10 11 SCENE=vienna_cropped 11 #SCENE=vienna_cropped 12 SCENE=soda5 13 12 14 LOG_PREFIX=../scripts/$SCENE 13 15 ENVIRONMENT=generate_viewcells.env … … 15 17 echo "starting $TARGET mode for $SCENE scene" 16 18 17 # ###########################################################################19 #!/bin/sh 18 20 19 METHOD=interleaved 20 echo "$SCENE $METHOD" 21 PROGRAM=../bin/release/Preprocessor.exe 22 SCENE=generate_viewcells 21 23 22 $PROGRAM $ENVIRONMENT \ 23 -view_cells_filename=$LOG_PREFIX-$METHOD-viewcells.xml.gz \ 24 -view_cells_merge_stats=$LOG_PREFIX-$METHOD-mergeStats.log \ 25 -vsp_subdivision_stats=$LOG_PREFIX-$METHOD-vsp-subdivisionStats.log \ 26 -bvh_subdivision_stats=$LOG_PREFIX-$METHOD-bvh-subdivisionStats.log \ 27 -hierarchy_subdivision_stats=$LOG_PREFIX-$METHOD-hierarchy-subdivisionStats.log \ 28 -hierarchy_construction_type=2 \ 29 -hierarchy_construction_consider_memory=true 24 LOG_PREFIX=../scripts/vienna 30 25 31 ############################################################################ 26 ENVIRONMENT=$SCENE.env 32 27 33 # METHOD=fast34 # echo "$SCENE $METHOD"35 28 36 # $PROGRAM $ENVIRONMENT \ 37 # -view_cells_filename=$LOG_PREFIX-$METHOD-viewcells.xml.gz \ 38 # -view_cells_merge_stats=$LOG_PREFIX-$METHOD-mergeStats.log \ 39 # -vsp_subdivision_stats=$LOG_PREFIX-$METHOD-vsp-subdivisionStats.log \ 40 # -bvh_subdivision_stats=$LOG_PREFIX-$METHOD-bvh-subdivisionStats.log \ 41 # -hierarchy_subdivision_stats=$LOG_PREFIX-$METHOD-hierarchy-subdivisionStats.log \ 42 # -hierarchy_construction_type=0 \ 43 # -hierarchy_construction_consider_memory=true \ 44 # -bvh_term_max_leaves=10000 \ 45 # -hierarchy_term_max_leaves=20000 29 ############################################### 30 31 METHOD=avs 32 echo "$SCENE $METHOD" 33 34 $PROGRAM $ENVIRONMENT \ 35 -view_cells_type=vspBspTree \ 36 -view_cells_filename=$LOG_PREFIX-visibility.xml.zip 37 38 mv debug.log $LOG_PREFIX-$METHOD-debug.log 39 -
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp
r2053 r2064 352 352 353 353 354 /*bool ViewCellsManager::GenerateRandomViewCells(vector<ViewCellPoints *> &viewCells,355 const int nViewCells,356 const int nViewPoints)357 {358 ViewCellContainer rViewCells;359 360 cout << "generating " << nViewCells << " random view cells" << endl;361 GenerateRandomViewCells(rViewCells, nViewCells);362 363 cout << "finished" << endl;364 365 //for (int i = 0; i < viewCells.size(); ++ i)366 // cout << "vc " << i << ": " << viewCells[i]->GetId() << endl;367 368 cout << "generating " << nViewPoints << " view points per view cell" << endl;369 ViewCellContainer::const_iterator vit, vit_end = rViewCells.end();370 371 int i = 0;372 for (vit = rViewCells.begin(); vit != vit_end; ++ vit, ++ i)373 {374 ViewCell *vc = *vit;375 376 ViewCellPoints *vcPts = new ViewCellPoints();377 viewCells.push_back(vcPts);378 379 vcPts->first = vc;380 381 SimpleRayContainer viewPoints;382 cout << "processing view cell " << i << endl;383 // generate random view points384 GenerateViewPoints(vc, nViewPoints, viewPoints);385 386 SimpleRayContainer::const_iterator pit, pit_end = viewPoints.end();387 388 for (pit = viewPoints.begin(); pit != pit_end; ++ pit)389 {390 vcPts->second.push_back(*pit);391 }392 }393 394 return true;395 }*/396 397 398 354 bool ViewCellsManager::GenerateRandomViewCells(vector<ViewCellPoints *> &viewCells, 399 355 const int nViewCells, … … 429 385 430 386 SimpleRayContainer viewPoints; 431 cout<<"here18"<<endl;387 432 388 // generate random view points 433 389 if (IsValidViewSpace(viewCell) && -
GTP/trunk/Lib/Vis/Preprocessing/src/VspTree.cpp
r2020 r2064 2387 2387 VspLeaf *leaf = static_cast<VspLeaf *>(node); 2388 2388 ViewCell *viewCell; 2389 2389 2390 if (0) 2390 2391 viewCell = mViewCellsTree->GetActiveViewCell(leaf->GetViewCell());
Note: See TracChangeset
for help on using the changeset viewer.