Changeset 2394 for GTP/trunk/Lib/Vis/Preprocessing
- Timestamp:
- 05/24/07 18:33:00 (17 years ago)
- Location:
- GTP/trunk/Lib/Vis/Preprocessing
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/scripts/gi_final.env
r2381 r2394 266 266 Construction { 267 267 268 samples 5000000268 samples 6000000 269 269 270 270 # type 0 = sequential computation, 1 = interleaved, 2 = gradient … … 288 288 Termination { 289 289 # maximal number of leaves 290 maxLeaves 100000290 maxLeaves 200000 291 291 # maximal memory in MB 292 292 # maxMemory 4 293 maxMemory 20293 maxMemory 35 294 294 # minimum ratio of global cost decrease 295 295 minGlobalCostRatio -1 -
GTP/trunk/Lib/Vis/Preprocessing/src/Exporter.cpp
r2231 r2394 153 153 SetFilled(); 154 154 155 if (1) 156 ExportGeometry(leaf->mObjects, true, box); 157 else 158 ExportBox(leaf->GetBoundingBox()); 155 ExportGeometry(leaf->mObjects, true, box); 159 156 } 160 157 -
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp
r2387 r2394 3569 3569 void ViewCellsManager::ExportColor(Exporter *exporter, 3570 3570 ViewCell *vc, 3571 boolcolorCode) const3571 int colorCode) const 3572 3572 { 3573 3573 const bool vcValid = CheckValidity(vc, mMinPvsSize, mMaxPvsSize); … … 3576 3576 static Material m; 3577 3577 //cout << "color code: " << colorCode << endl; 3578 switch (mColorCode) 3578 3579 switch (colorCode) 3579 3580 { 3580 3581 case 0: // Random … … 3601 3602 if (mCurrentViewCellsStats.maxPvs) 3602 3603 { 3603 importance = (float)mViewCellsTree->GetTrianglesInPvs(vc) / 700;3604 //(float)mCurrentViewCellsStats.maxPvs;3604 importance = //(float)mViewCellsTree->GetTrianglesInPvs(vc) / 700; 3605 (float)mCurrentViewCellsStats.maxPvs; 3605 3606 } 3606 3607 } … … 3996 3997 if (1) // export final view cells 3997 3998 { 3998 mColorCode = 1; // hack color code3999 mColorCode = 1; // 0 = pvs, 1 = random 3999 4000 Exporter *exporter = Exporter::GetExporter("final_view_cells.wrl"); 4000 4001 … … 4073 4074 const bool exportRays, 4074 4075 const int maxRays, 4075 const string prefix,4076 const string &prefix, 4076 4077 VssRayContainer *visRays) 4077 4078 { … … 4589 4590 const bool exportRays, 4590 4591 const int maxRays, 4591 const string prefix,4592 const string &prefix, 4592 4593 VssRayContainer *visRays) 4593 4594 { … … 5395 5396 const bool exportRays, 5396 5397 const int maxRays, 5397 const string prefix,5398 const string &prefix, 5398 5399 VssRayContainer *visRays) 5399 5400 { … … 6328 6329 if (exporter) 6329 6330 { 6331 // clamp to a scene boudning box 6330 6332 if (CLAMP_TO_BOX) 6331 {6332 6333 exporter->mClampToBox = true; 6333 } 6334 6335 EvaluateViewCellsStats(); 6336 6334 6337 6335 const long starttime = GetTime(); 6338 6336 cout << "exporting final view cells (after initial construction + post process) ... " << endl; … … 6350 6348 const int savedColorCode = mColorCode; 6351 6349 6352 const float maxRenderCost = UpdateObjectCosts();6353 cout << "maxRenderCost: " << maxRenderCost << endl;6354 mColorCode = 0; // 0 = random, 1 = export pvs6355 6356 if (1)6357 mHierarchyManager->ExportObjectSpaceHierarchy(exporter, objects,6358 CLAMP_TO_BOX ? &bbox : NULL, maxRenderCost, false);6359 6360 6361 if (1)6362 {6363 //ExportViewCellsForViz(exporter, CLAMP_TO_BOX ? &bbox : NULL, mColorCode, GetClipPlane());6364 ExportViewCellsForViz(exporter, NULL, mColorCode, GetClipPlane());6365 }6366 6367 delete exporter;6368 6369 cout << "finished in " << TimeDiff(starttime, GetTime()) * 1e-3f << " secs" << endl;6370 mColorCode = savedColorCode;6371 }6372 6373 exporter = Exporter::GetExporter("final_object_partition.wrl");6374 6375 if (exporter)6376 {6377 if (CLAMP_TO_BOX)6378 {6379 exporter->mClampToBox = true;6380 }6381 6382 6350 EvaluateViewCellsStats(); 6383 6384 const long starttime = GetTime(); 6385 cout << "exporting final objects (after initial construction + post process) ... "; 6386 6387 // matt: hack for clamping scene 6388 AxisAlignedBox3 bbox = mViewSpaceBox; 6389 bbox.Scale(scale); 6390 6391 // hack color code (show pvs size) 6392 const int savedColorCode = mColorCode; 6393 6394 mColorCode = 1; // 0 = random, 1 = export pvs 6395 // don't visualize render cost 6396 const float maxRenderCost = -1; 6397 6351 const int colorCode = 0; 6352 6353 const float maxRenderCost = -1;//UpdateObjectCosts(); 6354 const bool exportBounds = false; 6355 6356 //cout << "maxRenderCost: " << maxRenderCost << endl; 6398 6357 if (1) 6399 6358 mHierarchyManager->ExportObjectSpaceHierarchy(exporter, … … 6401 6360 CLAMP_TO_BOX ? &bbox : NULL, 6402 6361 maxRenderCost, 6403 false);6362 exportBounds); 6404 6363 6405 6406 if (1) 6407 { 6408 ExportViewCellsForViz(exporter, NULL, mColorCode, GetClipPlane()); 6409 //ExportViewCellsForViz(exporter, CLAMP_TO_BOX ? &bbox : NULL, mColorCode, GetClipPlane()); 6410 } 6411 6364 //ExportViewCellsForViz(exporter, CLAMP_TO_BOX ? &bbox : NULL, mColorCode, GetClipPlane()); 6365 ExportViewCellsForViz(exporter, NULL, colorCode, GetClipPlane()); 6366 6412 6367 delete exporter; 6413 6368 6414 6369 cout << "finished in " << TimeDiff(starttime, GetTime()) * 1e-3f << " secs" << endl; 6415 mColorCode = savedColorCode; 6416 } 6417 6418 // visualization of the merged view cells 6419 if (0) 6420 { 6421 ExportMergedViewCells(objects); 6370 } 6371 6372 if (1) 6373 { 6374 exporter = Exporter::GetExporter("final_object_partition.wrl"); 6375 6376 if (exporter) 6377 { 6378 if (CLAMP_TO_BOX) 6379 { 6380 exporter->mClampToBox = true; 6381 } 6382 6383 const long starttime = GetTime(); 6384 cout << "exporting final objects (after initial construction + post process) ... "; 6385 6386 // matt: hack for clamping scene 6387 AxisAlignedBox3 bbox = mViewSpaceBox; 6388 bbox.Scale(scale); 6389 6390 // hack color code (show pvs size) 6391 const int savedColorCode = mColorCode; 6392 6393 EvaluateViewCellsStats(); 6394 mColorCode = 1; // 0 = random, 1 = export pvs 6395 6396 // don't visualize render cost 6397 const float maxRenderCost = -1; 6398 //const bool exportBounds = true; 6399 const bool exportBounds = false; 6400 6401 if (1) 6402 mHierarchyManager->ExportObjectSpaceHierarchy(exporter, 6403 objects, 6404 CLAMP_TO_BOX ? &bbox : NULL, 6405 maxRenderCost, 6406 exportBounds); 6407 6408 6409 delete exporter; 6410 6411 cout << "finished in " << TimeDiff(starttime, GetTime()) * 1e-3f << " secs" << endl; 6412 mColorCode = savedColorCode; 6413 } 6422 6414 } 6423 6415 … … 6447 6439 const bool exportRays, 6448 6440 const int maxRays, 6449 const string prefix,6441 const string &prefix, 6450 6442 VssRayContainer *visRays) 6451 6443 { -
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.h
r2353 r2394 655 655 const bool exportRays, 656 656 const int maxRays, 657 const string prefix,657 const string &prefix, 658 658 VssRayContainer *visRays = NULL) = NULL; 659 659 … … 756 756 virtual void ExportColor(Exporter *exporter, 757 757 ViewCell *vc, 758 const boolcolorCode) const;758 const int colorCode) const; 759 759 760 760 /** Creates meshes from the view cells. … … 985 985 const bool exportRays, 986 986 const int maxRays, 987 const string prefix,987 const string &prefix, 988 988 VssRayContainer *visRays = NULL); 989 989 … … 1070 1070 const bool exportRays, 1071 1071 const int maxRays, 1072 const string prefix,1072 const string &prefix, 1073 1073 VssRayContainer *visRays = NULL); 1074 1074 … … 1159 1159 const bool exportRays, 1160 1160 const int maxRays, 1161 const string prefix,1161 const string &prefix, 1162 1162 VssRayContainer *visRays = NULL); 1163 1163 … … 1292 1292 const bool exportRays, 1293 1293 const int maxRays, 1294 const string prefix,1294 const string &prefix, 1295 1295 VssRayContainer *visRays = NULL); 1296 1296
Note: See TracChangeset
for help on using the changeset viewer.