Changeset 2228 for GTP/trunk/Lib/Vis/Preprocessing/src
- Timestamp:
- 03/11/07 16:14:59 (18 years ago)
- Location:
- GTP/trunk/Lib/Vis/Preprocessing/src
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/BvHierarchy.cpp
r2227 r2228 1118 1118 ar = rbox.SurfaceArea(); 1119 1119 1120 // should use classical approach here ... 1120 1121 #if BOUND_RENDERCOST 1121 1122 const float sum = noValidSplit ? 1e25f : objectsLeft * al + objectsRight * ar; … … 1890 1891 //-- surface area heuristics 1891 1892 1892 if (leaf->mObjects.empty())1893 return 0.0f;1893 // eraly exit 1894 //if (leaf->mObjects.empty()) return 0.0f; 1894 1895 1895 1896 const AxisAlignedBox3 box = GetBoundingBox(leaf); -
GTP/trunk/Lib/Vis/Preprocessing/src/Environment.cpp
r2227 r2228 2680 2680 "100000"); 2681 2681 2682 RegisterOption("Hierarchy.minRenderCost", 2683 optFloat, 2684 "hierarchy_minRenderCost=", 2685 "0"); 2686 2682 2687 RegisterOption("Hierarchy.subdivisionStats", 2683 2688 optString, … … 2778 2783 optFloat, 2779 2784 "hierarchy_construction_max_avg_rays_per_object=", 2780 " 2");2785 "0"); 2781 2786 2782 2787 RegisterOption("Hierarchy.Construction.minAvgRaysPerObject", 2783 2788 optFloat, 2784 2789 "hierarchy_construction_min_avg_rays_per_object=", 2785 " 1");2790 "0"); 2786 2791 2787 2792 RegisterOption("Hierarchy.useTraversalTree", -
GTP/trunk/Lib/Vis/Preprocessing/src/HierarchyManager.cpp
r2227 r2228 105 105 Environment::GetSingleton()->GetFloatValue( 106 106 "Hierarchy.Termination.minGlobalCostRatio", mTermMinGlobalCostRatio); 107 108 Environment::GetSingleton()->GetFloatValue("Hierarchy.minRenderCost", mMinRenderCost); 109 107 110 Environment::GetSingleton()->GetIntValue( 108 111 "Hierarchy.Termination.globalCostMissTolerance", mTermGlobalCostMissTolerance); … … 179 182 Debug << "max avg rays per object: " << mMaxAvgRaysPerObject << endl; 180 183 Debug << "mín avg rays per object: " << mMinAvgRaysPerObject << endl; 184 Debug << "mín render cost: " << mMinRenderCost << endl; 181 185 182 186 // for comparing it with byte - value … … 833 837 const float avgRaysPerObjects) const 834 838 { 839 // don't correct pvss 840 if (mMaxAvgRaysPerObject <= mMinAvgRaysPerObject) 841 { 842 return childPvs; 843 } 844 835 845 // assume pvs sampled sufficiently => take child pvs 836 846 if (avgRaysPerObjects > mMaxAvgRaysPerObject) … … 838 848 return childPvs; 839 849 } 840 // assume pvs not sampled sufficiently => take total pvs 841 else if (avgRaysPerObjects <= mMinAvgRaysPerObject) 842 { 843 cout << "b ";// << avgRaysPerObjects << " "; 850 851 // assume pvs not sampled sufficiently => pvs equal to parent pvs 852 // we should not subdivide further from this point 853 if (avgRaysPerObjects <= mMinAvgRaysPerObject) 854 { 855 cout << "t ";// << avgRaysPerObjects << " "; 844 856 return totalPvs; 845 857 } 858 859 /////////// 860 //-- blend pvss 846 861 847 862 const float alpha = (mMaxAvgRaysPerObject - avgRaysPerObjects) / … … 857 872 const float newPvs = alpha * childPvs + (1.0f - alpha) * totalPvs; 858 873 #endif 859 cout << " c";// << avgRaysPerObjects << " ";874 cout << "b ";// << avgRaysPerObjects << " "; 860 875 //cout << "alpha " << alpha << " beta: " << beta << " child: " << childPvs << " parent: " << totalPvs << endl; 861 876 … … 927 942 928 943 mPriority = sc->GetPriority(); 944 945 cout << sc->Type() << " "; 929 946 930 947 ////////// … … 1160 1177 { 1161 1178 //sc->CollectDirtyCandidates(dirtyCandidates, true); 1162 //if (steps % 10 == 0) 1163 cout << sc->Type() << " "; 1179 //if (steps % 10 == 0) cout << sc->Type() << " "; 1164 1180 1165 1181 ++ steps; -
GTP/trunk/Lib/Vis/Preprocessing/src/HierarchyManager.h
r2227 r2228 625 625 bool mUseTraversalTree; 626 626 627 float mMinRenderCost; 628 627 629 protected: 628 630 -
GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.icproj
r2199 r2228 236 236 OptimizeForWindowsApplication="1" 237 237 AdditionalIncludeDirectories="..\src;..\..\..\..\..\..\NonGTP\Devil\include;..\..\..\..\..\..\NonGTP\Zlib\include;..\..\..\..\..\..\NonGTP\Xerces;..\..\..\..\..\..\NonGTP\Boost;..\MultiLevelRayTracing;"$(QTDIR)\include\QtCore";"$(QTDIR)\include\QtGui";"$(QTDIR)\include";"$(QTDIR)\include\QtOpenGl";"$(CG_INC_PATH)";Timer;..\src\sparsehash\src\google\sparsehash;..\src\sparsehash\src\windows;..\src\sparsehash\src\google;..\src\sparsehash\src;..\src\ootl\;..\src\ootl\src\;..\src\ootl\src\cpp;..\src\ootl\src\cpp\include\;..\src\ootl\src\include\ootl;..\src\ootl\src\include\ootl\sandbox;..\src\ootl\src\cpp\include\ootl\mswin" 238 PreprocessorDefinitions="WIN32;NDEBUG;_LIB;GTP_INTERNAL;USE_QT;USE_HASH_PV S"238 PreprocessorDefinitions="WIN32;NDEBUG;_LIB;GTP_INTERNAL;USE_QT;USE_HASH_PV" 239 239 ExceptionHandling="1" 240 240 RuntimeLibrary="2" … … 275 275 <Tool 276 276 Name="GeneralTool" 277 OutputDirectory=" $(ConfigurationName)"278 IntermediateDirectory=" $(ConfigurationName)"277 OutputDirectory="Release" 278 IntermediateDirectory="Release" 279 279 ConfigurationType="4" 280 280 CharacterSet="2"/> … … 290 290 OmitFramePointers="1" 291 291 EnableFiberSafeOptimizations="1" 292 OptimizeForProcessor=" 0"292 OptimizeForProcessor="1" 293 293 OptimizeForWindowsApplication="1" 294 AdditionalIncludeDirectories="..\src;..\..\..\..\..\..\NonGTP\Devil\include;..\..\..\..\..\..\NonGTP\Zlib\include;..\..\..\..\..\..\NonGTP\Xerces;..\..\..\..\..\..\NonGTP\Boost;..\MultiLevelRayTracing; Timer"294 AdditionalIncludeDirectories="..\src;..\..\..\..\..\..\NonGTP\Devil\include;..\..\..\..\..\..\NonGTP\Zlib\include;..\..\..\..\..\..\NonGTP\Xerces;..\..\..\..\..\..\NonGTP\Boost;..\MultiLevelRayTracing;"$(QTDIR)\include\QtCore";"$(QTDIR)\include\QtGui";"$(QTDIR)\include"" 295 295 PreprocessorDefinitions="WIN32;NDEBUG;_LIB;GTP_INTERNAL;NO_QT" 296 296 StringPooling="1" … … 305 305 WarningLevel="2" 306 306 Detect64BitPortabilityProblems="1" 307 DebugInformationFormat="3"/> 307 DebugInformationFormat="3" 308 UseProcExt="3" 309 RequireProcExt="3"/> 308 310 <Tool 309 311 Name="LinkerTool" … … 468 470 RelativePath=".\HashPvs.h"/> 469 471 <File 472 RelativePath=".\HashPvs2.h"/> 473 <File 470 474 RelativePath=".\HierarchyManager.cpp"/> 471 475 <File … … 932 936 RelativePath=".\sparsehash\src\google\sparsehash\densehashtable.h"/> 933 937 <File 938 RelativePath=".\sparsehash\src\google\sparsehash\hash_fun.h"/> 939 <File 934 940 RelativePath=".\sparsehash\src\windows\hash_fun.h"/> 935 <File936 RelativePath=".\sparsehash\src\google\sparsehash\hash_fun.h"/>937 941 <File 938 942 RelativePath=".\sparsehash\src\windows\hash_map.h"/> -
GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.vcproj
r2206 r2228 260 260 <Configuration 261 261 Name="release_noqt|Win32" 262 OutputDirectory=" $(ConfigurationName)"263 IntermediateDirectory=" $(ConfigurationName)"262 OutputDirectory="Release" 263 IntermediateDirectory="Release" 264 264 ConfigurationType="4" 265 265 CharacterSet="2"> … … 267 267 Name="VCCLCompilerTool" 268 268 Optimization="3" 269 InlineFunctionExpansion="0" 270 FavorSizeOrSpeed="0" 271 OptimizeForProcessor="3" 269 GlobalOptimizations="TRUE" 270 InlineFunctionExpansion="2" 271 EnableIntrinsicFunctions="TRUE" 272 FavorSizeOrSpeed="1" 273 OmitFramePointers="TRUE" 274 EnableFiberSafeOptimizations="TRUE" 275 OptimizeForProcessor="1" 272 276 OptimizeForWindowsApplication="TRUE" 273 277 AdditionalIncludeDirectories="..\src;..\..\..\..\..\..\NonGTP\Devil\include;..\..\..\..\..\..\NonGTP\Zlib\include;..\..\..\..\..\..\NonGTP\Xerces;..\..\..\..\..\..\NonGTP\Boost;..\MultiLevelRayTracing;"$(QTDIR)\include\QtCore";"$(QTDIR)\include\QtGui";"$(QTDIR)\include"" 274 278 PreprocessorDefinitions="WIN32;NDEBUG;_LIB;GTP_INTERNAL;NO_QT" 279 StringPooling="TRUE" 275 280 ExceptionHandling="TRUE" 276 281 RuntimeLibrary="2" 282 EnableEnhancedInstructionSet="2" 277 283 DisableLanguageExtensions="FALSE" 278 284 ForceConformanceInForLoopScope="FALSE" 279 RuntimeTypeInfo=" TRUE"285 RuntimeTypeInfo="FALSE" 280 286 UsePrecompiledHeader="0" 281 287 BrowseInformation="1" … … 1160 1166 </File> 1161 1167 <File 1168 RelativePath=".\sparsehash\src\windows\hash_fun.h"> 1169 </File> 1170 <File 1162 1171 RelativePath=".\sparsehash\src\google\sparsehash\hash_fun.h"> 1163 </File>1164 <File1165 RelativePath=".\sparsehash\src\windows\hash_fun.h">1166 1172 </File> 1167 1173 <File -
GTP/trunk/Lib/Vis/Preprocessing/src/TestPreprocessor.icproj
r2199 r2228 204 204 OptimizeForWindowsApplication="1" 205 205 AdditionalIncludeDirectories="..\include;..\..\..\..\..\..\NonGTP\Boost;..\src;..\..\..\..\..\..\NonGTP\Devil\include;..\..\..\..\..\..\NonGTP\Zlib\include;..\..\..\..\..\..\NonGTP\Xerces;"$(QTDIR)\include\QtOpenGl";"$(QTDIR)\include\Qt";"$(QTDIR)\include\QtCore";"$(QTDIR)\include";QtInterface;..\src\sparsehash\src\;..\src\ootl\src\include\ootl;..\src\ootl\src\include\ootl\sandbox;$(NOINHERIT)" 206 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;GTP_INTERNAL;USE_QT;USE_CG;USE_HASH_PVS" 206 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;GTP_INTERNAL;USE_QT;USE_CG;USE_HASH_PV" 207 StringPooling="1" 207 208 ExceptionHandling="1" 208 209 RuntimeLibrary="2" … … 266 267 OmitFramePointers="1" 267 268 EnableFiberSafeOptimizations="1" 268 OptimizeForProcessor=" 0"269 OptimizeForProcessor="1" 269 270 OptimizeForWindowsApplication="1" 270 271 AdditionalIncludeDirectories="..\include;..\..\..\..\..\..\NonGTP\Boost;..\src;..\..\..\..\..\..\NonGTP\Devil\include;..\..\..\..\..\..\NonGTP\Zlib\include;..\..\..\..\..\..\NonGTP\Xerces;"$(QTDIR)\include\QtOpenGl";"$(QTDIR)\include\Qt";"$(QTDIR)\include\QtCore";"$(QTDIR)\include"" 271 272 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;GTP_INTERNAL;NO_QT" 272 StringPooling="1"273 MinimalRebuild="0"274 273 RuntimeLibrary="2" 275 274 EnableEnhancedInstructionSet="2" … … 278 277 WarningLevel="3" 279 278 Detect64BitPortabilityProblems="1" 280 DebugInformationFormat="3"/> 279 DebugInformationFormat="3" 280 UseProcExt="3" 281 RequireProcExt="3"/> 281 282 <Tool 282 283 Name="LinkerTool" … … 285 286 OutputFile="../bin/release/Preprocessor.exe" 286 287 LinkIncremental="1" 287 AdditionalLibraryDirectories="..\src\GL;..\lib\release;..\..\Preprocessing\lib\release;..\..\..\..\..\..\NonGTP\Boost\lib;..\..\..\..\..\..\NonGTP\Xerces\xercesc\lib;..\..\..\..\..\..\NonGTP\Zlib\lib;..\..\..\..\..\..\NonGTP\Devil\lib;..\MultiLevelRayTracing\RTScene\Release;..\MultiLevelRayTracing\RTWorld\Release" 288 GenerateDebugInformation="0" 289 SubSystem="1" 290 LargeAddressAware="0" 288 AdditionalLibraryDirectories="..\src\GL;..\lib\release;..\..\Preprocessing\lib\release;..\..\..\..\..\..\NonGTP\Boost\lib;..\..\..\..\..\..\NonGTP\Xerces\xercesc\lib;..\..\..\..\..\..\NonGTP\Zlib\lib;..\..\..\..\..\..\NonGTP\Devil\lib;..\MultiLevelRayTracing\RTScene\Release;..\MultiLevelRayTracing\RTWorld\Release;"$(QTDIR)\lib";.\QtGlRenderer\Release" 289 GenerateDebugInformation="0" 290 SubSystem="1" 291 291 OptimizeReferences="2" 292 292 EnableCOMDATFolding="2" -
GTP/trunk/Lib/Vis/Preprocessing/src/TestPreprocessor.vcproj
r2206 r2228 257 257 GlobalOptimizations="TRUE" 258 258 InlineFunctionExpansion="2" 259 FavorSizeOrSpeed="1" 259 EnableIntrinsicFunctions="TRUE" 260 FavorSizeOrSpeed="1" 261 OmitFramePointers="TRUE" 260 262 EnableFiberSafeOptimizations="TRUE" 261 OptimizeForProcessor=" 3"263 OptimizeForProcessor="1" 262 264 OptimizeForWindowsApplication="TRUE" 263 265 AdditionalIncludeDirectories="..\include;..\..\..\..\..\..\NonGTP\Boost;..\src;..\..\..\..\..\..\NonGTP\Devil\include;..\..\..\..\..\..\NonGTP\Zlib\include;..\..\..\..\..\..\NonGTP\Xerces;"$(QTDIR)\include\QtOpenGl";"$(QTDIR)\include\Qt";"$(QTDIR)\include\QtCore";"$(QTDIR)\include"" 264 266 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;GTP_INTERNAL;NO_QT" 265 267 RuntimeLibrary="2" 266 RuntimeTypeInfo="TRUE" 268 EnableEnhancedInstructionSet="2" 269 RuntimeTypeInfo="FALSE" 267 270 UsePrecompiledHeader="0" 268 271 WarningLevel="3" … … 281 284 OptimizeReferences="2" 282 285 EnableCOMDATFolding="2" 286 OptimizeForWindows98="1" 283 287 TargetMachine="1" 284 288 FixedBaseAddress="1"/> -
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp
r2227 r2228 2488 2488 stat.avgFilterRatio/=stat.viewcells; 2489 2489 stat.avgRelPvsIncrease/=stat.viewcells; 2490 2490 stat.renderCostRatio=stat.renderCost / stat.mem; 2491 2491 2492 // evaluate std deviation of relPvsIncrease 2492 2493 float sum=0.0f; … … 2518 2519 s<<"#DEV_REL_PVS_INCREASE\n"<<pvsStat.devRelPvsIncrease<<endl; 2519 2520 s<<"#MEMORY\n"<<pvsStat.mem<<endl; 2520 2521 s<<"#RATIO\n"<<pvsStat.renderCost / (pvsStat.mem + Limits::Small)<<endl; 2521 2522 s<<"#CONTRIBUTING_RAYS\n"<<mSamplesStat.mContributingRays<<endl; 2522 2523 … … 6875 6876 Debug << "finished in " << timeDiff * 1e-3f << " secs" << endl; 6876 6877 6877 // don't use sample contributions because already accounted for inside the mixture distribution! 6878 // don't computed sample contributions 6879 // because already accounted for inside the mixture distribution! 6878 6880 6879 6881 castSamples += samplesPerPass; … … 6948 6950 //////////// 6949 6951 //-- histogram 6950 #if 1 6952 6951 6953 const int numLeaves = mViewCellsTree->GetNumInitialViewCells(mViewCellsTree->GetRoot()); 6952 6954 int histoStepSize; … … 6981 6983 } 6982 6984 } 6983 #endif6984 6985 } 6985 6986 -
GTP/trunk/Lib/Vis/Preprocessing/src/VspTree.cpp
r2227 r2228 1343 1343 1344 1344 #endif 1345 #if VISUALIZE_SPLIT 1346 Exporter *exporter = Exporter::GetExporter("split.wrl"); 1347 exporter->ExportBox(box); 1348 1349 RayInfoContainer::const_iterator rit, rit_end = tData.mRays->end(); 1350 1351 for (rit = tData.mRays->begin(); rit != rit_end; ++ rit) 1352 { 1353 RayInfo rayInf = *rit; 1354 1355 VssRay *ray = rayInf.mRay; 1356 1357 exporter->ExportIntersectable(GetParentObject(ray->mTerminationObject)); 1358 1359 AxisAlignedBox3 candidatePlane; 1360 exporter->ExportBox(candidatePlane); 1361 } 1362 delete exporter; 1363 #endif 1345 1364 for (ci = mLocalSubdivisionCandidates->begin(); ci != ci_end; ++ ci) 1346 1365 { -
GTP/trunk/Lib/Vis/Preprocessing/src/VspTree.h
r2227 r2228 1024 1024 /** Returns true if global tree can be terminated. 1025 1025 */ 1026 inlinebool GlobalTerminationCriteriaMet(const VspTraversalData &data) const;1026 bool GlobalTerminationCriteriaMet(const VspTraversalData &data) const; 1027 1027 1028 1028 /** Adds ray sample contributions to the PVS.
Note: See TracChangeset
for help on using the changeset viewer.