- Timestamp:
- 11/24/05 18:38:19 (19 years ago)
- Location:
- trunk/VUT/GtpVisibilityPreprocessor
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/GtpVisibilityPreprocessor/scripts/default.env
r428 r430 10 10 # filename ../data/vienna/vienna-simple.x3d 11 11 # filename ../data/vienna/vienna-buildings.x3d 12 #filename ../data/vienna/vienna-buildings.x3d;../data/vienna/vienna-roofs.x3d 13 #;../data/vienna/vienna-plane.x3d 12 14 # filename ../data/vienna/viewcells-25-sel.x3d 13 15 filename ../data/atlanta/atlanta2.x3d … … 16 18 } 17 19 20 Preprocessor { 21 # type sampling 22 type vss 23 } 24 25 VssPreprocessor { 26 samplesPerPass 100000 27 initialSamples 200000 28 vssSamples 300000 29 vssSamplesPerPass 100000 30 useImportanceSampling true 31 } 32 33 VssTree { 34 epsilon 1e-6 35 36 maxDepth 40 37 minPvs 3 38 minRays 100 39 minSize 0.001 40 maxCostRatio 0.98 41 maxRayContribution 0.05 42 43 maxTotalMemory 200 44 maxStaticMemory 50 45 46 splitType regular 47 # splitType heuristics 48 49 numberOfEndPointDomains 10000 50 ct_div_ci 0.0 51 randomize false 52 53 refDirBoxMaxSize 0.1 54 } 55 18 56 Limits { 19 57 … … 23 61 } 24 62 25 Preprocessor {26 type sampling27 # type exact28 # type vss29 }30 31 63 Unigraphics { 32 64 meshGrouping 1 … … 36 68 sahUseFaces true 37 69 Termination { 38 minCost 270 minCost 1 39 71 maxDepth 18 40 72 maxCostRatio 0.9 … … 49 81 MeshKdTree { 50 82 Termination { 51 minCost 483 minCost 1 52 84 maxDepth 18 53 85 maxCostRatio 0.9 … … 62 94 63 95 Sampling { 64 totalSamples 96 totalSamples 600000 65 97 samplesPerPass 3 66 98 } … … 68 100 ViewCells { 69 101 #hierarchy kdTree 70 hierarchy vspTree71 #hierarchy bspTree72 # 102 #hierarchy vspTree 103 hierarchy bspTree 104 #hierarchy sceneDependent 73 105 74 106 height 5.0 … … 196 228 197 229 maxDepth 40 198 minPvs 1 230 minPvs 100 199 231 minRays 50 200 232 minSize 0.00001 … … 223 255 224 256 Termination { 225 maxDepth 30226 minPvs 60227 minRays 1228 minSize 0.1229 maxCostRatio 999.0230 maxRayContribution 0.2257 maxDepth 10 258 minPvs 500 259 minRays 1 260 minSize 0.1 261 maxCostRatio 999.0 262 maxRayContribution 0.2 231 263 } 232 264 … … 234 266 maxStaticMemory 600 235 267 236 splitType regular237 # splitTypeheuristics268 splitType regular 269 #splitType heuristics 238 270 ct_div_ci 0.0 239 271 } -
trunk/VUT/GtpVisibilityPreprocessor/src/Ray.cpp
r428 r430 223 223 loc(vssRay.mOrigin), 224 224 sourceObject(0, vssRay.mOriginObject, 0), 225 dir( vssRay.GetDir())225 dir(Normalize(vssRay.GetDir())) 226 226 { 227 227 intersections.push_back(Intersection(vssRay.mT, vssRay.mTerminationObject, 0)); -
trunk/VUT/GtpVisibilityPreprocessor/src/SamplingPreprocessor.cpp
r429 r430 574 574 int pvsSize = 0; 575 575 576 Debug << "overall scene size: " << (int)objects.size() << endl; 577 576 578 BspViewCellsStatistics stat; 577 578 Debug << "overall scene size: " << (int)objects.size() << endl;579 579 mBspTree->EvaluateViewCellsStats(stat); 580 581 580 Debug << "original view cell partition:\n" << stat << endl; 582 581 … … 820 819 { 821 820 // store samples for vsp kd tree construction 822 if ((object || !ray.intersections.empty()) && 823 ((int)mVspSampleRays.size() < mVspConstructionSamples)) 824 { 825 ray.sourceObject = Ray::Intersection(0.0, object, faceIndex); 826 VssRay *sRay = new VssRay(ray); 827 mVspSampleRays.push_back(sRay); 821 if ((int)mVspSampleRays.size() < mVspConstructionSamples) 822 { 823 if (object || !ray.intersections.empty()) 824 { 825 ray.sourceObject = Ray::Intersection(0.0, object, faceIndex); 826 VssRay *sRay = new VssRay(ray); 827 mVspSampleRays.push_back(sRay); 828 } 828 829 } 829 830 else -
trunk/VUT/GtpVisibilityPreprocessor/src/ViewCell.cpp
r419 r430 24 24 return new BspViewCell(mesh); 25 25 default: 26 Debug << "should not come here " << endl;26 Debug << "should not come here 3" << endl; 27 27 return NULL; 28 28 } -
trunk/VUT/GtpVisibilityPreprocessor/src/ViewCellBsp.cpp
r428 r430 308 308 environment->GetIntValue("BspTree.Termination.AxisAligned.minPolys", 309 309 mTermMinPolysForAxisAligned); 310 environment->GetIntValue("BspTree.Termination.AxisAligned.m axRays",310 environment->GetIntValue("BspTree.Termination.AxisAligned.minRays", 311 311 mTermMinRaysForAxisAligned); 312 environment->GetIntValue("BspTree.Termination.AxisAligned.m axObjects",312 environment->GetIntValue("BspTree.Termination.AxisAligned.minObjects", 313 313 mTermMinObjectsForAxisAligned); 314 314 //-- partition criteria … … 1553 1553 break; 1554 1554 default: 1555 Debug << "Should not come here " << endl;1555 Debug << "Should not come here 2" << endl; 1556 1556 break; 1557 1557 } … … 2093 2093 break; 2094 2094 default: 2095 Debug << "Should not come here " << endl;2095 Debug << "Should not come here 4" << endl; 2096 2096 break; 2097 2097 } -
trunk/VUT/GtpVisibilityPreprocessor/src/VssPreprocessor.cpp
r429 r430 423 423 } 424 424 425 425 //-- construct BSP view cells 426 if (ViewCell::sHierarchy == ViewCell::BSP) 427 { 428 const int bspSamples = min((int)mVssRays.size(), mBspConstructionSamples); 429 430 for (int i = 0; i < bspSamples; ++ i) 431 bspRays.push_back(new Ray(*mVssRays[i])); 432 433 //-- construct BSP tree using the samples 434 mBspTree = new BspTree(&mUnbounded); 435 436 mBspTree->SetGenerateViewCells(true); 437 mBspTree->Construct(bspRays); 438 439 Exporter *exporter = Exporter::GetExporter("vccbsprays.x3d"); 440 441 // export rays piercing this view cell 442 exporter->ExportRays(bspRays, 1000, RgbColor(0, 1, 0)); 443 444 // cast remaining initial rays into BSP tree 445 for (int i = bspSamples; i < (int)mVssRays.size(); ++ i) 446 CastRay(*mBspTree, *mVssRays[i]); 447 } 426 448 427 449 vssTree = new VssTree; 428 429 const int bspSamples = min((int)mVssRays.size(), mBspConstructionSamples);430 431 for (int i = 0; i < bspSamples; ++ i)432 bspRays.push_back(new Ray(*mVssRays[i]));433 434 mBspTree = new BspTree(&mUnbounded);435 436 mBspTree->SetGenerateViewCells(true);437 mBspTree->Construct(bspRays);438 439 for (int i = bspSamples; i < (int)mVssRays.size(); ++ i)440 {441 CastRay(*mBspTree, *mVssRays[i]);442 }443 450 444 451 vssTree->Construct(mVssRays, mViewSpaceBox); … … 486 493 } 487 494 488 489 for (int i = 0; i < (int)vssRays.size(); ++ i)495 // cast rays into BSP tree 496 if (ViewCell::sHierarchy == ViewCell::BSP) 490 497 { 491 CastRay(*mBspTree, *mVssRays[i]); 492 } 493 498 for (int i = 0; i < (int)vssRays.size(); ++ i) 499 { 500 CastRay(*mBspTree, *mVssRays[i]); 501 } 502 } 503 494 504 samples+=num; 495 505 float pvs = vssTree->GetAvgPvsSize(); … … 505 515 delete vssTree; 506 516 507 ObjectContainer objects; 508 ExportSplits(objects, bspRays, 10000); 509 ExportBspPvs(objects, bspRays, 10000); 510 511 CLEAR_CONTAINER(bspRays); 517 if (ViewCell::sHierarchy == ViewCell::BSP) 518 { 519 Debug << mBspTree->GetStatistics(); 520 521 ObjectContainer objects; 522 ExportSplits(objects, bspRays, 10000); 523 ExportBspPvs(objects, bspRays, 10000); 524 525 BspViewCellsStatistics stat; 526 mBspTree->EvaluateViewCellsStats(stat); 527 Debug << "original view cell partition:\n" << stat << endl; 528 529 // clear BSP samples 530 CLEAR_CONTAINER(bspRays); 531 } 512 532 513 533 return true; … … 519 539 Ray ray(vssRay); 520 540 541 /*Debug << ray << endl; 542 if (ray.intersections.empty()) 543 Debug << "empty ray" << endl; 544 else 545 Debug << "intersection: " << ray.intersections[0].mT << " " << ray.intersections[0].mObject << endl; 546 */ 521 547 mBspTree->CastRay(ray); 522 548 -
trunk/VUT/GtpVisibilityPreprocessor/src/VssRay.h
r429 r430 76 76 if (!ray.intersections.empty()) 77 77 { 78 mTermination = ray.Extrap(ray.intersections[0].mT); 78 mT = ray.intersections[0].mT; 79 mTermination = ray.Extrap(mT); 79 80 mTerminationObject = ray.intersections[0].mObject; 80 81 } 81 82 else 82 83 { 83 mTermination = mOrigin + ray.GetDir() * 99999; 84 mT = 1e6;//Limits::Infinity; 85 mTermination = mOrigin + ray.GetDir() * mT; 84 86 mTerminationObject = NULL; 85 87 } -
trunk/VUT/GtpVisibilityPreprocessor/src/VssTree.cpp
r427 r430 986 986 (*ri).mRay->Unref(); 987 987 988 Debug << "computed t: " << (*ri).mRay->mT << endl; 988 989 // determine the side of this ray with respect to the plane 989 990 int side = node->ComputeRayIntersection(*ri, (*ri).mRay->mT); -
trunk/VUT/GtpVisibilityPreprocessor/src/default.env
r427 r430 99 99 100 100 ViewCells { 101 hierarchy kdTree 101 #hierarchy kdTree 102 hierarchy vspTree 102 103 #hierarchy bspTree 103 104 # hierarchy sceneDependent … … 106 107 maxViewCells 0 107 108 109 PostProcessing { 108 110 minPvsDif 100 109 # maxPvsSize 200 111 minPvs 10 112 maxPvs 150 113 samples 100000 114 } 115 110 116 111 117 # filename ../data/atlanta/atlanta_viewcells_large.x3d … … 117 123 BspTree { 118 124 Construction { 119 input from Rays125 input fromSamples 120 126 # input fromViewCells 121 127 # input fromSceneGeometry 122 samples 1 00000128 samples 150000 123 129 sideTolerance 0.005 124 130 } … … 158 164 #splitPlaneStrategy 130 159 165 160 splitPlaneStrategy 1024 161 162 maxCandidates 80 163 164 Termination { 165 # autopartition 166 maxRays 200 167 maxPolygons 5 168 maxDepth 100 166 splitPlaneStrategy 12 167 168 maxPolyCandidates 70 169 maxRayCandidates 100 170 171 # factors for evaluating split plane costs 172 Factor { 173 verticalSplits 1.0 174 largestPolyArea 1.0 175 blockedRays 1.0 176 leastRaySplits 1.0 177 balancedRays 1.0 178 pvsFactor 1.0 179 leastSplits 1.0 180 balancedPolys 1.0 181 balancedViewCells 1.0 182 } 183 184 Termination { 185 # parameters used for autopartition 186 minRays 200 187 minPolygons -1 188 maxDepth 40 189 minPvs 35 190 minArea 0.01 191 maxRayContribution 0.005 192 #maxAccRayLength 100 193 194 # used for pvs criterium 195 ct_div_ci 0.0 169 196 170 197 # axis aligned splits 171 198 AxisAligned { 172 m axPolys 5000173 m axRays 5000174 m axObjects 2000199 minPolys 5000 200 minRays 500 201 minObjects 10 175 202 maxCostRatio 0.9 176 203 ct_div_ci 0.5 … … 182 209 } 183 210 184 PostProcessing {185 samples 100000186 }187 211 188 # if split polys are stored for visualization 189 storeSplitPolys false 212 Visualization { 190 213 # x3d visualization of the split planes 191 214 exportSplits true 192 } 215 # how much samples should be used in visualization 216 samples 20000 217 } 218 } 219 220 Simulation { 221 objRenderCost 1.0 222 vcOverhead 7.0 223 moveSpeed 3.0 224 } 225 226 VssTree { 227 epsilon 1e-6 228 229 maxDepth 40 230 minPvs 1 231 minRays 50 232 minSize 0.00001 233 maxCostRatio 0.95 234 maxRayContribution 0.05 235 236 maxTotalMemory 400 237 maxStaticMemory 20 238 239 splitType regular 240 # splitType heuristics 241 242 numberOfEndPointDomains 10000 243 ct_div_ci 0.0 244 randomize false 245 246 refDirBoxMaxSize 0.1 247 } 248 249 VspKdTree { 250 epsilon 1e-6 251 252 Construction { 253 samples 500000 254 } 255 256 Termination { 257 maxDepth 30 258 minPvs 60 259 minRays 1 260 minSize 0.1 261 maxCostRatio 999.0 262 maxRayContribution 0.2 263 } 264 265 maxTotalMemory 600 266 maxStaticMemory 600 267 268 splitType regular 269 # splitType heuristics 270 ct_div_ci 0.0 271 }
Note: See TracChangeset
for help on using the changeset viewer.