Changeset 1673
- Timestamp:
- 10/24/06 10:15:48 (18 years ago)
- Location:
- GTP/trunk/Lib/Vis/Preprocessing
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/scripts/vsposp_typical.sh
r1667 r1673 12 12 13 13 #SCENE=vsposp_typical 14 SCENE=soda5_vsposp15 #SCENE=soda_vsposp14 #SCENE=soda5_vsposp 15 SCENE=soda_vsposp 16 16 #SCENE=vienna_vsposp 17 17 #SCENE=arena_vsposp … … 71 71 -hierarchy_subdivision_stats=$LOG_PREFIX-$METHOD-hierarchy-subdivisionStats.log \ 72 72 -hierarchy_construction_type=2 \ 73 -hierarchy_construction_consider_memory=false \ 73 -hierarchy_construction_consider_memory2=true \ 74 -bvh_construction_render_cost_decrease_weight=0.99 \ 75 -vsp_construction_render_cost_decrease_weight=0.99 \ 74 76 -hierarchy_construction_multilevel=false \ 75 77 -hierarchy_term_memory_const=0.9 \ -
GTP/trunk/Lib/Vis/Preprocessing/src/BvHierarchy.cpp
r1667 r1673 548 548 priority = factor * renderCostDecr + (1.0f - factor) * oldRenderCost; 549 549 550 if ( 1)//0 && mHierarchyManager->mConsiderMemory)550 if (mHierarchyManager->mConsiderMemory2) 551 551 { 552 552 priority /= ((float)splitCandidate.GetPvsEntriesIncr() + mHierarchyManager->mMemoryConst); -
GTP/trunk/Lib/Vis/Preprocessing/src/BvHierarchy.h
r1667 r1673 441 441 { 442 442 HierarchyManager *hm = sBvHierarchy->mHierarchyManager; 443 443 444 if (hm->ConsiderMemory()) 444 445 { … … 446 447 const float mc = hm->GetHierarchyStats().mMemory + 447 448 (float)mPvsEntriesIncr * ObjectPvs::GetEntrySizeByte(); 448 //cout << "x";449 449 450 return - (rc * mc) / float(1024 * 1024); 450 451 } -
GTP/trunk/Lib/Vis/Preprocessing/src/Environment.cpp
r1666 r1673 2522 2522 "false"); 2523 2523 2524 RegisterOption("Hierarchy.Construction.considerMemory2", 2525 optBool, 2526 "hierarchy_construction_consider_memory2=", 2527 "false"); 2528 2524 2529 RegisterOption("Hierarchy.Construction.repairQueue", 2525 2530 optBool, -
GTP/trunk/Lib/Vis/Preprocessing/src/HierarchyManager.cpp
r1667 r1673 122 122 "Hierarchy.Construction.considerMemory", mConsiderMemory); 123 123 124 Environment::GetSingleton()->GetBoolValue( 125 "Hierarchy.Construction.considerMemory2", mConsiderMemory2); 126 124 127 Environment::GetSingleton()->GetFloatValue( 125 128 "Hierarchy.Termination.maxMemory", mTermMaxMemory); … … 141 144 Debug << "minimal number of steps from same type: " << mMinStepsOfSameType << endl; 142 145 Debug << "maximal allowed memory: " << mTermMaxMemory << endl; 143 Debug << "consider mem: " << mConsiderMemory << endl; 146 Debug << "consider memory: " << mConsiderMemory << endl; 147 Debug << "consider memory2: " << mConsiderMemory << endl; 144 148 Debug << "mem const: " << mMemoryConst << endl; 145 149 … … 422 426 // decide upon next split type 423 427 const float vspPriority = viewSpaceQueue.Top() ? viewSpaceQueue.Top()->GetPriority() : -1e20; 424 const float ospPriority = viewSpaceQueue.Top() ? objectSpaceQueue.Top()->GetPriority() : -1e20;428 const float ospPriority = objectSpaceQueue.Top() ? objectSpaceQueue.Top()->GetPriority() : -1e20; 425 429 426 430 cout << "new decicion, vsp: " << vspPriority << ", osp: " << ospPriority << endl; … … 429 433 if (ospPriority >= vspPriority) 430 434 { 431 // use splits of one kind until rendercost decrease of other domain is reached 432 renderCostDecr = vspPriority; 433 cout << "comparing with this render cost: " << renderCostDecr << endl; 435 cout << "osp" << endl; 434 436 // dirtied view space candidates 435 437 SubdivisionCandidateContainer dirtyVspList; … … 450 452 else 451 453 { 452 // use splits of one kind until rendercost slope is reached 453 renderCostDecr = ospPriority; 454 cout << "comparing with this render cost: " << renderCostDecr << endl; 455 454 cout << "vsp" << endl; 455 456 456 ///////////////// 457 457 // subdivide view space with respect to the objects -
GTP/trunk/Lib/Vis/Preprocessing/src/HierarchyManager.h
r1667 r1673 535 535 bool mConsiderMemory; 536 536 537 /// constant value for driving the heuristics 537 538 float mMemoryConst; 538 539 540 bool mConsiderMemory2; 539 541 540 542 friend VspTree; -
GTP/trunk/Lib/Vis/Preprocessing/src/Pvs.h
r1667 r1673 497 497 float Pvs<T, S>::GetEntrySize() 498 498 { 499 return (float) sizeof(T) + sizeof(S) / float(1024 * 1024);499 return (float)(sizeof(T) + sizeof(S)) / float(1024 * 1024); 500 500 } 501 501 -
GTP/trunk/Lib/Vis/Preprocessing/src/VspTree.cpp
r1668 r1673 786 786 787 787 788 void VspTree::EvalSubdivisionCandidate(VspSubdivisionCandidate &splitCandidate, bool computeSplitPlane) 788 void VspTree::EvalSubdivisionCandidate(VspSubdivisionCandidate &splitCandidate, 789 bool computeSplitPlane) 789 790 { 790 791 if (computeSplitPlane) … … 825 826 float priority = factor * renderCostDecr + (1.0f - factor) * oldRenderCost; 826 827 827 if ( 1)//0 && mHierarchyManager->mConsiderMemory)828 if (mHierarchyManager->mConsiderMemory2) 828 829 { 829 830 priority /= ((float)splitCandidate.GetPvsEntriesIncr() + mHierarchyManager->mMemoryConst); -
GTP/trunk/Lib/Vis/Preprocessing/src/VspTree.h
r1667 r1673 864 864 int PrepareHeuristics(KdLeaf *leaf); 865 865 866 /** Reevaluates the priority of this split candidate 867 @returns priority 868 */ 869 //float EvalPriority(const VspSubdivisionCandidate &splitCandidate) const; 870 866 871 867 ///////////////////////////////////////////////////////////////////////////// 872 868 … … 1073 1069 bool mOutOfMemory; 1074 1070 1075 1071 //////////// 1076 1072 //-- split heuristics based parameters 1077 1073
Note: See TracChangeset
for help on using the changeset viewer.