- Timestamp:
- 11/02/05 23:59:16 (19 years ago)
- Location:
- trunk/VUT
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/GtpVisibility/scripts/GtpVisibility.vcproj
r370 r371 103 103 UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"> 104 104 <File 105 RelativePath="..\src\BatchedQueriesCullingManager.cpp">106 </File>107 <File108 105 RelativePath="..\src\CoherentHierarchicalCullingManager.cpp"> 109 106 </File> … … 140 137 Filter="h;hpp;hxx;hm;inl;inc;xsd" 141 138 UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"> 142 <File143 RelativePath="..\include\BatchedQueriesCullingManager.h">144 </File>145 139 <File 146 140 RelativePath="..\include\CoherentHierarchicalCullingManager.h"> -
trunk/VUT/GtpVisibility/src/VisibilityManager.cpp
r370 r371 5 5 #include "DummyPreprocessingManager.h" 6 6 #include "DummyQueryManager.h" 7 #include "BatchedQueriesCullingManager.h"7 //#include "BatchedQueriesCullingManager.h" 8 8 9 9 namespace GtpVisibility { -
trunk/VUT/GtpVisibilityPreprocessor/scripts/default.env
r370 r371 82 82 # input fromViewCells 83 83 # input fromSceneGeometry 84 samples 20000084 samples 100000 85 85 sideTolerance 0.005 86 86 } -
trunk/VUT/GtpVisibilityPreprocessor/src/SamplingPreprocessor.cpp
r370 r371 531 531 cout << "#totalPvsSize=" << mKdTree->CollectLeafPvs() << endl; 532 532 533 // merge or subdivide view cells534 533 if (mBspTree) 535 534 { … … 538 537 Debug << "original pvs size: " << mBspTree->CountViewCellPvs() << endl; 539 538 539 // merge or subdivide view cells 540 540 long startTime = GetTime(); 541 541 int merged = PostprocessViewCells(mSampleRays); … … 548 548 Debug << "merged pvs size: " << mBspTree->CountViewCellPvs() << endl; 549 549 550 551 cout << "evaluating render time heuristics ... "; 552 Real rt = EvaluateRenderHeuristics(); 553 cout << "finished" << endl; 554 555 Debug << "render time: " << rt * 1e-3 << endl; 550 556 } 551 557 … … 881 887 } 882 888 } 889 890 Real SamplingPreprocessor::EvaluateRenderHeuristics() 891 { 892 Real renderTime = 0; 893 894 const float objRt = 1.0f; // render time for 1 object of PVS 895 const float vcOverhead = 1.0f; // const overhead for crossing a view cell border 896 897 float totalArea = 0; 898 899 ViewCellContainer viewCells; 900 901 mBspTree->CollectViewCells(viewCells); 902 903 ViewCellContainer::const_iterator it, it_end = viewCells.end(); 904 PolygonContainer::const_iterator pit; 905 906 for (it = viewCells.begin(); it != it_end; ++ it) 907 { 908 // surface area substitute for probability 909 PolygonContainer cell; 910 float area = 0; 911 912 mBspTree->ConstructGeometry(dynamic_cast<BspViewCell *>(*it), cell); 913 914 for (pit = cell.begin(); pit != cell.end(); ++ pit) 915 area += (*pit)->GetArea(); 916 917 renderTime += area * (*it)->GetPvs().GetSize() * objRt; 918 totalArea += area; 919 } 920 921 renderTime /= totalArea; 922 923 renderTime += (float)viewCells.size() * vcOverhead; 924 925 return renderTime; 926 } -
trunk/VUT/GtpVisibilityPreprocessor/src/SamplingPreprocessor.h
r369 r371 97 97 int PostprocessViewCells(const RayContainer &rays); 98 98 99 /** Simulated rendering using a simple render heuristics. Used to evaluate the 100 quality of the view cell partition. 101 */ 102 Real EvaluateRenderHeuristics(); 99 103 }; 100 104
Note: See TracChangeset
for help on using the changeset viewer.