- Timestamp:
- 11/04/05 03:47:27 (19 years ago)
- Location:
- trunk/VUT/GtpVisibilityPreprocessor
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/GtpVisibilityPreprocessor/scripts/Preprocessor.vcproj
r375 r378 20 20 Name="VCCLCompilerTool" 21 21 Optimization="0" 22 AdditionalIncludeDirectories="..\ support;..\support\devil\include;..\support\zlib\include;"$(QTDIR)\include";"$(QTDIR)\include\Qt";..\include"22 AdditionalIncludeDirectories="..\include" 23 23 PreprocessorDefinitions="WIN32;_DEBUG;_LIB" 24 24 MinimalRebuild="TRUE" … … 255 255 </File> 256 256 <File 257 RelativePath="..\src\Statistics.h">258 </File>259 <File260 257 RelativePath="..\src\Triangle3.cpp"> 261 258 </File> -
trunk/VUT/GtpVisibilityPreprocessor/scripts/default.env
r375 r378 56 56 57 57 Sampling { 58 totalSamples 100000058 totalSamples 400000 59 59 samplesPerPass 3 60 60 } … … 68 68 maxViewCells 0 69 69 70 minPvsDif 1000 71 # maxPvsSize 200 70 71 PostProcessing { 72 minPvsDif 100 73 minPvs 10 74 maxPvs 300 75 samples 100000 76 } 77 72 78 73 79 # filename ../data/atlanta/atlanta_viewcells_large.x3d … … 82 88 # input fromViewCells 83 89 # input fromSceneGeometry 84 samples 10000090 samples 200000 85 91 sideTolerance 0.005 86 92 } … … 126 132 Termination { 127 133 # autopartition 128 maxRays 200129 maxPolygons 5134 maxRays 30 135 maxPolygons 1 130 136 maxDepth 50 131 137 … … 134 140 maxPolys 5000 135 141 maxRays 600 136 maxObjects 20142 maxObjects 10 137 143 maxCostRatio 0.9 138 144 ct_div_ci 0.5 … … 144 150 } 145 151 146 PostProcessing {147 samples 200000148 }149 152 150 153 # if split polys are stored for visualization -
trunk/VUT/GtpVisibilityPreprocessor/src/Environment.cpp
r376 r378 1165 1165 "bspTree"); 1166 1166 1167 RegisterOption("ViewCells.minPvsDif", 1167 RegisterOption("ViewCells.PostProcessing.minPvsDif", 1168 optInt, 1169 "-view_cells_min_pvs_dif", 1170 "10"); 1171 1172 RegisterOption("ViewCells.PostProcessing.maxPvs", 1173 optInt, 1174 "-view_cells_max_pvs", 1175 "300"); 1176 1177 RegisterOption("ViewCells.PostProcessing.minPvs", 1168 1178 optString, 1169 "-view_cells_min_pvs _dif",1179 "-view_cells_min_pvs", 1170 1180 "10"); 1171 1181 … … 1190 1200 "100000"); 1191 1201 1192 RegisterOption(" BspTree.PostProcessing.samples",1202 RegisterOption("ViewCells.PostProcessing.samples", 1193 1203 optInt, 1194 1204 "-bsp_postprocessing_samples=", -
trunk/VUT/GtpVisibilityPreprocessor/src/SamplingPreprocessor.cpp
r375 r378 14 14 environment->GetIntValue("Sampling.totalSamples", mTotalSamples); 15 15 environment->GetIntValue("BspTree.Construction.samples", mBspConstructionSamples); 16 environment->GetIntValue(" BspTree.PostProcessing.samples", mPostProcessSamples);16 environment->GetIntValue("ViewCells.PostProcessing.samples", mPostProcessSamples); 17 17 mKdPvsDepth = 100; 18 18 mStats.open("stats.log"); … … 531 531 cout << "#totalPvsSize=" << mKdTree->CollectLeafPvs() << endl; 532 532 533 //-- post processing of bsp view cells534 533 if (mBspTree) 535 534 { 536 int vcSize = 0; 535 //-- render simulation 536 cout << "\nevaluating render time before merge ... "; 537 Real rt = SimulateRendering(); 538 539 cout << "avg render time: " << rt * 1e-3 << endl; 540 Debug << "avg render time: " << rt * 1e-3 << endl; 541 542 //-- post processing of bsp view cells 543 int vcSize = 0; 537 544 int pvsSize = 0; 538 545 … … 553 560 << TimeDiff(startTime, GetTime()) *1e-3 << " secs" << endl; 554 561 555 cout << "evaluating render time heuristics ... ";556 557 562 //-- recount pvs 558 563 mBspTree->EvaluateViewCellsStats(stat); … … 560 565 Debug << "after post processing:\n" << stat << endl; 561 566 562 Real rt = SimulateRendering(); 563 cout << "finished" << endl; 564 567 //-- render simulation 568 cout << "\nevaluating render time after merge ... "; 569 570 rt = SimulateRendering(); 571 572 cout << "render time: " << rt * 1e-3 << endl; 565 573 Debug << "render time: " << rt * 1e-3 << endl; 566 574 } … … 917 925 918 926 919 920 927 Real SamplingPreprocessor::RenderPvs(ViewCell &viewCell, 921 928 const float objRenderTime) const … … 959 966 renderTime /= totalArea; 960 967 968 Debug << "render time without overhead: " << renderTime * 1e-3 << endl; 969 961 970 renderTime += (float)viewCells.size() * vcOverhead; 962 971 963 972 return renderTime; 964 973 } -
trunk/VUT/GtpVisibilityPreprocessor/src/ViewCellBsp.cpp
r375 r378 24 24 int BspTree::sTermMaxRays = -1; 25 25 int BspTree::sMinPvsDif = 10; 26 int BspTree::sMinPvs = 10; 27 int BspTree::sMaxPvs = 500; 26 28 27 29 float BspTree::sCt_div_ci = 1.0f; … … 349 351 app << setprecision(4); 350 352 353 app << "#N_OVERALLPVS ( objects in PVS )\n" << pvs << endl; 354 351 355 app << "#N_PMAXPVS ( largest PVS )\n" << maxPvs << endl; 352 356 … … 1482 1486 Vector3::sDistToleranceSqrt = Vector3::sDistTolerance * Vector3::sDistTolerance; 1483 1487 1484 environment->GetIntValue("ViewCells.minPvsDif", sMinPvsDif); 1488 // post processing stuff 1489 environment->GetIntValue("ViewCells.PostProcessing.minPvsDif", sMinPvsDif); 1490 environment->GetIntValue("ViewCells.PostProcessing.minPvs", sMinPvs); 1491 environment->GetIntValue("ViewCells.PostProcessing.maxPvs", sMaxPvs); 1485 1492 1486 1493 Debug << "BSP max depth: " << sTermMaxDepth << endl; … … 1814 1821 return false; 1815 1822 1816 /*Debug << "merge (" << sMinPvsDif << ")" << endl; 1817 Debug << "size f: " << fvc->GetPvs().GetSize() << ", " 1818 << "size b: " << bvc->GetPvs().GetSize() << endl; 1819 1820 Debug << "diff f: " << fvc->GetPvs().Diff(bvc->GetPvs()) << ", " 1821 << "diff b: " << bvc->GetPvs().Diff(fvc->GetPvs()) << endl;*/ 1822 1823 if ((fvc->GetPvs().Diff(bvc->GetPvs()) < sMinPvsDif) && 1824 (bvc->GetPvs().Diff(fvc->GetPvs()) < sMinPvsDif)) 1825 return true; 1826 1823 int fdiff = fvc->GetPvs().Diff(bvc->GetPvs()); 1824 1825 if (fvc->GetPvs().GetSize() + fdiff < sMaxPvs) 1826 { 1827 if ((fvc->GetPvs().GetSize() < sMinPvs) || 1828 (bvc->GetPvs().GetSize() < sMinPvs) || 1829 ((fdiff < sMinPvsDif) && (bvc->GetPvs().Diff(fvc->GetPvs()) < sMinPvsDif))) 1830 { 1831 return true; 1832 } 1833 } 1834 1827 1835 return false; 1828 1836 } -
trunk/VUT/GtpVisibilityPreprocessor/src/ViewCellBsp.h
r375 r378 793 793 static bool sStoreSplitPolys; 794 794 795 // / threshold where view cells are merged795 //-- thresholds used for view cells are merging 796 796 static int sMinPvsDif; 797 static int sMinPvs; 798 static int sMaxPvs; 797 799 798 800 private: -
trunk/VUT/GtpVisibilityPreprocessor/src/X3dExporter.cpp
r373 r378 267 267 for (; vi != face->mVertexIndices.end(); vi++) 268 268 stream<<*vi<<" "; 269 if (mWireframe) // final line to finish polygon 270 stream << (*face->mVertexIndices.begin()) << " "; 271 269 272 stream<<"-1"<<endl; 270 273 }
Note: See TracChangeset
for help on using the changeset viewer.