- Timestamp:
- 03/01/06 10:31:49 (19 years ago)
- Location:
- GTP/trunk/Lib/Vis
- Files:
-
- 1 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/Environment.cpp
r666 r667 1280 1280 1281 1281 RegisterOption("ViewCells.maxViewCells", 1282 optInt,1283 "view_cells_max_view_cells=",1284 "0");1282 optInt, 1283 "view_cells_max_view_cells=", 1284 "0"); 1285 1285 1286 1286 RegisterOption("ViewCells.maxPvsRatio", … … 1290 1290 1291 1291 RegisterOption("ViewCells.filename", 1292 optString,1293 "view_cells_filename=",1294 "atlanta_viewcells_large.x3d");1292 optString, 1293 "view_cells_filename=", 1294 "atlanta_viewcells_large.x3d"); 1295 1295 1296 1296 RegisterOption("ViewCells.height", 1297 optFloat,1298 "view_cells_height=",1299 "5.0");1297 optFloat, 1298 "view_cells_height=", 1299 "5.0"); 1300 1300 1301 1301 RegisterOption("ViewCells.Visualization.colorCode", 1302 optString, 1303 "-view_cells_visualization_color_code", 1304 "PVS"); 1302 optString, 1303 "view_cells_visualization_color_code", 1304 "PVS"); 1305 1306 RegisterOption("ViewCells.Visualization.clipPlanePos", 1307 optFloat, 1308 "view_cells_visualization_clip_plane_pos", 1309 "0.35"); 1310 1311 RegisterOption("ViewCells.Visualization.exportGeometry", 1312 optBool, 1313 "view_cells_visualization_export_geometry", 1314 "false"); 1305 1315 1306 1316 RegisterOption("ViewCells.Visualization.exportRays", 1307 optBool, 1308 "-view_cells_delayed_construction", 1309 "false"); 1310 1311 1312 RegisterOption("ViewCells.Visualization.exportGeometry", 1313 optBool, 1314 "-view_cells_visualization_export_geometry", 1315 "false"); 1317 optBool, 1318 "view_cells_visualization_export_rays", 1319 "false"); 1316 1320 1317 1321 RegisterOption("ViewCells.pruneEmptyViewCells", 1318 optBool,1319 "-view_cells_prune_empty_view_cells",1320 "false");1322 optBool, 1323 "view_cells_prune_empty_view_cells", 1324 "false"); 1321 1325 1322 1326 RegisterOption("ViewCells.processOnlyValidViewCells", 1323 optBool,1324 "-view_cells_process_only_valid_view_cells",1325 "false");1327 optBool, 1328 "view_cells_process_only_valid_view_cells", 1329 "false"); 1326 1330 1327 1331 1328 1332 RegisterOption("ViewCells.PostProcess.maxCostRatio", 1329 1333 optFloat, 1330 " -view_cells_post_process_max_cost_ratio=",1334 "view_cells_post_process_max_cost_ratio=", 1331 1335 "0.9"); 1332 1336 1333 1337 RegisterOption("ViewCells.PostProcess.renderCostWeight", 1334 1338 optFloat, 1335 " -view_cells_post_process_render_cost_weight",1339 "view_cells_post_process_render_cost_weight", 1336 1340 "0.5"); 1337 1341 1338 1342 RegisterOption("ViewCells.PostProcess.avgCostMaxDeviation", 1339 1343 optFloat, 1340 " -vsp_bsp_avgcost_max_deviations",1344 "vsp_bsp_avgcost_max_deviations", 1341 1345 "0.5"); 1342 1346 1343 1347 RegisterOption("ViewCells.PostProcess.maxMergesPerPass", 1344 1348 optInt, 1345 "v sp_bsp_term_max_merges_per_pass=",1349 "view_cells_post_process_max_merges_per_pass=", 1346 1350 "500"); 1347 1351 1348 1352 RegisterOption("ViewCells.PostProcess.minViewCells", 1349 1353 optInt, 1350 "v sp_bsp_term_post_process_min_view_cells=",1354 "view_cells_post_process_min_view_cells=", 1351 1355 "1000"); 1352 1356 … … 1857 1861 RegisterOption("VspBspTree.useSplitCostQueue", 1858 1862 optBool, 1859 " -vsp_bsp_use_split_cost_queue=",1863 "vsp_bsp_use_split_cost_queue=", 1860 1864 "true"); 1861 1865 … … 1970 1974 RegisterOption("VspBspTree.splitUseOnlyDrivingAxis", 1971 1975 optBool, 1972 "vsp_bsp_split driving=",1976 "vsp_bsp_split_only_driving_axis=", 1973 1977 "false"); 1974 1978 … … 2009 2013 RegisterOption("VspBspTree.useBreathFirstSplits", 2010 2014 optBool, 2011 " -vsp_bsp_breath_first_splits=",2015 "vsp_bsp_breath_first_splits=", 2012 2016 "false"); 2013 2017 -
GTP/trunk/Lib/Vis/Preprocessing/src/KdTree.cpp
r580 r667 297 297 app << "#N_LEAVES ( Number of leaves )\n" << Leaves() << "\n"; 298 298 299 app << "#N_SPLITS ( Number of splits in axes x y z dx dy dz 299 app << "#N_SPLITS ( Number of splits in axes x y z dx dy dz)\n"; 300 300 for (int i=0; i<7; i++) 301 301 app << splits[i] <<" "; -
GTP/trunk/Lib/Vis/Preprocessing/src/RssTree.cpp
r579 r667 196 196 app << "#N_LEAVES ( Number of leaves )\n" << Leaves() << "\n"; 197 197 198 app << "#N_SPLITS ( Number of splits in axes x y z dx dy dz 198 app << "#N_SPLITS ( Number of splits in axes x y z dx dy dz)\n"; 199 199 for (int i=0; i<7; i++) 200 200 app << splits[i] <<" "; -
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellBsp.cpp
r666 r667 403 403 app << "#AXIS_ALIGNED_SPLITS (number of axis aligned splits)\n" << splits[0] + splits[1] + splits[2] << endl; 404 404 405 app << "#N_SPLITS ( Number of splits in axes x y z \n";405 app << "#N_SPLITS ( Number of splits in axes x y z)\n"; 406 406 407 407 for (int i = 0; i < 3; ++ i) … … 915 915 916 916 mStat.Start(); 917 cout << "Con tructing bsp tree ...\n";917 cout << "Constructing bsp tree ...\n"; 918 918 long startTime = GetTime(); 919 919 while (!tStack.empty()) -
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp
r666 r667 16 16 #include "RssPreprocessor.h" 17 17 18 #define SAMPLE_AFTER_SUBDIVISION 018 #define SAMPLE_AFTER_SUBDIVISION 1 19 19 20 20 … … 210 210 211 211 // rays can be passed or deleted 212 if (0) // remove!!213 212 disposeRays(initialSamples, outRays); 214 213 … … 216 215 // -- stats after contruction 217 216 ResetViewCells(); 218 Debug << "\nView cells after initial sampling: " << mCurrentViewCellsStats << endl; 217 218 Debug << "\nView cells after initial sampling:\n" << mCurrentViewCellsStats << endl; 219 219 220 220 if (0) // export initial view cells … … 247 247 VssRayContainer constructionSamples; 248 248 249 const int samplingType = mSamplingType;250 /*dirSamples ?249 const int samplingType = 250 dirSamples ? 251 251 Preprocessor::DIRECTION_BASED_DISTRIBUTION : 252 252 Preprocessor::SPATIAL_BOX_BASED_DISTRIBUTION; 253 */ 253 254 254 if (0) 255 255 dirSamples = !dirSamples; // toggle sampling method 256 256 257 numSamples += CastPassSamples(mSamplesPerPass, 257 258 samplingType, … … 333 334 } 334 335 335 ViewCellContainer leaves; 336 mViewCellsTree->CollectLeaves(mViewCellsTree->GetRoot(), leaves); 337 mViewCellsTree->ResetPvs(); 338 VssRayContainer dummyRays; 339 CastPassSamples(mInitialSamples, mSamplingType, dummyRays); 340 341 //ComputeSampleContributions(initialSamples, true, false); 342 ComputeSampleContributions(dummyRays, true, false); 343 344 ViewCellContainer::const_iterator it, it_end = leaves.end(); 345 346 for (it = leaves.begin(); it != it_end; ++ it) 347 { 348 mViewCellsTree->PropagatePvs(*it); 349 } 350 351 mViewCellsTree->ExportStats("dummy.log"); 336 if (0) 337 { 338 ViewCellContainer leaves; 339 mViewCellsTree->CollectLeaves(mViewCellsTree->GetRoot(), leaves); 340 mViewCellsTree->ResetPvs(); 341 VssRayContainer dummyRays; 342 CastPassSamples(mInitialSamples, mSamplingType, dummyRays); 343 344 //ComputeSampleContributions(initialSamples, true, false); 345 ComputeSampleContributions(dummyRays, true, false); 346 347 ViewCellContainer::const_iterator it, it_end = leaves.end(); 348 349 for (it = leaves.begin(); it != it_end; ++ it) 350 { 351 mViewCellsTree->PropagatePvs(*it); 352 } 353 354 mViewCellsTree->ExportStats("dummy.log"); 355 } 352 356 353 357 return numSamples; … … 428 432 429 433 // output stats 430 sprintf(s, " Stats-%09d-eval.log", castSamples);434 sprintf(s, "-%09d-eval.log", castSamples); 431 435 string fileName = string(statsPrefix) + string(s); 432 436 … … 899 903 { 900 904 int axis = 0; 901 902 const float factor = 0.65f; 903 Vector3 point = mViewSpaceBox.Min() + mViewSpaceBox.Size() * factor; 905 float pos; 906 907 environment->GetFloatValue("ViewCells.Visualization.clipPlanePos", pos); 908 909 Vector3 point = mViewSpaceBox.Min() + mViewSpaceBox.Size() * pos; 904 910 905 911 if (mUseClipPlaneForViz) … … 2663 2669 2664 2670 //TODO: remove 2665 if (0)2666 mVspBspTree->Construct(constructionRays, &mViewSpaceBox);2671 if (1) 2672 mVspBspTree->Construct(constructionRays, &mViewSpaceBox); 2667 2673 else 2668 mVspBspTree->Construct(rays, &mViewSpaceBox); 2674 mVspBspTree->Construct(rays, &mViewSpaceBox); 2675 2669 2676 // collapse invalid regions 2670 2677 cout << "collapsing invalid tree regions ... "; … … 2747 2754 2748 2755 //BspLeaf::NewMail(); 2749 if ( 0) // export merged view cells2756 if (1) // export merged view cells 2750 2757 { 2751 2758 mColorCode = 0; … … 2778 2785 } 2779 2786 2780 if ( 0) // export merged view cells using pvs coding2787 if (1) // export merged view cells using pvs coding 2781 2788 { 2782 2789 mColorCode = 1; -
GTP/trunk/Lib/Vis/Preprocessing/src/VspBspTree.cpp
r666 r667 152 152 Debug << "use random axis: " << mUseRandomAxis << endl; 153 153 Debug << "breath first splits: " << mBreathFirstSplits << endl; 154 Debug << "only driving axis: " << mOnlyDrivingAxis << endl;154 155 155 Debug << "octree: " << mSimulateOctree << endl; 156 156 … … 482 482 483 483 mBspStats.Start(); 484 cout << "Con tructing vsp bsp tree ... \n";484 cout << "Constructing vsp bsp tree ... \n"; 485 485 486 486 long startTime = GetTime(); … … 588 588 589 589 mBspStats.Start(); 590 cout << "Con tructing vsp bsp tree ... \n";590 cout << "Constructing vsp bsp tree ... \n"; 591 591 592 592 long startTime = GetTime(); -
GTP/trunk/Lib/Vis/Preprocessing/src/VspKdTree.cpp
r598 r667 495 495 app << "#N_LEAVES ( Number of leaves )\n" << Leaves() << "\n"; 496 496 497 app << "#N_SPLITS ( Number of splits in axes x y z \n";497 app << "#N_SPLITS ( Number of splits in axes x y z)\n"; 498 498 499 499 for (int i = 0; i < 3; ++ i) -
GTP/trunk/Lib/Vis/Preprocessing/src/VssTree.cpp
r551 r667 154 154 app << "#N_LEAVES ( Number of leaves )\n" << Leaves() << "\n"; 155 155 156 app << "#N_SPLITS ( Number of splits in axes x y z dx dy dz 156 app << "#N_SPLITS ( Number of splits in axes x y z dx dy dz)\n"; 157 157 for (int i=0; i<7; i++) 158 158 app << splits[i] <<" "; -
GTP/trunk/Lib/Vis/shared/EvalStats/EvalStats.cpp
r656 r667 12 12 using namespace std; 13 13 14 /** This is a small function which takes two log files and computes the 15 difference in percent of the weighted render cost. 16 */ 14 17 bool extractRenderCost(ifstream &file, vector<float> &renderCosts) 15 18 { … … 49 52 vector<float> renderCosts2; 50 53 54 if (argc < 4) 55 { 56 cerr << "arguments missing" << endl; 57 exit(1); 58 } 59 60 61 // read two files and the output file 62 63 // read file 1 51 64 ifstream file1(argv[1]); 52 ifstream file2(argv[2]); 65 66 // extract the render cost 67 cout << "extracting render cost of file " << argv[1] << endl; 68 cout.flush(); 69 extractRenderCost(file1, renderCosts1); 70 71 // read file 2 72 ifstream file2(argv[2]); 73 cout << "extracting render cost of file " << argv[2] << endl; 74 cout.flush(); 75 extractRenderCost(file2, renderCosts2); 76 77 78 cout << "writing output to file " << argv[3] << endl; 53 79 54 80 ofstream statsOut(argv[3]); 55 56 extractRenderCost(file1, renderCosts1);57 extractRenderCost(file2, renderCosts2);58 81 59 82 //statsOut << "rc1 size: " << (int)renderCosts1.size() << " " << (int)renderCosts2.size() << endl << endl;
Note: See TracChangeset
for help on using the changeset viewer.